Class EntityCitizenWalkToProxy

java.lang.Object
com.minecolonies.core.entity.pathfinding.proxy.AbstractWalkToProxy
com.minecolonies.core.entity.pathfinding.proxy.EntityCitizenWalkToProxy
All Implemented Interfaces:
IWalkToProxy

public class EntityCitizenWalkToProxy extends AbstractWalkToProxy
  • Constructor Details

    • EntityCitizenWalkToProxy

      public EntityCitizenWalkToProxy(AbstractEntityCitizen entity)
      Creates a walkToProxy for a certain worker.
      Parameters:
      entity - the citizen entity.
  • Method Details

    • getWayPoints

      public Set<net.minecraft.core.BlockPos> getWayPoints()
      Description copied from interface: IWalkToProxy
      Get a list of waypoints depending on the entity.
      Returns:
      the set of waypoints.
    • careAboutY

      public boolean careAboutY()
      Description copied from interface: IWalkToProxy
      Check if for distance calculation the y level should be taken into account.
      Returns:
      true if so.
    • getSpecializedProxy

      public net.minecraft.core.BlockPos getSpecializedProxy(net.minecraft.core.BlockPos target, double distanceToPath)
      Description copied from interface: IWalkToProxy
      Try to get a specialized proxy to a certain target.
      Parameters:
      target - the target.
      distanceToPath - the distance to it.
      Returns:
      a special proxy point of existent, else null.
    • isLivingAtSiteWithMove

      public boolean isLivingAtSiteWithMove(net.minecraft.world.entity.Mob entity, int x, int y, int z, int range)
      Method to call to detect if an entity living is at site with move.
      Specified by:
      isLivingAtSiteWithMove in interface IWalkToProxy
      Overrides:
      isLivingAtSiteWithMove in class AbstractWalkToProxy
      Parameters:
      entity - the entity to check.
      x - the x value.
      y - the y value.
      z - the z value.
      range - the range.
      Returns:
      true if so.
    • isWorkerAtSiteWithMove

      public static boolean isWorkerAtSiteWithMove(@NotNull @NotNull AbstractEntityCitizen worker, int x, int y, int z, int range)
      Checks if a worker is at his working site. If he isn't, sets it's path to the location.
      Parameters:
      worker - Worker to check
      x - X-coordinate
      y - Y-coordinate
      z - Z-coordinate
      range - Range to check in
      Returns:
      True if worker is at site, otherwise false.