Fix more issues with timings

- fixed usage of timings IDs (fixes region view)
- fixed more duplicated tick handlers
This commit is contained in:
Shane Freeder
2019-07-08 03:54:40 +01:00
parent c8bc57c719
commit 0a8afdacb6
8 changed files with 76 additions and 88 deletions

View File

@@ -1,4 +1,4 @@
From 8565eed0a4de2941afd0ac2f3b8d2654f0197e23 Mon Sep 17 00:00:00 2001
From 9532fdb3c8f23e40e565554862ba04bd37b65c85 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm
@@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 2299860b..91c809b7 100644
index 2299860b81..91c809b7ce 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -434,4 +434,14 @@ public class PaperWorldConfig {
@@ -39,7 +39,7 @@ index 2299860b..91c809b7 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 00000000..cf5661f1
index 0000000000..cf5661f1c5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,912 @@
@@ -956,7 +956,7 @@ index 00000000..cf5661f1
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 7ce9cdb8..6b5015ce 100644
index 7ce9cdb853..6b5015ce5f 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@@ -1124,7 +1124,7 @@ index 7ce9cdb8..6b5015ce 100644
c(iblockdata, world, blockposition);
world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 26f3b472..1eb689c6 100644
index 1f28358f9e..7368713415 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -594,6 +594,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1135,7 +1135,7 @@ index 26f3b472..1eb689c6 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition);
@@ -1340,6 +1341,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1334,6 +1335,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
}