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
-
Method Summary
-
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.
-