mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 11:26:42 +00:00
Use the correct Map<String, Tag> when writing enchantments
This commit is contained in:
@ -117,7 +117,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock, ContainerB
|
||||
ListTag enchlist = new ListTag("ench", CompoundTag.class, list);
|
||||
for(Entry<Integer, Integer> entry : item.getEnchantments().entrySet()) {
|
||||
Map<String, Tag> enchantment = new HashMap<String, Tag>();
|
||||
CompoundTag enchantcompound = new CompoundTag(null, ench);
|
||||
CompoundTag enchantcompound = new CompoundTag(null, enchantment);
|
||||
enchantment.put("id", new ShortTag("id", entry.getKey().shortValue()));
|
||||
enchantment.put("lvl", new ShortTag("lvl", entry.getValue().shortValue()));
|
||||
list.add(enchantcompound);
|
||||
@ -178,7 +178,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock, ContainerB
|
||||
itemstack.getEnchantments().put((int) enchid, (int)enchlvl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
newItems[slot] = itemstack;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user