Modular Routers

Modular Routers

33M Downloads

OreDictMatch logic filter can pass invalid stack to OreDictionary.getOreIDs

noobanidus opened this issue ยท 2 comments

commented

Minecraft Version

1.12.2

Forge Version

2836

Mod Version

1.12.2-3.2.1

Describe your problem, including steps to reproduce it

No steps for repeating it. Simply a check to make sure the item is valid at some point in the chain to prevent erroring tile entities. See crash log: crash-2019-06-25_12.23.52-server.txt

Any other comments?

commented

Fixed in 3.2.2 release

commented

This happened because an ItemStack.EMPTY was passed into the ore dict matcher, which isn't valid. Under normal circumstances, this shouldn't happen, since empty itemstacks are never saved to the module's filter NBT. However, if a mod were to be removed, the module stack would contain effectively invalid NBT - upon deserialization, the filter would contain an empty item. I suspect that's what's happened here.

Easy fix, anyway - also validate and ignore empty itemstacks when the filter is deserialized from the module itemstack.