![The Veggie Way [FABRIC]](https://media.forgecdn.net/avatars/thumbnails/268/825/256/256/637239809539550945.png)
[1.18.2] [SUGGESTION] Add dehydration support
Sunconure11 opened this issue ยท 8 comments
Looks like the mod already provides tags for players to create a datapack for fluid support.
you can add any items to the Dehydration mod you want via a datapack.
If I add them to the my mod and Dehydration is not present, it will cause errors.
The point of the tags is to make things mod independent
Welcome to the new world of data-driven modding!
Hm, I'm noticing a thing. You don't need to use tags to have support. After talking with a specific dev, I think you might just need to define specific things in your drink item's class. Let me look a little further as to find how this is done.
Try defining the actions for your drinks as well, drinking.
public UseAction getUseAction(ItemStack stack) { return UseAction.DRINK; }
Try adding this to said classes and see if it works. Dehydration has it's own sound for drinks, so it should give you a sound cue if it is working.
Many of my foods do not use individual classes, because they are not needed. I just extend Item and attach food attributes to them.
For drinks, I just use a DrinkBase class for all drinks and it has the UseAction.
I have getUseAction() defined in my DrinkBase class and I then just extend DrinkBase on any class that needs it, reducing dup code.