Class PositionProbeBase

java.lang.Object
com.hypixel.hytale.server.npc.util.PositionProbeBase
Direct Known Subclasses:
PositionProbeAir, PositionProbeWater

public class PositionProbeBase extends Object
  • Field Details

    • lastWaterCheckDistanceMinSquared

      private static final int lastWaterCheckDistanceMinSquared
      See Also:
    • touchCeil

      protected boolean touchCeil
    • onGround

      protected boolean onGround
    • inWater

      protected boolean inWater
    • validPosition

      protected boolean validPosition
    • groundLevel

      protected int groundLevel
    • waterLevel

      protected int waterLevel
    • heightOverGround

      protected int heightOverGround
    • heightOverWater

      protected int heightOverWater
    • heightOverSurface

      protected int heightOverSurface
    • depthBelowSurface

      protected int depthBelowSurface
    • lastWaterCheckX

      private int lastWaterCheckX
    • lastWaterCheckZ

      private int lastWaterCheckZ
    • lastWaterCheckLevel

      private int lastWaterCheckLevel
  • Constructor Details

    • PositionProbeBase

      public PositionProbeBase()
  • Method Details

    • probePosition

      protected <T> boolean probePosition(@Nonnull Ref<EntityStore> ref, @Nonnull Box boundingBox, @Nonnull Vector3d position, @Nonnull CollisionResult collisionResult, @Nonnull T t, @Nonnull CollisionFilter<BoxBlockIntersectionEvaluator,T> blockTest, int materialSet, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • updateWaterLevel

      protected int updateWaterLevel(@Nonnull ComponentAccessor<ChunkStore> chunkStore, @Nonnull ChunkColumn chunkColumn, @Nonnull BlockChunk blockChunk, int x, int z)
    • movedFarEnough

      private boolean movedFarEnough(int x, int z)
    • reset

      protected void reset()
    • isValidPosition

      public boolean isValidPosition()
    • isTouchCeil

      public boolean isTouchCeil()
    • isOnGround

      public boolean isOnGround()
    • isInWater

      public boolean isInWater()
    • getGroundLevel

      public int getGroundLevel()
    • getWaterLevel

      public int getWaterLevel()
    • getHeightOverGround

      public int getHeightOverGround()
    • getHeightOverSurface

      public int getHeightOverSurface()
    • getDepthBelowSurface

      public int getDepthBelowSurface()
    • getHeightOverWater

      public int getHeightOverWater()
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object