Always use the newest item type in ItemTranslator#viaB1_8toMc

Closes https://github.com/ViaVersion/ViaFabricPlus/issues/362
This commit is contained in:
FlorianMichael 2024-02-22 13:20:31 +01:00
parent 73711a7174
commit eabb84e938
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -110,7 +110,7 @@ public class ItemTranslator {
wrapper.read(Type.UNSIGNED_BYTE); // sync id
wrapper.read(Type.VAR_INT); // revision
wrapper.read(Type.SHORT); // slot
final Item viaItem = wrapper.read(Type.ITEM1_13_2); // item
final Item viaItem = wrapper.read(getItemType(ProtocolTranslator.NATIVE_VERSION)); // item
final ItemStack mcItem = new ItemStack(Registries.ITEM.get(viaItem.identifier()));
mcItem.setCount(viaItem.amount());
mcItem.setDamage(viaItem.data());