Class BedrockInventoryTransactionTranslator
java.lang.Object
org.geysermc.geyser.translator.protocol.PacketTranslator<org.cloudburstmc.protocol.bedrock.packet.InventoryTransactionPacket>
org.geysermc.geyser.translator.protocol.bedrock.BedrockInventoryTransactionTranslator
public class BedrockInventoryTransactionTranslator
extends PacketTranslator<org.cloudburstmc.protocol.bedrock.packet.InventoryTransactionPacket>
BedrockInventoryTransactionTranslator handles most interactions between the client and the world,
or the client and their inventory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanInteractWithBlock(GeyserSession session, org.cloudburstmc.math.vector.Vector3f playerPosition, org.cloudburstmc.math.vector.Vector3i packetBlockPosition) static voidrestoreCorrectBlock(GeyserSession session, org.cloudburstmc.math.vector.Vector3i blockPos) Restore the correct block state from the server without updating the chunk cache.voidtranslate(GeyserSession session, org.cloudburstmc.protocol.bedrock.packet.InventoryTransactionPacket packet) Methods inherited from class org.geysermc.geyser.translator.protocol.PacketTranslator
shouldExecuteInEventLoop
-
Constructor Details
-
BedrockInventoryTransactionTranslator
public BedrockInventoryTransactionTranslator()
-
-
Method Details
-
translate
public void translate(GeyserSession session, org.cloudburstmc.protocol.bedrock.packet.InventoryTransactionPacket packet) - Specified by:
translatein classPacketTranslator<org.cloudburstmc.protocol.bedrock.packet.InventoryTransactionPacket>
-
canInteractWithBlock
public static boolean canInteractWithBlock(GeyserSession session, org.cloudburstmc.math.vector.Vector3f playerPosition, org.cloudburstmc.math.vector.Vector3i packetBlockPosition) -
restoreCorrectBlock
public static void restoreCorrectBlock(GeyserSession session, org.cloudburstmc.math.vector.Vector3i blockPos) Restore the correct block state from the server without updating the chunk cache.- Parameters:
session- the session of the Bedrock clientblockPos- the block position to restore
-