remove part of my hopper patch, not sure its doing what I intended

This commit is contained in:
Aikar 2016-06-04 11:52:25 -04:00
parent f4a43ec92d
commit e483da14b5
1 changed files with 7 additions and 15 deletions

View File

@ -1,4 +1,4 @@
From 6a110c2813f8b97f35921b67d31e6e2f3f21df4a Mon Sep 17 00:00:00 2001 From 25164352de96cb913f1bdf3f97257621ac6c70c3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 22:09:52 -0400 Date: Wed, 27 Apr 2016 22:09:52 -0400
Subject: [PATCH] Improve Minecraft Hopper Performance Subject: [PATCH] Improve Minecraft Hopper Performance
@ -27,26 +27,18 @@ index f59e6f8..85f97cc 100644
this.h = iblockdata.getBlock().toLegacyData(iblockdata); this.h = iblockdata.getBlock().toLegacyData(iblockdata);
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index de458c8..ec0b1ca 100644 index de458c8..a695207 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java --- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -190,12 +190,15 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -190,6 +190,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
} }
// Paper end // Paper end
} }
+ +
+ if (!isCooledDown() && isFull()) { setCooldown(world.spigotConfig.hopperTransfer); } // Paper
return false; return false;
} else { } else {
return false; return false;
} @@ -490,7 +491,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
+ boolean isFull() { return q(); } // Paper // OBFHELPER
private boolean q() {
ItemStack[] aitemstack = this.items;
int i = aitemstack.length;
@@ -490,7 +493,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
boolean flag = false; boolean flag = false;
if (itemstack1 == null) { if (itemstack1 == null) {
@ -56,7 +48,7 @@ index de458c8..ec0b1ca 100644
itemstack = null; itemstack = null;
flag = true; flag = true;
} else if (a(itemstack1, itemstack)) { } else if (a(itemstack1, itemstack)) {
@@ -510,7 +515,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -510,7 +513,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
tileentityhopper.setCooldown(tileentityhopper.world.spigotConfig.hopperTransfer); // Spigot tileentityhopper.setCooldown(tileentityhopper.world.spigotConfig.hopperTransfer); // Spigot
} }
@ -65,7 +57,7 @@ index de458c8..ec0b1ca 100644
} }
iinventory.update(); iinventory.update();
@@ -585,6 +590,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -585,6 +588,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
this.g = i; this.g = i;
} }
@ -74,5 +66,5 @@ index de458c8..ec0b1ca 100644
return this.g > 0; return this.g > 0;
} }
-- --
2.7.4 (Apple Git-66) 2.8.3