Class PistonBlockEntityTranslator
java.lang.Object
org.geysermc.geyser.translator.level.block.entity.PistonBlockEntityTranslator
Pistons are a special case where they are only a block entity on Bedrock.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.cloudburstmc.nbt.NbtMapgetTag(int blockState, org.cloudburstmc.math.vector.Vector3i position) Calculates the Nukkit CompoundTag to send to the client on chunkstatic booleanisBlock(int blockState) Used in ChunkUtils to determine if the block is a piston.
-
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 org.cloudburstmc.nbt.NbtMap getTag(int blockState, org.cloudburstmc.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.
-