[Bleeding] Fixed item duping in certain occasions. Fixes BUKKIT-1310

This commit is contained in:
feildmaster
2012-03-25 17:53:59 -05:00
committed by Warren Loo
parent 0c9b59e071
commit c30e339af6
3 changed files with 9 additions and 12 deletions

View File

@@ -164,7 +164,7 @@ public class Block {
public final Material material;
public float frictionFactor;
private String name;
protected ArrayList<ItemStack> dropList = new ArrayList<ItemStack>(); // CraftBukkit
public ArrayList<ItemStack> dropList = new ArrayList<ItemStack>(1); // CraftBukkit
protected Block(int i, Material material) {
this.bR = true;
@@ -338,6 +338,7 @@ public class Block {
}
public final void b(World world, int i, int j, int k, int l, int i1) {
this.dropList.clear(); // CraftBukkit
this.dropNaturally(world, i, j, k, l, 1.0F, i1);
this.doActualDrop(world, i, j, k); // CraftBukkit
}
@@ -549,10 +550,6 @@ public class Block {
this.dropList.clear();
}
public void setDrops(ArrayList<ItemStack> drops) {
this.dropList = drops;
}
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
// CraftBukkit end
if (this.h() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman.inventory)) {