public class BlockUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.github.steveice10.mc.protocol.data.game.entity.metadata.Position |
POSITION_ZERO
A static constant of
Position with all values being zero. |
| Constructor and Description |
|---|
BlockUtils() |
| Modifier and Type | Method and Description |
|---|---|
static com.nukkitx.math.vector.Vector3i |
getBlockPosition(com.nukkitx.math.vector.Vector3i blockPos,
int face)
Given a position, return the position if a block were located on the specified block face.
|
static double |
getBreakTime(GeyserSession session,
BlockMapping blockMapping,
ItemMapping item,
com.github.steveice10.opennbt.tag.builtin.CompoundTag nbtData,
boolean isSessionPlayer) |
static String |
getCleanIdentifier(String fullJavaIdentifier)
Taking in a complete Java block state identifier, output just the block ID of this block state without the states.
|
static BlockCollision |
getCollision(int blockId,
com.nukkitx.math.vector.Vector3i blockPos) |
static BlockCollision |
getCollisionAt(GeyserSession session,
com.nukkitx.math.vector.Vector3i blockPos) |
static double |
getSessionBreakTime(GeyserSession session,
BlockMapping blockMapping) |
public static final com.github.steveice10.mc.protocol.data.game.entity.metadata.Position POSITION_ZERO
Position with all values being zero.public static double getBreakTime(GeyserSession session, BlockMapping blockMapping, ItemMapping item, com.github.steveice10.opennbt.tag.builtin.CompoundTag nbtData, boolean isSessionPlayer)
public static double getSessionBreakTime(GeyserSession session, BlockMapping blockMapping)
public static com.nukkitx.math.vector.Vector3i getBlockPosition(com.nukkitx.math.vector.Vector3i blockPos,
int face)
blockPos - the block positionface - the face of the block - see BlockFacepublic static String getCleanIdentifier(String fullJavaIdentifier)
fullJavaIdentifier - a full Java block identifier, with possible block states.public static BlockCollision getCollision(int blockId, com.nukkitx.math.vector.Vector3i blockPos)
public static BlockCollision getCollisionAt(GeyserSession session, com.nukkitx.math.vector.Vector3i blockPos)
Copyright © 2021 GeyserMC. All rights reserved.