mapping: fixed custom item conversion (#4)

This commit is contained in:
Doge
2025-02-06 07:24:49 +03:00
committed by GitHub
parent 199c1628b1
commit 2672b73e4a
2 changed files with 12 additions and 2 deletions

View File

@@ -498,7 +498,7 @@ func (t *DefaultItemTranslator) DowngradeItemPackets(pks []packet.Packet, _ *min
panic(itemType)
}
} else {
t.latest.RegisterEntry(entry.Name)
t.latest.RegisterEntryRID(entry.Name, int32(entry.RuntimeID))
entry.RuntimeID = int16(t.mapping.RegisterEntry(entry.Name))
}
pk.Items[i] = entry
@@ -717,7 +717,7 @@ func (t *DefaultItemTranslator) UpgradeItemPackets(pks []packet.Packet, _ *minec
panic(itemType)
}
} else {
t.latest.RegisterEntry(entry.Name)
t.latest.RegisterEntryRID(entry.Name, int32(entry.RuntimeID))
entry.RuntimeID = int16(t.mapping.RegisterEntry(entry.Name))
}
pk.Items[i] = entry