Fix hopper suck in patch bug
was checking for ItemStack's instead of EntityItem
This commit is contained in:
parent
f4a62ba294
commit
9dffc43aec
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 34c7679b3d20769bbaeba17d3ee50ad87bde447a Mon Sep 17 00:00:00 2001
|
From ffe9aada565efa029e3c8ebaed7c5e94b286dbe9 Mon Sep 17 00:00:00 2001
|
||||||
From: CullanP <cullanpage@gmail.com>
|
From: CullanP <cullanpage@gmail.com>
|
||||||
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
||||||
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 42fedb7..806e499 100644
|
index 42fedb7..13d43d5 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
|
||||||
@@ -46,6 +46,13 @@ public class Chunk {
|
@@ -46,6 +46,13 @@ public class Chunk {
|
||||||
|
@ -81,7 +81,7 @@ index 42fedb7..806e499 100644
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ int[] counts;
|
+ int[] counts;
|
||||||
+ if (ItemStack.class.isAssignableFrom(oclass)) {
|
+ if (EntityItem.class.isAssignableFrom(oclass)) {
|
||||||
+ counts = itemCounts;
|
+ counts = itemCounts;
|
||||||
+ } else if (IInventory.class.isAssignableFrom(oclass)) {
|
+ } else if (IInventory.class.isAssignableFrom(oclass)) {
|
||||||
+ counts = inventoryEntityCounts;
|
+ counts = inventoryEntityCounts;
|
||||||
|
@ -95,5 +95,5 @@ index 42fedb7..806e499 100644
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
--
|
--
|
||||||
2.8.0
|
2.8.2
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue