diff options
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h b/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h index f0b4a741c..0bd94baa9 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h @@ -22,8 +22,10 @@ namespace SmallGateHandler { // LOGD("Evaluating gateydory the fence gate/trapdoor (%d %d %d)", a_Position.x, a_Position.y, a_Position.z); + // Use redstone data rather than block state so players can override redstone control + const auto Previous = DataForChunk(a_Chunk).ExchangeUpdateOncePowerData(a_Position, Power); + const bool IsOpen = (Previous != 0); const bool ShouldBeOpen = Power != 0; - const bool IsOpen = (a_Meta & 0x4) == 0x4; if (ShouldBeOpen != IsOpen) { |