mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-01-24 12:44:56 +08:00
Allow copying item stacks with damage of > Byte.MAX_VALUE. Closes #972
This commit is contained in:
parent
68c821d8a6
commit
7922c437bf
@ -457,7 +457,7 @@ public boolean generateTallRedwoodTree(EditSession editSession, Vector pt) {
|
||||
@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 @@ private boolean setContainerBlockContents(Vector pt, BaseItemStack[] contents) {
|
||||
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<Integer, Integer> entry : contents[i].getEnchantments().entrySet()) {
|
||||
toAdd.addEnchantment(Enchantment.getById(entry.getKey()), entry.getValue());
|
||||
|
Loading…
Reference in New Issue
Block a user