diff --git a/src/main/java/de/dafuqs/spectrum/blocks/decay/RuinBlock.java b/src/main/java/de/dafuqs/spectrum/blocks/decay/RuinBlock.java index 841dd2613c..cbf76c50ed 100644 --- a/src/main/java/de/dafuqs/spectrum/blocks/decay/RuinBlock.java +++ b/src/main/java/de/dafuqs/spectrum/blocks/decay/RuinBlock.java @@ -83,14 +83,13 @@ public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, } @Override - public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean moved) { - super.onRemove(state, level, pos, newState, moved); + public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity, ItemStack tool) { + Optional shouldCreatePortalFacingUp = shouldCreatePortalFacingUp(level, pos, state); - if (newState.isAir()) { - Optional shouldCreatePortalFacingUp = shouldCreatePortalFacingUp(level, pos, state); - if (shouldCreatePortalFacingUp.isPresent()) { - level.setBlockAndUpdate(pos, SpectrumBlocks.DEEPER_DOWN_PORTAL.get().defaultBlockState().setValue(DeeperDownPortalBlock.FACING_UP, shouldCreatePortalFacingUp.get())); - } + super.playerDestroy(level, player, pos, state, blockEntity, tool); + + if (shouldCreatePortalFacingUp.isPresent() && level instanceof ServerLevel serverLevel) { + serverLevel.setBlockAndUpdate(pos, SpectrumBlocks.DEEPER_DOWN_PORTAL.get().defaultBlockState().setValue(DeeperDownPortalBlock.FACING_UP, shouldCreatePortalFacingUp.get())); } }