mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
[Bleeding] Fixed item duping in certain occasions. Fixes BUKKIT-1310
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user