Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2025-01-07 05:40:11 +01:00
Missed a comment
Dieser Commit ist enthalten in:
Ursprung
258dd89aa6
Commit
7022e9325f
@ -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>
|
From: CullanP <cullanpage@gmail.com>
|
||||||
Date: Thu, 11 Feb 2016 21:43:17 -0700
|
Date: Thu, 11 Feb 2016 21:43:17 -0700
|
||||||
Subject: [PATCH] Avoid hopper searches if there are no items
|
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.
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -34,6 +34,11 @@ public class Chunk {
|
@@ -34,6 +34,11 @@ public class Chunk {
|
||||||
@ -43,7 +43,7 @@ index c636da3..7afcd91 100644
|
|||||||
// Spigot start - increment creature type count
|
// Spigot start - increment creature type count
|
||||||
// Keep this synced up with World.a(Class)
|
// Keep this synced up with World.a(Class)
|
||||||
if (entity instanceof EntityInsentient) {
|
if (entity instanceof EntityInsentient) {
|
||||||
@@ -767,6 +779,12 @@ public class Chunk {
|
@@ -767,6 +779,13 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.entitySlices[i].remove(entity);
|
this.entitySlices[i].remove(entity);
|
||||||
@ -53,10 +53,11 @@ index c636da3..7afcd91 100644
|
|||||||
+ } else if (entity instanceof IInventory) {
|
+ } else if (entity instanceof IInventory) {
|
||||||
+ inventoryEntityCounts[i]--;
|
+ inventoryEntityCounts[i]--;
|
||||||
+ }
|
+ }
|
||||||
|
+ // PaperSpigot end
|
||||||
// Spigot start - decrement creature type count
|
// Spigot start - decrement creature type count
|
||||||
// Keep this synced up with World.a(Class)
|
// Keep this synced up with World.a(Class)
|
||||||
if (entity instanceof EntityInsentient) {
|
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) {
|
for (int k = i; k <= j; ++k) {
|
||||||
if (!this.entitySlices[k].isEmpty()) {
|
if (!this.entitySlices[k].isEmpty()) {
|
||||||
Iterator iterator = this.entitySlices[k].iterator();
|
Iterator iterator = this.entitySlices[k].iterator();
|
||||||
@ -73,7 +74,7 @@ index c636da3..7afcd91 100644
|
|||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity1 = (Entity) iterator.next();
|
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);
|
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
|
||||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren