mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 01:12:47 +01:00
Fixed an exploit allowing item duplication upon death
This commit is contained in:
parent
e0d8c1d7ac
commit
7de9091036
1 changed files with 2 additions and 0 deletions
|
@ -94,12 +94,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
for (int i = 0; i < inventory.a.length; ++i) {
|
for (int i = 0; i < inventory.a.length; ++i) {
|
||||||
if (inventory.a[i] != null) {
|
if (inventory.a[i] != null) {
|
||||||
loot.add(new CraftItemStack(inventory.a[i]));
|
loot.add(new CraftItemStack(inventory.a[i]));
|
||||||
|
inventory.a[i] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < inventory.b.length; ++i) {
|
for (int i = 0; i < inventory.b.length; ++i) {
|
||||||
if (inventory.b[i] != null) {
|
if (inventory.b[i] != null) {
|
||||||
loot.add(new CraftItemStack(inventory.b[i]));
|
loot.add(new CraftItemStack(inventory.b[i]));
|
||||||
|
inventory.a[i] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue