diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java index f968d909e..38713c0d1 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java @@ -168,11 +168,17 @@ public class LightedWorldGenRegion extends WorldGenRegion @Override public BlockEntity getBlockEntity(BlockPos blockPos) { BlockState blockState = this.getBlockState(blockPos); - if (!blockState.hasBlockEntity()) return null; + + // This is a bypass for the spawner block since MC complains about not having it + #if POST_MC_1_17_1 if (blockState.getBlock() instanceof SpawnerBlock) { - // This is a bypass for the spawner block since MC complains about not having it return ((EntityBlock) blockState.getBlock()).newBlockEntity(blockPos, blockState); } else return null; + #else + if (blockState.getBlock() instanceof SpawnerBlock) { + return ((EntityBlock) blockState.getBlock()).newBlockEntity(this); + } else return null; + #endif } // Skip BlockEntity stuff. It aren't really needed