From c393dc9f2160c5696ad25af68f96740ccdb29091 Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Wed, 8 Apr 2020 21:29:33 -0400 Subject: [PATCH] Initial bow support --- .../BedrockInventoryTransactionTranslator.java | 18 +++++++++++++----- .../translators/block/BlockTranslator.java | 3 +++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java index de23b8a05..3df0f6272 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java @@ -41,6 +41,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlaye import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerUseItemPacket; import com.nukkitx.math.vector.Vector3f; import com.nukkitx.protocol.bedrock.packet.InventoryTransactionPacket; +import org.geysermc.connector.network.translators.block.BlockTranslator; @Translator(packet = InventoryTransactionPacket.class) public class BedrockInventoryTransactionTranslator extends PacketTranslator { @@ -61,11 +62,18 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator 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;