Class MinecraftBlockExaminer

java.lang.Object
net.citizensnpcs.api.astar.pathfinder.MinecraftBlockExaminer
All Implemented Interfaces:
BlockExaminer

public class MinecraftBlockExaminer extends Object implements BlockExaminer
  • Constructor Details

    • MinecraftBlockExaminer

      public MinecraftBlockExaminer()
  • Method Details

    • canStandAt

      public BlockExaminer.StandableState canStandAt(BlockSource source, PathPoint point)
      Description copied from interface: BlockExaminer
      Determines if the entity can stand at this position (checks block below for support). First STANDABLE result wins during evaluation.
      Specified by:
      canStandAt in interface BlockExaminer
      Returns:
      STANDABLE if position has valid support, NOT_STANDABLE if not, IGNORE to defer
    • getCost

      public float getCost(BlockSource source, PathPoint point)
      Specified by:
      getCost in interface BlockExaminer
    • isPassable

      public BlockExaminer.PassableState isPassable(BlockSource source, PathPoint point)
      Description copied from interface: BlockExaminer
      Determines if the entity can pass through the block at this position. First PASSABLE result wins during evaluation.
      Specified by:
      isPassable in interface BlockExaminer
    • canStandIn

      public static boolean canStandIn(Block... blocks)
    • canStandIn

      public static boolean canStandIn(Material... mat)
    • canStandIn

      public static boolean canStandIn(Material mat, BlockData data)
    • canStandOn

      public static boolean canStandOn(Block block)
    • canStandOn

      public static boolean canStandOn(Material mat)
    • canStandOn

      public static boolean canStandOn(Material mat, BlockData data)
    • findRandomValidLocation

      public static Location findRandomValidLocation(Location base, int xrange, int yrange)
    • findRandomValidLocation

      public static Location findRandomValidLocation(Location base, int xrange, int yrange, Function<Block,Boolean> filter)
    • findRandomValidLocation

      public static Location findRandomValidLocation(Location base, int xrange, int yrange, Function<Block,Boolean> filter, Random random)
    • findValidLocation

      public static Location findValidLocation(Location location, int radius)
    • findValidLocation

      public static Location findValidLocation(Location location, int xradius, int yradius)
    • findValidLocation

      public static Location findValidLocation(Location location, int xradius, int yradius, Function<Block,Boolean> filter)
    • findValidLocationAbove

      public static Location findValidLocationAbove(Location location, int radius)
    • isDoor

      public static boolean isDoor(Material in)
    • isGate

      public static boolean isGate(Material in)
    • isLiquid

      public static boolean isLiquid(Material... materials)
    • isLiquidOrWaterlogged

      public static boolean isLiquidOrWaterlogged(Block block)
    • isLiquidOrWaterlogged

      public static boolean isLiquidOrWaterlogged(Material type, BlockData data)