mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Fix enchantment nbt writing
This commit is contained in:
parent
b6ab689b10
commit
8410ac51c3
@ -103,10 +103,9 @@ public final class NBTUtils {
|
|||||||
for (Map.Entry<Enchantment, Short> entry : enchantmentMap.entrySet()) {
|
for (Map.Entry<Enchantment, Short> entry : enchantmentMap.entrySet()) {
|
||||||
final Enchantment enchantment = entry.getKey();
|
final Enchantment enchantment = entry.getKey();
|
||||||
final short level = entry.getValue();
|
final short level = entry.getValue();
|
||||||
|
|
||||||
enchantList.add(new NBTCompound()
|
enchantList.add(new NBTCompound()
|
||||||
.setShort("lvl", level)
|
.setShort("lvl", level)
|
||||||
.setString("id", "minecraft:" + enchantment.name().toLowerCase())
|
.setString("id", enchantment.name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
nbt.set(listName, enchantList);
|
nbt.set(listName, enchantList);
|
||||||
|
Loading…
Reference in New Issue
Block a user