fix intelliJ warning about potentially null block state

This commit is contained in:
onebeastchris 2024-06-18 13:24:03 +02:00
parent 2827e48cc8
commit 6b83b777c9

View file

@ -406,7 +406,7 @@ public class JavaLevelChunkWithLightTranslator extends PacketTranslator<Clientbo
// The Java server can send block entity data for blocks that aren't actually those blocks.
// A Java client ignores these
if (blockState.block().hasBlockEntity() && blockEntityTranslator.shouldTranslate(session, blockState)) {
if (blockState != null && blockState.block().hasBlockEntity() && blockEntityTranslator.shouldTranslate(session, blockState)) {
bedrockBlockEntities.add(blockEntityTranslator.getBlockEntityTag(session, type, x + chunkBlockX, y, z + chunkBlockZ, tag, blockState));
// Check for custom skulls