Dehydration

Dehydration

1M Downloads

[1.21] Incompatibility with BucketLib

cech12 opened this issue ยท 5 comments

commented

Make sure you are not opening a duplicate.

  • I have searched the issue tracker and did not find an issue describing my bug/feature.

Description of your suggestion.

Hello,

I am the developer of the BucketLib mod and the related Wooden & Ceramic Bucket mods. An user opened the following issue: cech12/WoodenBucket#20

The issue is, when right-clicking with a Wooden Bucket (1.21-4.0.0.0) (BucketLib 1.21-4.0.0.3) on the Purified Water Block, the Purified Water Block disappears.

After some research I found the compatibility problem.
My BucketLib mod is interacting with the fluid block here:
https://github.com/cech12/BucketLib/blob/1.21/fabric/src/main/java/de/cech12/bucketlib/platform/FabricFluidHelper.java#L161
It uses the BucketPickup::pickupBlock method to get the filled "vanilla" bucket. The returned BucketItem is used to get the fluid and create a filled modded bucket.
The issue is, that your PurifiedBucket is not an instance of the vanilla BucketItem.
https://github.com/Globox1997/Dehydration/blob/1.21/src/main/java/net/dehydration/item/PurifiedBucket.java#L32
So, for my library mod, there is no possibility to get the fluid out of the item. My only fix could be, that the fluid should not disappear when right-clicking it with a modded bucket.

I would recommend to use or extend the vanilla BucketItem class to fix our compatibility issue. :)
More information: https://github.com/cech12/BucketLib/wiki/Developer-Guide#make-your-mod-compatible

If you need help, please let me know. :)

commented

I'm gonna add the compatibility, fix some Bugs.
Then I'll make a Pull Request.
Welp, CEST Time, so I'll do it when I wake up

commented

I've made a pull request, and now it just needs to get accepted.

commented

I like that :) I left a comment in the PR. Maybe using the FluidStorage system would be a better way to support BucketLib and multiple other mods as well :)

commented

will be fixed by #171

commented

Fixed with the release of Dehydration 1.3.7