gigaherz / JsonThings

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

Item max_stack_size not working #2

Closed NickFleming501 closed 2 years ago

NickFleming501 commented 2 years ago

When defining an item in a ThingPack the option "max_stack_size" is ignored. Tested in a new Minecraft Profile with JsonThings as the only mod.

Minecraft Version: 1.16.5 Forge Version: 36.2.0 JsonThings Version: JsonThings-1.16.5-0.1.1.jar from CurseForge

Steps to reproduce:

  1. add attached ThingPack
  2. launch creative mode world
  3. /give @s testpack:item2 11

Expected Outcome: 5 stacks of size 2 and one stack of size 1 Actual Outcome: One stack of size 11

Looking at the code, it seems that in ItemBuilder.java the attribute is only set, but never used. Not sure if that's the issue though, or if its something else.

Attached ThingPack, modified from "test" ThingPack, only change is the "max_stack_size" in item2.json set to 2 instead of 64. max_stack_size_test.zip

gigaherz commented 2 years ago

Thanks for the report I'll look into it as soon as I can.

gigaherz commented 2 years ago

Oh.... that explains it.... I don't use the value, even though I parse it. 🤦‍♂️

gigaherz commented 2 years ago

v0.1.2 is approved on CurseForge and it should fix this issue.