Updated Upstream (Paper)

Upstream has released updates that appears to apply and compile correctly

Paper Changes:
bc447dc1 Track correct branch for /version
7dbceea2 Restore zero-tick farms fix
55944bc6 Revert "Drop fix zero-tick farms (Fixes #2736)"
3b93c5b1 Drop fix zero-tick farms (Fixes #2736)
31bc07cb Drop hopper optimization patch
788e0338 Don't set the count on already empty items in hopper moves (Fixes #2735)
This commit is contained in:
William Blake Galbreath
2019-12-13 17:03:14 -06:00
parent 18ebfc0366
commit 4d725d77b8
6 changed files with 22 additions and 22 deletions

View File

@@ -1,27 +1,27 @@
From 3deb8c03cbe3d16b0906e037ebcb2be02aa17783 Mon Sep 17 00:00:00 2001
From 5a63124266296c98b6ff07dfd11b9133476c01f8 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 18 Oct 2019 23:58:56 -0500
Subject: [PATCH] Add block and fluid tick events
---
.../java/net/minecraft/server/WorldServer.java | 8 ++++++--
.../java/net/minecraft/server/WorldServer.java | 8 ++++----
.../net/pl3x/purpur/PurpurWorldConfig.java | 7 +++++++
.../org/bukkit/craftbukkit/CraftWorld.java | 18 ++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
3 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f6431f1de6..e70bc4d4dc 100644
index 6b28d84203..9279a41b60 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -580,13 +580,15 @@ public class WorldServer extends World {
@@ -580,15 +580,13 @@ public class WorldServer extends World {
gameprofilerfiller.enter("randomTick");
IBlockData iblockdata = chunksection.getType(blockposition2.getX() - j, blockposition2.getY() - j1, blockposition2.getZ() - k);
- if (iblockdata.q()) {
- iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809
+ if (iblockdata.q() && (!purpurConfig.blockTickEvent || new net.pl3x.purpur.event.block.BlockTickEvent(getWorld(), blockposition2.x, blockposition2.y, blockposition2.z, true).callEvent())) { // Purpur
+ iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809
iblockdata.b(this, blockposition2, this.random);
+ iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809
- iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809
}
Fluid fluid = iblockdata.getFluid();
@@ -31,7 +31,7 @@ index f6431f1de6..e70bc4d4dc 100644
fluid.b(this, blockposition2, this.random);
}
@@ -675,6 +677,7 @@ public class WorldServer extends World {
@@ -677,6 +675,7 @@ public class WorldServer extends World {
Fluid fluid = this.getFluid(nextticklistentry.a);
if (fluid.getType() == nextticklistentry.b()) {
@@ -39,14 +39,14 @@ index f6431f1de6..e70bc4d4dc 100644
fluid.a((World) this, nextticklistentry.a);
}
@@ -684,6 +687,7 @@ public class WorldServer extends World {
@@ -686,6 +685,7 @@ public class WorldServer extends World {
IBlockData iblockdata = this.getType(nextticklistentry.a);
if (iblockdata.getBlock() == nextticklistentry.b()) {
+ if (purpurConfig.blockTickEvent && !new net.pl3x.purpur.event.block.BlockTickEvent(getWorld(), nextticklistentry.a.x, nextticklistentry.a.y, nextticklistentry.a.z).callEvent()) return; // Purpur
iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809
iblockdata.a(this, nextticklistentry.a, this.random);
iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index f687444604..3ad3415c4a 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java