Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +01:00
Ursprung
070c7f5808
Commit
1251d43709
@ -329,9 +329,10 @@ public class InventoryPackets {
|
|||||||
ListTag ench = tag.get("ench");
|
ListTag ench = tag.get("ench");
|
||||||
ListTag enchantments = new ListTag(CompoundTag.class);
|
ListTag enchantments = new ListTag(CompoundTag.class);
|
||||||
for (Tag enchEntry : ench) {
|
for (Tag enchEntry : ench) {
|
||||||
if (enchEntry instanceof CompoundTag) {
|
NumberTag idTag;
|
||||||
|
if (enchEntry instanceof CompoundTag && (idTag = ((CompoundTag) enchEntry).get("id")) != null) {
|
||||||
CompoundTag enchantmentEntry = new CompoundTag();
|
CompoundTag enchantmentEntry = new CompoundTag();
|
||||||
short oldId = ((NumberTag) ((CompoundTag) enchEntry).get("id")).asShort();
|
short oldId = idTag.asShort();
|
||||||
String newId = Protocol1_13To1_12_2.MAPPINGS.getOldEnchantmentsIds().get(oldId);
|
String newId = Protocol1_13To1_12_2.MAPPINGS.getOldEnchantmentsIds().get(oldId);
|
||||||
if (newId == null) {
|
if (newId == null) {
|
||||||
newId = "viaversion:legacy/" + oldId;
|
newId = "viaversion:legacy/" + oldId;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren