Create

Create

86M Downloads

Bottle used to create potion bucket from Tinker's Construct mod

BitBlitObviMormon opened this issue · 7 comments

commented

Describe the Bug

Create uses a bottle and 250mb of potion in the recipe used to make a Potion of X Bucket from Tinker's Construct.

Reproduction Steps

The recipe is created on launch; no extra steps needed.

Expected Result

I expected the recipe to use a bucket and 1b of potion instead of a glass bottle and 250mb of potion.

Screenshots and Videos

Minecraft_ 1 18 2 - Singleplayer 12_11_2022 5_46_39 PM

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.0e

Minecraft Version

1.18.2

Forge Version

40.1.73

Other Mods

  • Tinker's Construct
  • Mantle (required for Tinker's Construct)
  • JEI (to show screenshot)

Additional Context

No response

commented

Thanks for the report. I’ll look into using the getContainerItem() method as you’ve suggested here.

commented

Worth noting, since my previous comment I have realized that vanilla does not properly set container items to potion bottles, IIRC I had to special case that in one of my mods (though I also treat splash and lingering potions as not being the vanilla glass bottle item). With that approach, you'd need to have a fallback after container item to a glass bottle (probably on a whitelist instead of instanceof). Tinkers sets its container item to make it easier to work with our buckets though. Plus, container items don't say anything about container size.

I'd probably still overall recommend just making fluid handlers run before your potion item special case, will handle the most cases.

commented

Ok, thank you!

commented

The recipe likewise returns a bottle and 250mb of potion when dumping a Potion Bucket on an Item Drain.

commented

I think this might be an issue with Tinker's rather than Create. When the buckets are drained using Traveler's Backpacks, they also pull out 250mb and return an empty bottle, meaning that these "buckets" might actually just be retextured, renamed bottles

commented

That makes sense to me. They can be drunk like a potion and aren't actually used to place liquids onto the world.

commented

Milk buckets can also be drunk. Does not make them not a bucket.

It is true, potion buckets extend the potion item class, but so do splash potions, lingering potions, and other non-glass bottle potion variants. Nothing in PotionItem says that class must use a glass bottle, so its not a mod's fault that they used the class and Create made bad assumptions.

The problem here is Create hardcodes all PotionItem to glass bottles on filling, and on draining.

They could have at least used getContainerItem() instead of hardcoding. That, or only assign glass bottles to vanilla potions, I cannot think of a single non-vanilla potion item that would want glass bottles. Or, best idea is to just make fluid handlers have priority over the potion item hardcoding, as why would create trust their guess over what the mod itself tells you using the Forge API?


When the buckets are drained using Traveler's Backpacks, they also pull out 250mb and return an empty bottle, meaning that these "buckets" might actually just be retextured, renamed bottles

Sounds like Travelers Backpacks is using similar hacks instead of properly using fluid handlers/getContainerItem() as well, yes. Bug should also be reported to them.