From f5bef9ee1295d0a4de05354f6f5494f29eadac0f Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 31 May 2022 23:23:17 +0200 Subject: [PATCH] Update StationTileEntity.java - Fixed bogey placement voiding block drops --- .../edgePoint/station/StationTileEntity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationTileEntity.java index a1cc87a0f..1c0bfdec7 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationTileEntity.java @@ -268,8 +268,16 @@ public class StationTileEntity extends SmartTileEntity implements ITransformable return false; } + BlockPos targetPos = pos.offset(up); + if (level.getBlockState(targetPos) + .getDestroySpeed(level, targetPos) == -1) { + return false; + } + + level.destroyBlock(targetPos, true); + BlockState bogeyAnchor = ProperWaterloggedBlock.withWater(level, track.getBogeyAnchor(level, pos, state), pos); - level.setBlock(pos.offset(up), bogeyAnchor, 3); + level.setBlock(targetPos, bogeyAnchor, 3); player.displayClientMessage(Lang.translate("train_assembly.bogey_created"), true); SoundType soundtype = bogeyAnchor.getBlock() .getSoundType(state, level, pos, player);