forked from KidsDontPlay/Storage-Network
-
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
ItemBuilder#appendHoverText overrides the MC method Item#appendHoverText which specifies the second param (type Level) as @Nullable, but passes the param to ItemBuilder#getBlockState without a check, causing a NPE on the Level#holderLookup call.
This bug may not be triggered by any current vanilla code, but can be triggered by other mods respecting the method declaration.
Storage-Network/src/main/java/com/lothrazar/storagenetwork/item/ItemBuilder.java
Line 120 in 9421efe
| public void appendHoverText(ItemStack stack, Level worldIn, List<Component> tooltip, TooltipFlag flagIn) { |
Storage-Network/src/main/java/com/lothrazar/storagenetwork/item/ItemBuilder.java
Line 129 in 9421efe
| BlockState target = ItemBuilder.getBlockState(worldIn, stack); |
| return NbtUtils.readBlockState(level.holderLookup(Registries.BLOCK), wand.getOrCreateTag().getCompound(NBTBLOCKSTATE)); |
Metadata
Metadata
Assignees
Labels
No labels