Cauldron should be fluid_storage peripheral
tonitch opened this issue ยท 4 comments
Useful information to include:
- Explanation of how the feature/change should work.
- Some rationale/use case for a feature. My general approach to designing new features is to ask yourself "what issue are we trying to solve" and then "is this the best way to solve this issue?".
I might be wrong, but it seems like cauldron are not using fluid_storage. This would be handy.
Since there is possibility to produce lava in a cauldron, an excellent use case for this interface would be to make an automated lava farm that would power up turtles and the network would use networking cable.
I haven't tested that, but I suppose almost everything is already set. We just have to let the cauldron be fluid_peripheral.
The reason that cauldron is not fluid_storage is because forge did not make it implement the FluidHandler capability
Do you think it could be fixed on cc:t 's side or maybe this should be an issue for forge?
No, no. This is 100% a bug on CC:T's side.
So for some history/context here, inventories and fluid tanks used to only be available on block entities. However, some blocks (like caldrons and composters) don't have a block entity associated with them, but still can behave as an inventory/tank.
Older versions of Forge (anything before MC 1.20.4) didn't really handle this correctly (though Fabric does!), which is why cauldrons aren't available as peripherals. However, NeoForge does support this โ the issue is that CC:T has not updated it's generic peripheral code to handle that. There are some wider issues that affect generic peripherals on recent versions of the game (see also #1817), so that whole system probably needs a rewrite.
As far as MC 1.20.1, this is unlikely to be fixed, at least not without special handling for cauldrons.
I don't really know if any other block should have the fluid peripheral by default. So I assume this goes down to implementing these two:
- https://mcstreetguy.github.io/NeoForgeJavaDocs/1.20.4-20.4.237/net/neoforged/neoforge/fluids/CauldronFluidContent.html
- https://maven.fabricmc.net/docs/fabric-api-0.102.0+1.21/net/fabricmc/fabric/api/transfer/v1/fluid/CauldronFluidContent.html#registerCauldron(net.minecraft.block.Block,net.minecraft.fluid.Fluid,long,net.minecraft.state.property.IntProperty)
I'm going to try to implement it on my side as an exercise, but I don't know if I will make a pr as this might be some wacky code haha.