Fix dupe with Eigencraft redstone implementation (#2864)

This commit is contained in:
Mark Vainomaa 2020-01-17 04:07:50 +02:00
parent 129cb1fbbe
commit 0fcff54352

View File

@ -39,7 +39,7 @@ index dd5e263d7..357c7cf1d 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 000000000..cf5661f1c
index 000000000..b69803cbf
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +0,0 @@
@ -938,9 +938,12 @@ index 000000000..cf5661f1c
+ // and set it in the world.
+ // Possible optimization: Don't commit state changes to the world until they
+ // need to be known by some nearby non-redstone-wire block.
+ BlockPosition pos = new BlockPosition(upd.self.getX(), upd.self.getY(), upd.self.getZ());
+ if (wire.canPlace(null, worldIn, pos)) {
+ state = state.set(BlockRedstoneWire.POWER, Integer.valueOf(j));
+ worldIn.setTypeAndData(upd.self, state, 2);
+ }
+ }
+
+ return state;
+ }