diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/InfestedLeavesBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/InfestedLeavesBlockEntity.java index 32daa15b..6891d262 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/InfestedLeavesBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/InfestedLeavesBlockEntity.java @@ -77,8 +77,8 @@ public class InfestedLeavesBlockEntity extends EBlockEntity { if (state.is(BlockTags.LEAVES) && state.getBlock() != EBlocks.INFESTED_LEAVES.get()) { // Spread and keep distance/persistent properties level.setBlock(targetPos, EBlocks.INFESTED_LEAVES.get().defaultBlockState() - .setValue(LeavesBlock.DISTANCE, state.getValue(LeavesBlock.DISTANCE)) - .setValue(LeavesBlock.PERSISTENT, state.getValue(LeavesBlock.PERSISTENT)), + .setValue(LeavesBlock.DISTANCE, state.hasProperty(LeavesBlock.DISTANCE) ? state.getValue(LeavesBlock.DISTANCE) : 0) + .setValue(LeavesBlock.PERSISTENT, state.hasProperty(LeavesBlock.PERSISTENT) ? state.getValue(LeavesBlock.PERSISTENT) : false), 2); var te = level.getBlockEntity(targetPos);