geforkt von Mirrors/Paper
Fix bug with hopper optimizations when amount > 3 - Closes #1011
Dieser Commit ist enthalten in:
Ursprung
3d9d0a7227
Commit
c28c88eb35
@ -60,7 +60,7 @@ index 8e2d55a73..fe2df18df 100644
|
||||
|
||||
this.g = iblockdata.getBlock().toLegacyData(iblockdata);
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
index e9315f2d5..6ec292714 100644
|
||||
index e9315f2d5..5198a590a 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||
@ -94,11 +94,11 @@ index e9315f2d5..6ec292714 100644
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ final ItemStack itemstack1 = addItem(this, iinventory, itemstack, enumdirection);
|
||||
+
|
||||
+ if (itemstack1.isEmpty()) {
|
||||
+ final ItemStack itemstack2 = addItem(this, iinventory, itemstack, enumdirection);
|
||||
+ final int remaining = itemstack2.getCount();
|
||||
+ if (remaining != moved) {
|
||||
+ origItemStack = origItemStack.cloneItemStack();
|
||||
+ origItemStack.setCount(origCount - moved);
|
||||
+ origItemStack.setCount(origCount - moved + remaining);
|
||||
+ this.setItem(i, origItemStack);
|
||||
+ iinventory.update();
|
||||
+ return true;
|
||||
@ -132,9 +132,10 @@ index e9315f2d5..6ec292714 100644
|
||||
+ }
|
||||
+
|
||||
+ final ItemStack itemstack2 = addItem(iinventory, ihopper, itemstack, null);
|
||||
+ if (itemstack2.isEmpty()) {
|
||||
+ final int remaining = itemstack2.getCount();
|
||||
+ if (remaining != moved) {
|
||||
+ origItemStack = origItemStack.cloneItemStack();
|
||||
+ origItemStack.setCount(origCount - moved);
|
||||
+ origItemStack.setCount(origCount - moved + remaining);
|
||||
+ IGNORE_TILE_UPDATES = true;
|
||||
+ iinventory.setItem(i, origItemStack);
|
||||
+ IGNORE_TILE_UPDATES = false;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren