forked from GeyserMC/Geyser
InventoryUtils: Don't send Java packet on hotbar item selection (#1301)
The Bedrock client sends a confirmation packet we translate regardless.
This commit is contained in:
parent
99e72f35b3
commit
2f2164f387
1 changed files with 1 additions and 4 deletions
|
@ -27,7 +27,6 @@ package org.geysermc.connector.utils;
|
|||
|
||||
import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
|
||||
import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientCreativeInventoryActionPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientMoveItemToHotbarPacket;
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
|
@ -241,8 +240,6 @@ public class InventoryUtils {
|
|||
hotbarPacket.setSelectedHotbarSlot(slot - 36);
|
||||
hotbarPacket.setSelectHotbarSlot(true);
|
||||
session.sendUpstreamPacket(hotbarPacket);
|
||||
ClientPlayerChangeHeldItemPacket heldItemPacket = new ClientPlayerChangeHeldItemPacket(slot);
|
||||
session.sendDownstreamPacket(heldItemPacket);
|
||||
session.getInventory().setHeldItemSlot(slot - 36);
|
||||
// No need to send a Java packet as Bedrock sends a confirmation packet back that we translate
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue