Enum Class SurfaceType

java.lang.Object
java.lang.Enum<SurfaceType>
com.minecolonies.core.entity.pathfinding.SurfaceType
All Implemented Interfaces:
Serializable, Comparable<SurfaceType>, Constable

public enum SurfaceType extends Enum<SurfaceType>
Check if we can walk on a surface, drop into, or neither.
  • Enum Constant Details

    • WALKABLE

      public static final SurfaceType WALKABLE
    • DROPABLE

      public static final SurfaceType DROPABLE
    • NOT_PASSABLE

      public static final SurfaceType NOT_PASSABLE
  • Method Details

    • values

      public static SurfaceType[] 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

      public static SurfaceType valueOf(String name)
      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 name
      NullPointerException - 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.