Interface LandPathNodeTypesRegistry.StaticPathNodeTypeProvider

All Superinterfaces:
LandPathNodeTypesRegistry.PathNodeTypeProvider
Enclosing class:
LandPathNodeTypesRegistry
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static non-sealed interface LandPathNodeTypesRegistry.StaticPathNodeTypeProvider extends LandPathNodeTypesRegistry.PathNodeTypeProvider
A functional interface that provides the PathNodeType, given the block state.
  • Method Details

    • getPathNodeType

      @Nullable @Nullable PathNodeType getPathNodeType(BlockState state, boolean neighbor)
      Gets the PathNodeType for the specified block state.

      You can specify what to return if the block state is a direct target of an entity path, or a neighbor block of the entity path.

      For example, for a cactus-like block you should use PathNodeType.DAMAGE_CACTUS if the block is a direct target in the entity path (neighbor == false) to specify that an entity should not pass through or above the block because it will cause damage, and you should usePathNodeType.DANGER_CACTUS if the block is a neighbor block in the entity path (neighbor == true) to specify that the entity should not get close to the block because it is dangerous.

      Parameters:
      state - Current block state.
      neighbor - Specifies that the block is in a direct neighbor position to an entity path that is directly next to a block that the entity will pass through or above.
      Returns:
      the custom PathNodeType registered for the specified block state.