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.
|
public void appendHoverText(ItemStack stack, Level worldIn, List<Component> tooltip, TooltipFlag flagIn) { |
|
BlockState target = ItemBuilder.getBlockState(worldIn, stack); |
|
return NbtUtils.readBlockState(level.holderLookup(Registries.BLOCK), wand.getOrCreateTag().getCompound(NBTBLOCKSTATE)); |
ItemBuilder#appendHoverTextoverrides the MC methodItem#appendHoverTextwhich specifies the second param (typeLevel) as@Nullable, but passes the param toItemBuilder#getBlockStatewithout a check, causing a NPE on theLevel#holderLookupcall.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
Storage-Network/src/main/java/com/lothrazar/storagenetwork/item/ItemBuilder.java
Line 129 in 9421efe
Storage-Network/src/main/java/com/lothrazar/storagenetwork/item/ItemBuilder.java
Line 51 in 9421efe