Fix potential NPE in ForgeHooks.onItemPlaceIntoWorld when passing in null player. (#7505)
This commit is contained in:
parent
545723dc8c
commit
a1119cd77a
|
@ -674,7 +674,8 @@ public class ForgeHooks
|
||||||
|
|
||||||
world.markAndNotifyBlock(snap.getPos(), world.getChunkAt(snap.getPos()), oldBlock, newBlock, updateFlag, 512);
|
world.markAndNotifyBlock(snap.getPos(), world.getChunkAt(snap.getPos()), oldBlock, newBlock, updateFlag, 512);
|
||||||
}
|
}
|
||||||
player.addStat(Stats.ITEM_USED.get(item));
|
if (player != null)
|
||||||
|
player.addStat(Stats.ITEM_USED.get(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
world.capturedBlockSnapshots.clear();
|
world.capturedBlockSnapshots.clear();
|
||||||
|
|
Loading…
Reference in New Issue