AbstractStaticgetStaticgetStaticisChecks if a block at the given location is currently loaded and valid.
true if the block exists and block.isValid is truthy; otherwise false.
dimension.getBlock in a try/catch and profiles via DebugTimerUtil.StaticgetStaticgetFinds the highest air (or optionally water) block at X/Z by scanning from maxY down to minY.
The target Dimension.
Optionaloptions: HighestAirOptionsScan options; see HighestAirOptions.
A BlockPos where the highest matching block is found, or null if none in range.
StaticgetBuilds a bitmask of cardinal neighbors (N/E/S/W) whose type matches typeId.
A NeighborMask bitmask (combine with &/|).
const mask = BlockUtil.getNeighborBlockType(block, "minecraft:oak_fence");
if (BlockUtil.hasNeighbor(mask, Direction.North)) {
// connected north
}
StatichasTests whether a neighbor in the given direction is present in a NeighborMask.
The bitmask from BlockUtil.getNeighborBlockType.
The Direction to test (North/East/South/West).
true if the corresponding bit is set; otherwise false.
StaticserializeConverts a block position into a canonical key string "x,y,z".
Converts a block position into a canonical key string "x,y,z".
StaticdeserializeParses a canonical key string "x,y,z" back into a block position object.
Parses a canonical key string "x,y,z" back into a block position object.
Safely fetches a block at the given location.