Fix trade item rewrites

This commit is contained in:
KennyTV 2019-07-06 19:36:50 +02:00
parent 01018fe600
commit c186d13ae5
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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