Botania

Botania

133M Downloads

Check uses of `Inventory::contains(ItemStack)` after logic change since Minecraft 1.19.2

TheRealWormbo opened this issue · 0 comments

commented

Mod Loader

Both Fabric and Forge (I confirm that I have tested both loaders and will specify both loader versions below)

Minecraft Version

1.20.1

Botania version

441, 442

Modloader version

(any)

Modpack info

(none)

The latest.log file

(n/a)

Issue description

At some point between 1.19.2 and 1.20.1 the implementation of net.minecraft.world.entity.player.Inventory#contains(net.minecraft.world.item.ItemStack) changed from using ItemStack.isSame() to ItemStack.isSameItemSameTags(). As a result, any check against items with NBT data may now fail if a plain stack of the item to check is passed to the contains method.

Steps to reproduce

No response

Other information

As far as I can tell this is the reason the Flügel Tiara no longer detects the presence of the Eye of the Flügel (see #4491), and it also seems to affect the Mana Flame block.