mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-11-23 07:16:39 +01:00
Simplify
This commit is contained in:
parent
c393dc9f21
commit
0521a30266
2 changed files with 2 additions and 14 deletions
|
@ -62,18 +62,9 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
|||
break;
|
||||
case ITEM_RELEASE:
|
||||
if (packet.getActionType() == 0) {
|
||||
ClientPlayerActionPacket releaseItemPacket;
|
||||
if (packet.getItemInHand().getId() == BlockTranslator.BOW) {
|
||||
// Followed to the Minecraft Protocol specification outlined at wiki.vg
|
||||
releaseItemPacket = new ClientPlayerActionPacket(PlayerAction.RELEASE_USE_ITEM, new Position(0,0,0),
|
||||
// Followed to the Minecraft Protocol specification outlined at wiki.vg
|
||||
ClientPlayerActionPacket releaseItemPacket = new ClientPlayerActionPacket(PlayerAction.RELEASE_USE_ITEM, new Position(0,0,0),
|
||||
BlockFace.DOWN);
|
||||
} else {
|
||||
releaseItemPacket = new ClientPlayerActionPacket(PlayerAction.RELEASE_USE_ITEM, new Position(
|
||||
packet.getBlockPosition().getX(),
|
||||
packet.getBlockPosition().getY(),
|
||||
packet.getBlockPosition().getZ()
|
||||
), BlockFace.values()[packet.getFace()]);
|
||||
}
|
||||
session.getDownstream().getSession().send(releaseItemPacket);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -55,9 +55,6 @@ public class BlockTranslator {
|
|||
private static final Int2ObjectMap<BlockState> BEDROCK_TO_JAVA_BLOCK_MAP = new Int2ObjectOpenHashMap<>();
|
||||
private static final IntSet WATERLOGGED = new IntOpenHashSet();
|
||||
|
||||
// Bedrock bow ID, used in BedrockInventoryTransactionTranslator.java for bow support
|
||||
public static final int BOW = 261;
|
||||
|
||||
// Bedrock carpet ID, used in LlamaEntity.java for decoration
|
||||
public static final int CARPET = 171;
|
||||
|
||||
|
|
Loading…
Reference in a new issue