TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Empty molds should be stackable, if possible.

alcatrazEscapee opened this issue ยท 1 comments

commented

Molds are currently forced to have stack size = 1 via the item properties. While filled molds must by requirement be unstackable, empty molds should in theory be able to stack. As long as we properly restrict usages - i.e. any slot that interacts with a mold capability must only interact with stack size = 1, which I think we already do, this should be a trivial change, but it requires some serious testing.

commented

Decided not to implement this based on the numerous issues it could cause. Detailed pseudo-explanation / excerpt from conversation below:

I don't think I can safely make molds stack without opening the door to numerous buggy / exploitable interactions, or just poor usability or having to make empty molds a separate item from non-empty molds (ew). And fwiw, none of our other buckets stack when empty (wooden, red/blue steel) or containers (vessels small + large, barrels).

Our devices internal inventories are generally protected against not interacting with stack sizes > 1. That's not a problem. The items itself would need to be restricted to only operate with stack size = 1 (like the bucket FluidBucketWrapper capability is). and also be capable of interacting using the fluid container with other mod devices (dubious). But because they modify their stack NBT, there's potential for leaks there.

Also we still need to prevent filled molds stacking with identical other filled molds - that's a whole other problem. There's no vanilla item that has this selective same-item stackability difference (buckets are the closest thing, but separate items). Everything else with mutable nbt / unstackable is also unstackable with no nbt (see: tools).

This also is affected by the difference between storing data as seperate items vs. cap NBT vs. stack NBT. The latter is more persistent, but we rely on it as it doesn't cause issues with creative inventory or cap sync.