aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Spigot-Server-Patches/0089-Avoid-hopper-searches-if-there-are-no-items.patch11
1 files changed, 6 insertions, 5 deletions
diff --git a/Spigot-Server-Patches/0089-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0089-Avoid-hopper-searches-if-there-are-no-items.patch
index e61b7c65d8..2da90d63a1 100644
--- a/Spigot-Server-Patches/0089-Avoid-hopper-searches-if-there-are-no-items.patch
+++ b/Spigot-Server-Patches/0089-Avoid-hopper-searches-if-there-are-no-items.patch
@@ -1,4 +1,4 @@
-From 1e12b3e087169ed8f6a39366fc8729298f75c090 Mon Sep 17 00:00:00 2001
+From 779c16a7b1360256e47ea557c27bdab3f6543a58 Mon Sep 17 00:00:00 2001
From: CullanP <[email protected]>
Date: Thu, 11 Feb 2016 21:43:17 -0700
Subject: [PATCH] Avoid hopper searches if there are no items
@@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
Combined, this adds up a lot.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
-index c636da3..7afcd91 100644
+index c636da3..aa555f5 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -34,6 +34,11 @@ public class Chunk {
@@ -43,7 +43,7 @@ index c636da3..7afcd91 100644
// Spigot start - increment creature type count
// Keep this synced up with World.a(Class)
if (entity instanceof EntityInsentient) {
-@@ -767,6 +779,12 @@ public class Chunk {
+@@ -767,6 +779,13 @@ public class Chunk {
}
this.entitySlices[i].remove(entity);
@@ -53,10 +53,11 @@ index c636da3..7afcd91 100644
+ } else if (entity instanceof IInventory) {
+ inventoryEntityCounts[i]--;
+ }
++ // PaperSpigot end
// Spigot start - decrement creature type count
// Keep this synced up with World.a(Class)
if (entity instanceof EntityInsentient) {
-@@ -955,7 +973,15 @@ public class Chunk {
+@@ -955,7 +974,15 @@ public class Chunk {
for (int k = i; k <= j; ++k) {
if (!this.entitySlices[k].isEmpty()) {
Iterator iterator = this.entitySlices[k].iterator();
@@ -73,7 +74,7 @@ index c636da3..7afcd91 100644
while (iterator.hasNext()) {
Entity entity1 = (Entity) iterator.next();
-@@ -988,7 +1014,18 @@ public class Chunk {
+@@ -988,7 +1015,18 @@ public class Chunk {
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);