forked from GeyserMC/Geyser
Remove debug messages
This commit is contained in:
parent
88648f705e
commit
3812712a06
2 changed files with 0 additions and 5 deletions
|
@ -140,7 +140,6 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
||||||
javaSlot, null, WindowAction.FILL_STACK, FillStackParam.FILL);
|
javaSlot, null, WindowAction.FILL_STACK, FillStackParam.FILL);
|
||||||
session.getDownstream().getSession().send(fillStackPacket);
|
session.getDownstream().getSession().send(fillStackPacket);
|
||||||
translator.updateInventory(session, inventory); //bedrock fill stack can sometimes differ from java version, refresh and let server change slots
|
translator.updateInventory(session, inventory); //bedrock fill stack can sometimes differ from java version, refresh and let server change slots
|
||||||
System.out.println(fillStackPacket);
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//left/right click
|
//left/right click
|
||||||
|
@ -157,7 +156,6 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
||||||
inventory.getNextTransactionId(), javaSlot,
|
inventory.getNextTransactionId(), javaSlot,
|
||||||
refresh ? new ItemStack(1, 127, new CompoundTag("")) : InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(containerAction.getFromItem())), //send invalid item stack to refresh slot
|
refresh ? new ItemStack(1, 127, new CompoundTag("")) : InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(containerAction.getFromItem())), //send invalid item stack to refresh slot
|
||||||
WindowAction.CLICK_ITEM, rightClick ? ClickItemParam.RIGHT_CLICK : ClickItemParam.LEFT_CLICK);
|
WindowAction.CLICK_ITEM, rightClick ? ClickItemParam.RIGHT_CLICK : ClickItemParam.LEFT_CLICK);
|
||||||
System.out.println(clickPacket);
|
|
||||||
session.getDownstream().getSession().send(clickPacket);
|
session.getDownstream().getSession().send(clickPacket);
|
||||||
inventory.getItems()[javaSlot] = TranslatorsInit.getItemTranslator().translateToJava(containerAction.getToItem());
|
inventory.getItems()[javaSlot] = TranslatorsInit.getItemTranslator().translateToJava(containerAction.getToItem());
|
||||||
translator.updateSlot(session, inventory, javaSlot);
|
translator.updateSlot(session, inventory, javaSlot);
|
||||||
|
@ -196,13 +194,11 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
||||||
fromSlot, InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(fromAction.getFromItem())), WindowAction.CLICK_ITEM,
|
fromSlot, InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(fromAction.getFromItem())), WindowAction.CLICK_ITEM,
|
||||||
ClickItemParam.LEFT_CLICK);
|
ClickItemParam.LEFT_CLICK);
|
||||||
session.getDownstream().getSession().send(leftClick1Packet);
|
session.getDownstream().getSession().send(leftClick1Packet);
|
||||||
System.out.println(leftClick1Packet);
|
|
||||||
//release fromAction item into toAction slot
|
//release fromAction item into toAction slot
|
||||||
ClientWindowActionPacket leftClick2Packet = new ClientWindowActionPacket(inventory.getId(), inventory.getNextTransactionId(),
|
ClientWindowActionPacket leftClick2Packet = new ClientWindowActionPacket(inventory.getId(), inventory.getNextTransactionId(),
|
||||||
toSlot, InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(toAction.getFromItem())), WindowAction.CLICK_ITEM,
|
toSlot, InventoryUtils.fixNbt(TranslatorsInit.getItemTranslator().translateToJava(toAction.getFromItem())), WindowAction.CLICK_ITEM,
|
||||||
ClickItemParam.LEFT_CLICK);
|
ClickItemParam.LEFT_CLICK);
|
||||||
session.getDownstream().getSession().send(leftClick2Packet);
|
session.getDownstream().getSession().send(leftClick2Packet);
|
||||||
System.out.println(leftClick2Packet);
|
|
||||||
//test if swapping two items or moving one item
|
//test if swapping two items or moving one item
|
||||||
//if swapping then complete it
|
//if swapping then complete it
|
||||||
if (fromAction.getToItem().getId() != 0) {
|
if (fromAction.getToItem().getId() != 0) {
|
||||||
|
|
|
@ -37,7 +37,6 @@ public class JavaConfirmTransactionTranslator extends PacketTranslator<ServerCon
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(ServerConfirmTransactionPacket packet, GeyserSession session) {
|
public void translate(ServerConfirmTransactionPacket packet, GeyserSession session) {
|
||||||
System.out.println(packet);
|
|
||||||
if (!packet.isAccepted()) {
|
if (!packet.isAccepted()) {
|
||||||
ClientConfirmTransactionPacket confirmPacket = new ClientConfirmTransactionPacket(packet.getWindowId(), packet.getActionId(), true);
|
ClientConfirmTransactionPacket confirmPacket = new ClientConfirmTransactionPacket(packet.getWindowId(), packet.getActionId(), true);
|
||||||
session.getDownstream().getSession().send(confirmPacket);
|
session.getDownstream().getSession().send(confirmPacket);
|
||||||
|
|
Loading…
Reference in a new issue