mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
Some assumptions are better than others.
This commit is contained in:
parent
0a45c3ebf7
commit
47b57e6bcf
@ -504,7 +504,7 @@ public abstract class Container {
|
|||||||
itemstack.count -= maxStack - itemstack1.count;
|
itemstack.count -= maxStack - itemstack1.count;
|
||||||
itemstack1.count = maxStack;
|
itemstack1.count = maxStack;
|
||||||
slot.f();
|
slot.f();
|
||||||
flag1 = itemstack.count == 0; // Don't give a success return if we have leftovers
|
flag1 = true;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@ -530,10 +530,8 @@ public abstract class Container {
|
|||||||
if (itemstack1 == null) {
|
if (itemstack1 == null) {
|
||||||
slot.set(itemstack.cloneItemStack());
|
slot.set(itemstack.cloneItemStack());
|
||||||
slot.f();
|
slot.f();
|
||||||
// CraftBukkit start - Don't assume entire stack went in
|
itemstack.count = 0;
|
||||||
itemstack.count -= slot.getItem().count;
|
flag1 = true;
|
||||||
flag1 = itemstack.count == 0;
|
|
||||||
// CraftBukkit end
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user