Interface BlockUtils
public interface BlockUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final it.unimi.dsi.fastutil.objects.Reference2FloatMap<net.minecraft.world.level.block.state.BlockState> -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic floatcomputeDensity(net.minecraft.world.level.block.state.BlockState state) static booleancomputeIsPartial(net.minecraft.world.level.block.state.BlockState state) static booleancomputeIsVisible(net.minecraft.world.level.block.state.BlockState state) static floatgetDensity(net.minecraft.world.level.block.state.BlockState state) static doublegetGroundY(net.minecraft.world.level.BlockGetter level, double x, double y, double z) static intgetPackedLight(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos) static booleanisBlockExposed(net.minecraft.world.level.LevelReader level, int x, int y, int z, net.minecraft.core.BlockPos.MutableBlockPos mutablePos) static booleanisBlockExposed(net.minecraft.world.level.LevelReader level, it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap cache, int x, int y, int z, net.minecraft.core.BlockPos.MutableBlockPos mutable) static booleanisBlockExposed(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static booleanisBlockPartial(net.minecraft.world.level.LevelReader level, it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap cache, net.minecraft.core.BlockPos pos) static booleanisFluid(net.minecraft.world.level.block.state.BlockState state) static booleanisPartial(net.minecraft.world.level.block.state.BlockState state) static booleanisVisible(net.minecraft.world.level.block.state.BlockState state) static StringtoString(net.minecraft.world.level.block.state.BlockState state) static List<ConnectedBlock> walkBlocks(net.minecraft.world.level.LevelReader level, ConnectedBlock.WalkType walkType, net.minecraft.core.BlockPos start, @Nullable BlockFilter filter, boolean onlyExposed, int maxDistance, int maxTotalBlocks) static voidwalkBlocks(net.minecraft.world.level.LevelReader level, ConnectedBlock.WalkType walkType, net.minecraft.core.BlockPos start, @Nullable BlockFilter filter, boolean onlyExposed, int maxDistance, Predicate<ConnectedBlock> callback)
-
Field Details
-
DENSITY
static final it.unimi.dsi.fastutil.objects.Reference2FloatMap<net.minecraft.world.level.block.state.BlockState> DENSITY
-
-
Method Details
-
getDensity
static float getDensity(net.minecraft.world.level.block.state.BlockState state) -
computeDensity
@Internal static float computeDensity(net.minecraft.world.level.block.state.BlockState state) -
isVisible
static boolean isVisible(net.minecraft.world.level.block.state.BlockState state) -
computeIsVisible
@Internal static boolean computeIsVisible(net.minecraft.world.level.block.state.BlockState state) -
isPartial
static boolean isPartial(net.minecraft.world.level.block.state.BlockState state) -
computeIsPartial
@Internal static boolean computeIsPartial(net.minecraft.world.level.block.state.BlockState state) -
isFluid
static boolean isFluid(net.minecraft.world.level.block.state.BlockState state) -
toString
-
walkBlocks
static void walkBlocks(net.minecraft.world.level.LevelReader level, ConnectedBlock.WalkType walkType, net.minecraft.core.BlockPos start, @Nullable @Nullable BlockFilter filter, boolean onlyExposed, int maxDistance, Predicate<ConnectedBlock> callback) -
walkBlocks
static List<ConnectedBlock> walkBlocks(net.minecraft.world.level.LevelReader level, ConnectedBlock.WalkType walkType, net.minecraft.core.BlockPos start, @Nullable @Nullable BlockFilter filter, boolean onlyExposed, int maxDistance, int maxTotalBlocks) -
isBlockPartial
static boolean isBlockPartial(net.minecraft.world.level.LevelReader level, it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap cache, net.minecraft.core.BlockPos pos) -
isBlockExposed
static boolean isBlockExposed(net.minecraft.world.level.LevelReader level, it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap cache, int x, int y, int z, net.minecraft.core.BlockPos.MutableBlockPos mutable) -
isBlockExposed
static boolean isBlockExposed(net.minecraft.world.level.LevelReader level, int x, int y, int z, net.minecraft.core.BlockPos.MutableBlockPos mutablePos) -
isBlockExposed
static boolean isBlockExposed(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
getPackedLight
static int getPackedLight(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos) -
getGroundY
static double getGroundY(net.minecraft.world.level.BlockGetter level, double x, double y, double z)
-