From 951acf1c99c588a0f3f66f365e0e4d4337604edb Mon Sep 17 00:00:00 2001 From: Darkere Date: Sat, 24 Oct 2020 14:35:33 +0200 Subject: [PATCH] fix rotation not calling onDirectionChanged (#2718) * fix rotation not calling onDirectionChanged * changelog --- CHANGELOG.md | 1 + .../refinedstorage/block/ColoredNetworkBlock.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c65a72427..e9b6a45ff 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 1.9.8 - Fixed server crash when scrolling in Grid (Darkere) - Fixed various issues with Grid interactions working without power (Darkere) +- Fixed rotation not updating blocks (Darkere) - Added a JEI synchronized (two-way) search box mode to the Grid (ScoreUnder) - Added a nag message when a player joins the world that asks the player to enable the experimental Forge lighting pipeline to ensure correct rendering (raoulvdberge) diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ColoredNetworkBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ColoredNetworkBlock.java index 52e983c62..e582d3809 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ColoredNetworkBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ColoredNetworkBlock.java @@ -12,6 +12,12 @@ public class ColoredNetworkBlock extends NetworkNodeBlock { @Override public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { if (state.getBlock().getClass().equals(newState.getBlock().getClass())) { + //From BaseBlock#onReplaced as this gets skipped otherwise + if (getDirection() != BlockDirection.NONE && + state.getBlock() == newState.getBlock() && + state.get(getDirection().getProperty()) != newState.get(getDirection().getProperty())) { + onDirectionChanged(world, pos, newState.get(getDirection().getProperty())); + } return; }