From 7922c437bf4032a70039d7969256f73955200bb7 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sun, 8 Jan 2012 21:31:57 -0800 Subject: [PATCH] Allow copying item stacks with damage of > Byte.MAX_VALUE. Closes #972 --- src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index 3feb740ae..cd713f6d8 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -457,7 +457,7 @@ public class BukkitWorld extends LocalWorld { @Override public void dropItem(Vector pt, BaseItemStack item) { ItemStack bukkitItem = new ItemStack(item.getType(), item.getAmount(), - (byte) item.getDamage()); + item.getDamage()); world.dropItemNaturally(BukkitUtil.toLocation(world, pt), bukkitItem); } @@ -685,7 +685,7 @@ public class BukkitWorld extends LocalWorld { if (contents[i] != null) { ItemStack toAdd = new ItemStack(contents[i].getType(), contents[i].getAmount(), - (byte) contents[i].getDamage()); + contents[i].getDamage()); try { for (Map.Entry entry : contents[i].getEnchantments().entrySet()) { toAdd.addEnchantment(Enchantment.getById(entry.getKey()), entry.getValue());