Class PistonBlockEntityTranslator

java.lang.Object
org.geysermc.geyser.translator.level.block.entity.PistonBlockEntityTranslator

public class PistonBlockEntityTranslator extends Object
Pistons are a special case where they are only a block entity on Bedrock.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.nukkitx.nbt.NbtMap
    getTag​(int blockState, com.nukkitx.math.vector.Vector3i position)
    Calculates the Nukkit CompoundTag to send to the client on chunk
    static boolean
    isBlock​(int blockState)
    Used in ChunkUtils to determine if the block is a piston.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PistonBlockEntityTranslator

      public PistonBlockEntityTranslator()
  • Method Details

    • isBlock

      public static boolean isBlock(int blockState)
      Used in ChunkUtils to determine if the block is a piston.
      Parameters:
      blockState - Java BlockState of block.
      Returns:
      if block is a piston or not.
    • getTag

      public static com.nukkitx.nbt.NbtMap getTag(int blockState, com.nukkitx.math.vector.Vector3i position)
      Calculates the Nukkit CompoundTag to send to the client on chunk
      Parameters:
      blockState - Java block state of block.
      position - Bedrock position of piston.
      Returns:
      Bedrock tag of piston.