Class DoubleChestBlockEntityTranslator

java.lang.Object
org.geysermc.geyser.translator.level.block.entity.BlockEntityTranslator
org.geysermc.geyser.translator.level.block.entity.DoubleChestBlockEntityTranslator
All Implemented Interfaces:
BedrockOnlyBlockEntity, RequiresBlockState

public class DoubleChestBlockEntityTranslator extends BlockEntityTranslator implements BedrockOnlyBlockEntity
Chests have more block entity properties in Bedrock, which is solved by implementing the BedrockOnlyBlockEntity
  • Constructor Details

    • DoubleChestBlockEntityTranslator

      public DoubleChestBlockEntityTranslator()
  • Method Details

    • isBlock

      public boolean isBlock(int blockState)
      Description copied from interface: BedrockOnlyBlockEntity
      Determines if block is part of class
      Specified by:
      isBlock in interface BedrockOnlyBlockEntity
      Parameters:
      blockState - BlockState to be compared
      Returns:
      true if part of the class
    • updateBlock

      public void updateBlock(GeyserSession session, int blockState, com.nukkitx.math.vector.Vector3i position)
      Description copied from interface: BedrockOnlyBlockEntity
      Update the block on Bedrock Edition.
      Specified by:
      updateBlock in interface BedrockOnlyBlockEntity
      Parameters:
      session - GeyserConnection.
      blockState - The Java block state.
      position - The Bedrock block position.
    • translateTag

      public void translateTag(com.nukkitx.nbt.NbtMapBuilder builder, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
      Specified by:
      translateTag in class BlockEntityTranslator
    • translateChestValue

      public static void translateChestValue(com.nukkitx.nbt.NbtMapBuilder builder, DoubleChestValue chestValues, int x, int z)
      Add Bedrock block entity tags to a NbtMap based on Java properties
      Parameters:
      builder - the NbtMapBuilder to apply properties to
      chestValues - the position properties of this double chest
      x - the x position of this chest pair
      z - the z position of this chest pair