
Bottle used to create potion bucket from Tinker's Construct mod
BitBlitObviMormon opened this issue · 7 comments
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
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
Thanks for the report. I’ll look into using the getContainerItem()
method as you’ve suggested here.
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.
The recipe likewise returns a bottle and 250mb of potion when dumping a Potion Bucket on an Item Drain.
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
That makes sense to me. They can be drunk like a potion and aren't actually used to place liquids onto the world.
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.