From b8b50987d123c5366db809c2320a649b97c3e95d Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 4 Jul 2022 00:24:34 +0200 Subject: [PATCH] Fix weird BlockRotatingBehaviour Signed-off-by: yoyosource --- .../features/smartplace/behaviour/BlockRotatingBehaviour.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/behaviour/BlockRotatingBehaviour.java b/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/behaviour/BlockRotatingBehaviour.java index fddfe664..fc8a2150 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/behaviour/BlockRotatingBehaviour.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/behaviour/BlockRotatingBehaviour.java @@ -61,6 +61,9 @@ public class BlockRotatingBehaviour implements SmartPlaceBehaviour { block.setType(event.getMaterial()); blockData = event.getItem().getType().createBlockData(); BlockFace blockFace = event.getBlockFace(); + if ((blockFace == BlockFace.UP || blockFace == BlockFace.DOWN) && blockData instanceof Directional) { + blockFace = event.getPlayer().getFacing().getOppositeFace(); + } if (block.getType() == Material.HOPPER || block.getType() == Material.OBSERVER) { blockFace = blockFace.getOppositeFace(); }