gigaherz / JsonThings

Data-driven minecraft
https://www.curseforge.com/minecraft/mc-mods/json-things
Other
22 stars 6 forks source link

Food items are eaten 2 at a time #19

Closed maz3e closed 1 year ago

maz3e commented 1 year ago

Added a basic food item to test this mod out, but I'm getting an issue with 2 items being eaten at once. This only seems to affect the item I added through a things pack.

I added the poison effect on the off chance it fixed the issue, but the problem also happens without it.

I also tried adding the content of the food block to _food/strawberryjam.json and removing it from _item/strawberryjam.json but that results in the item not being edible at all, which I'm not sure if that's intended or not.

{ "type": "plain", "max_stack_size": 16, "food": { "nutrition": 1, "saturation": 2.0, "meat": false, "fast": false, "always_eat": false, "effects": [ { "effect": "minecraft:poison", "duration": 1, "amplifier": 0, "visible": true, "show_particles": true, "show_icon": true
} ] }, "container": "bowl" }

Video of the issue: https://user-images.githubusercontent.com/127639949/224521297-f8990d8f-ff05-4111-b637-43f870086a88.mp4

As a side note, I really appreciate this mod; I like making modpacks, and many mods don't have compat mods or miss things, so being able to add them in myself without having to write a whole mod to do it is great.

Wudji commented 1 year ago

confirmed on Rhino:1902.2.2-build.264, JSON Things:1.19.3-0.7.8

gigaherz commented 1 year ago

oh huh I missed this bug report, looking into it.

gigaherz commented 1 year ago

OOPS! I think I found why. Testing...

EDIT: Yep. I will take me a bit to set up a 1.19.3 environment so I can backport the fix, then I'll release for 1.18.2, 1.19.2, 1.19.3 and 1.19.4. And hopefully nothing else critical like this comes up and I can forget about the older versions. :P

gigaherz commented 1 year ago

Should be fixed as of the latest respective versions (published, awaiting approval on CF).

maz3e commented 1 year ago

Confirmed fixed, thanks!