Remove error when missing_block_entities sees null BE

Blocks may legitimately not have a block entity for some states
This commit is contained in:
embeddedt 2026-06-07 21:50:01 -04:00
parent 1bcb28a1ad
commit 7fbfcf1a92
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -86,13 +86,9 @@ public abstract class LevelChunkMixin extends ChunkAccess {
}
BlockEntity blockEntity = this.getBlockEntity(pos.immutable(), LevelChunk.EntityCreationType.IMMEDIATE);
String blockName = state.getBlock().toString();
if (blockEntity != null) {
if (ModernFix.LOGGER.isDebugEnabled()) {
ModernFix.LOGGER.debug("Created missing block entity for {} at {}", blockName, pos.toShortString());
}
} else {
ModernFix.LOGGER.error("Block entity is missing for {} at {}, but could not be created", blockName, pos.toShortString());
if (blockEntity != null && ModernFix.LOGGER.isDebugEnabled()) {
String blockName = state.getBlock().toString();
ModernFix.LOGGER.debug("Created missing block entity for {} at {}", blockName, pos.toShortString());
}
}
}