Archiviert
13
0

Missed a comment

Dieser Commit ist enthalten in:
Zach Brown 2016-02-13 20:11:49 -06:00
Ursprung 258dd89aa6
Commit 7022e9325f

Datei anzeigen

@ -1,4 +1,4 @@
From 1e12b3e087169ed8f6a39366fc8729298f75c090 Mon Sep 17 00:00:00 2001
From 779c16a7b1360256e47ea557c27bdab3f6543a58 Mon Sep 17 00:00:00 2001
From: CullanP <cullanpage@gmail.com>
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);