Ex Nihilo: Sequentia

Ex Nihilo: Sequentia

9M Downloads

Clay Buckets from "Ceramics" mod don't work with barrels/wood crucibles

joker876 opened this issue ยท 12 comments

commented

Describe the bug
Clay Buckets from the Ceramics mod don't work when trying to insert/take water to/from barrels and wooden crucibles.

To Reproduce
Steps to reproduce the behavior:

  1. Try taking water from a barrel using the clay bucket from the Ceramics mod (or try putting the water into the barrel)

Expected behavior
Self explanatory, I think.

Version
Minecraft Version: 1.16.5
Forge Version: 36.1.0
Ex Nihilo: Sequentia Version: 1.16-2.0.2.6

commented

Please explain. The buckets are just a normal fluid container exposing a fluid handler capability. Why not use the capability system to drain the bucket?

commented

I still don't understand what you mean. Clay buckets use a fluid capability nearly identical to the one forge uses for vanilla buckets. They work perfectly fine with every other mod using fluid capabilities, so something is wrong in this mod. If you are using capabilities they should work.

commented

@KnightMiner Since this issue has come up again, Ex Nihilo uses the Minecraft Forge FluidUtils#interactWithFluidHandler to interact with buckets. This method does use the capability system.

commented

actually, i can't find any issues on this. it's working perfect in my environment... running:
Ex Nihilo Sequentia: 1.16-20220115-185452
Ceramics: 1.6.3
Mantle: 1.6.157
Forge: 36.2.2

(I have also tested it with ceramic buckets and wooden buckets, they all get the fluid out of the tanks and can fill them perfectly (besides wooden buckets, they just turn into normal buckets))

commented

so first i test this, and i have the same Problem:
forge 36.2.22
Ceramics 1.16.5-1.6.3
exnihilosequentia 1.16-20220115-185452
Mantle 1.16.5-1.6.157

and it does not work

commented

i can only reproduce one thing: insering water from the cermics bucket into a barrel doesn't work. everything else is working like it should.

commented

I still don't understand what you mean. Clay buckets use a fluid capability nearly identical to the one forge uses for vanilla buckets. They work perfectly fine with every other mod using fluid capabilities, so something is wrong in this mod. If you are using capabilities they should work.

I am using the FluidUtils class provided by Forge to interact with fluid containers, which a bucket is one. If you go digging in the class it uses the "FLUID_HANDLER_ITEM_CAPABILITY" defined by Forge to get the fluid handler. Is this not the same as what you are talking about?

commented

one thing i have to mention tho: the water bucket is no "BucketItem", they are normal "Item".

we check here if it is a BucketItem or a bottle. because that bucket is non of them, they can't insert water.

commented

I am using the FluidUtils class provided by Forge to interact with fluid containers, which a bucket is one. If you go digging in the class it uses the "FLUID_HANDLER_ITEM_CAPABILITY" defined by Forge to get the fluid handler. Is this not the same as what you are talking about?

That is the same thing I am am using. That said, the code remplerus linked is likely the problem, because clay buckets do not extend bucket item. Its not a good assumption to make that all fluid containers extend the vanilla class, whole reason capabilities exist so you are not required to do inheritance.

Replace the bucket item check with a check if it has a fluid capability. That is, stack.getCapability(FLUID_HANDLER_ITEM_CAPABILITY).isPresent()

commented

That's totally fair. I made the assumption that all fluid containers would be buckets. Thanks for pointing that out.

commented

fixed in #300

commented

Unfortunately this is not something that I can fix because of the way that Ceramics has implemented their buckets.