mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
SPIGOT-2977: Pass setAmount(0) through to wrapped ItemStack.
This class needs to be rewritten with more consistent semantics and alignment with Minecraft losing null, but that is probably a job for 1.12
This commit is contained in:
parent
e2a288c863
commit
5715b3a6d9
@ -147,10 +147,10 @@ public final class CraftItemStack extends ItemStack {
|
|||||||
if (handle == null) {
|
if (handle == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handle.setCount(amount);
|
||||||
if (amount == 0) {
|
if (amount == 0) {
|
||||||
handle = null;
|
handle = null;
|
||||||
} else {
|
|
||||||
handle.setCount(amount);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user