From 7de9091036f099011d6843ce1ccbbcbf3e7dbf53 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Tue, 8 Mar 2011 20:54:52 +0000 Subject: Fixed an exploit allowing item duplication upon death --- src/main/java/net/minecraft/server/EntityPlayer.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/net/minecraft/server') diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 5c36727d..28756e98 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -94,12 +94,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { for (int i = 0; i < inventory.a.length; ++i) { if (inventory.a[i] != null) { loot.add(new CraftItemStack(inventory.a[i])); + inventory.a[i] = null; } } for (int i = 0; i < inventory.b.length; ++i) { if (inventory.b[i] != null) { loot.add(new CraftItemStack(inventory.b[i])); + inventory.a[i] = null; } } -- cgit v1.2.3