mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-23 12:25:24 +01:00
Fix trade item rewrites
This commit is contained in:
parent
01018fe600
commit
c186d13ae5
@ -185,7 +185,6 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
wrapper.write(Type.STRING, "minecraft:trader_list");
|
||||
// wrapper.read(Type.STRING); // Remove channel
|
||||
|
||||
int windowId = wrapper.read(Type.VAR_INT);
|
||||
wrapper.write(Type.INT, windowId);
|
||||
|
@ -70,13 +70,13 @@ public class InventoryPackets1_13_1 {
|
||||
toClient(input);
|
||||
//Output Item
|
||||
Item output = wrapper.passthrough(Type.FLAT_ITEM);
|
||||
toClient(input);
|
||||
toClient(output);
|
||||
|
||||
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); //Has second item
|
||||
if (secondItem) {
|
||||
//Second Item
|
||||
Item second = wrapper.passthrough(Type.FLAT_ITEM);
|
||||
toClient(input);
|
||||
toClient(second);
|
||||
}
|
||||
|
||||
wrapper.passthrough(Type.BOOLEAN); //Trade disabled
|
||||
|
Loading…
Reference in New Issue
Block a user