Enum Class SurfaceType
- All Implemented Interfaces:
Serializable,Comparable<SurfaceType>,Constable
Check if we can walk on a surface, drop into, or neither.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SurfaceTypegetSurfaceType(net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos) Is the block solid and can be stood upon.static @NotNull SurfaceTypegetSurfaceType(net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, @Nullable PathingOptions pathingOptions) Is the block solid and can be stood upon.static SurfaceTypeReturns the enum constant of this class with the specified name.static SurfaceType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WALKABLE
-
DROPABLE
-
NOT_PASSABLE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getSurfaceType
@NotNull public static @NotNull SurfaceType getSurfaceType(net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos) Is the block solid and can be stood upon.- Parameters:
blockState- Block to check.pos- the position.- Returns:
- true if the block at that location can be walked on.
-
getSurfaceType
@NotNull public static @NotNull SurfaceType getSurfaceType(net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, @Nullable @Nullable PathingOptions pathingOptions) Is the block solid and can be stood upon.- Parameters:
blockState- Block to check.pos- the position.pathingOptions- the pathing options to consider- Returns:
- true if the block at that location can be walked on.
-