Wooden buckets (and other items which use `FluidWhitelistHandler`) save fluid data to NBT causing different items not to stack.
aliceingame opened this issue ยท 2 comments
Describe the bug
Make sure to include:
- What did you expect to happen? all empty buckets to stack
- What actually happened instead (i.e. what was the bug) empty bucket and empty bucket used in a recipe (dough) are not the same and do not stack
- If they would help to explain the issue, include screenshots
First is a newly crafted bucket, second is as bucket from a dough recipe.
To Reproduce
Attention to detail is important!
- Do craft 2 buckets, use one to make dough, try to stack both, they don't.
Meta Info
- TFC Version: 125
This is caused by our code and forge's base fluid handler making very different assumptions about how fluid capability objects are stored:
Our FluidWhitelistHandler
extends FluidHandlerItemStackSimple
, which stores fluid values directly to the NBT of the item stack. This is a behavior we do nowhere else in code, as instead we rely on capability NBT, synced via custom capability handler and share tag.
I'm not entirely sure what the best way to resolve this is. We could just remove the fluid stack tag handling as clearly that's the one that's not expected but I'm worried a particular individual would be very annoyed with that.
I'm of the opinion that we should stick to the capability NBT management in this case, as we already have recipe types for ingredients for the relevant integration possibilities, and it's more overall consistent with the rest of TFC's capability handling systems.