Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.21] Incompatibility with BucketLib #168

Open
1 task done
cech12 opened this issue Jul 1, 2024 · 3 comments
Open
1 task done

[1.21] Incompatibility with BucketLib #168

cech12 opened this issue Jul 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@cech12
Copy link

cech12 commented Jul 1, 2024

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. :)

@ColinBashful
Copy link

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

@ColinBashful
Copy link

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

@cech12
Copy link
Author

cech12 commented Jul 2, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants