mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-01 17:01:45 +01:00
parent
e13643d040
commit
0537c04ef6
1 changed files with 6 additions and 6 deletions
|
@ -43,9 +43,9 @@ public class EnchantmentTranslator extends NbtItemStackTranslator {
|
|||
@Override
|
||||
public void translateToBedrock(GeyserSession session, CompoundTag itemTag, ItemMapping mapping) {
|
||||
List<Tag> newTags = new ArrayList<>();
|
||||
if (itemTag.contains("Enchantments")) {
|
||||
ListTag enchantmentTag = itemTag.get("Enchantments");
|
||||
for (Tag tag : enchantmentTag.getValue()) {
|
||||
Tag enchantmentTag = itemTag.get("Enchantments");
|
||||
if (enchantmentTag instanceof ListTag listTag) {
|
||||
for (Tag tag : listTag.getValue()) {
|
||||
if (!(tag instanceof CompoundTag)) continue;
|
||||
|
||||
CompoundTag bedrockTag = remapEnchantment((CompoundTag) tag);
|
||||
|
@ -53,9 +53,9 @@ public class EnchantmentTranslator extends NbtItemStackTranslator {
|
|||
}
|
||||
itemTag.remove("Enchantments");
|
||||
}
|
||||
if (itemTag.contains("StoredEnchantments")) {
|
||||
ListTag enchantmentTag = itemTag.get("StoredEnchantments");
|
||||
for (Tag tag : enchantmentTag.getValue()) {
|
||||
enchantmentTag = itemTag.get("StoredEnchantments");
|
||||
if (enchantmentTag instanceof ListTag listTag) {
|
||||
for (Tag tag : listTag.getValue()) {
|
||||
if (!(tag instanceof CompoundTag)) continue;
|
||||
|
||||
CompoundTag bedrockTag = remapEnchantment((CompoundTag) tag);
|
||||
|
|
Loading…
Reference in a new issue