mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-16 15:15:20 +01:00
Read FlatItem correctly & fix incoming Item type
This commit is contained in:
parent
444eabcebf
commit
9dfbe3b263
@ -17,6 +17,7 @@ public class FlatItemType extends BaseItemType {
|
||||
} else {
|
||||
Item item = new Item();
|
||||
item.setId(id);
|
||||
item.setAmount(buffer.readByte());
|
||||
item.setTag(Type.NBT.read(buffer));
|
||||
return item;
|
||||
}
|
||||
|
@ -55,9 +55,5 @@ public class MetadataRewriter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Metadata metadata : metadatas) {
|
||||
System.out.println(metadata.getMetaType() instanceof MetaType1_13);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class InventoryPackets {
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
Item item = wrapper.get(Type.FLAT_ITEM, 0);
|
||||
Item item = wrapper.get(Type.ITEM, 0);
|
||||
toServer(item);
|
||||
}
|
||||
});
|
||||
@ -155,7 +155,7 @@ public class InventoryPackets {
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
Item item = wrapper.get(Type.FLAT_ITEM, 0);
|
||||
Item item = wrapper.get(Type.ITEM, 0);
|
||||
toServer(item);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user