Add a missing return in Eigencraft redstone (#4621)

This commit is contained in:
Mariell 2020-10-05 18:03:41 +02:00 committed by GitHub
parent 5234e6e242
commit d62bab6e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -959,7 +959,7 @@ index 0000000000000000000000000000000000000000..b69803cbf2db2781aa050b145bf88468
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8df3b2f914 100644
index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..7f9ca45d403000d26d84198d8f88cd484fd6cf79 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@ -979,7 +979,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
public BlockRedstoneWire(BlockBase.Info blockbase_info) {
super(blockbase_info);
@@ -212,6 +214,120 @@ public class BlockRedstoneWire extends Block {
@@ -212,6 +214,121 @@ public class BlockRedstoneWire extends Block {
return iblockdata.d(iblockaccess, blockposition, EnumDirection.UP) || iblockdata.a(Blocks.HOPPER);
}
@ -995,6 +995,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
+ private void updateSurroundingRedstone(World worldIn, BlockPosition pos, IBlockData state, BlockPosition source) {
+ if (worldIn.paperConfig.useEigencraftRedstone) {
+ turbo.updateSurroundingRedstone(worldIn, pos, state, source);
+ return;
+ }
+ a(worldIn, pos, state);
+ }
@ -1100,7 +1101,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
private void a(World world, BlockPosition blockposition, IBlockData iblockdata) {
int i = this.a(world, blockposition);
@@ -281,6 +397,8 @@ public class BlockRedstoneWire extends Block {
@@ -281,6 +398,8 @@ public class BlockRedstoneWire extends Block {
return Math.max(i, j - 1);
}
@ -1109,7 +1110,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
private int o(IBlockData iblockdata) {
return iblockdata.a((Block) this) ? (Integer) iblockdata.get(BlockRedstoneWire.POWER) : 0;
}
@@ -303,7 +421,7 @@ public class BlockRedstoneWire extends Block {
@@ -303,7 +422,7 @@ public class BlockRedstoneWire extends Block {
@Override
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
if (!iblockdata1.a(iblockdata.getBlock()) && !world.isClientSide) {
@ -1118,7 +1119,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator();
while (iterator.hasNext()) {
@@ -330,7 +448,7 @@ public class BlockRedstoneWire extends Block {
@@ -330,7 +449,7 @@ public class BlockRedstoneWire extends Block {
world.applyPhysics(blockposition.shift(enumdirection), this);
}
@ -1127,7 +1128,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..6abc3d4cfbe8f5cc1dbe83031d90ee8d
this.d(world, blockposition);
}
}
@@ -365,7 +483,7 @@ public class BlockRedstoneWire extends Block {
@@ -365,7 +484,7 @@ public class BlockRedstoneWire extends Block {
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
if (!world.isClientSide) {
if (iblockdata.canPlace(world, blockposition)) {