Class EntityCitizenWalkToProxy
java.lang.Object
com.minecolonies.core.entity.pathfinding.proxy.AbstractWalkToProxy
com.minecolonies.core.entity.pathfinding.proxy.EntityCitizenWalkToProxy
- All Implemented Interfaces:
IWalkToProxy
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a walkToProxy for a certain worker. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if for distance calculation the y level should be taken into account.net.minecraft.core.BlockPosgetSpecializedProxy(net.minecraft.core.BlockPos target, double distanceToPath) Try to get a specialized proxy to a certain target.Set<net.minecraft.core.BlockPos>Get a list of waypoints depending on the entity.booleanisLivingAtSiteWithMove(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.static booleanisWorkerAtSiteWithMove(@NotNull AbstractEntityCitizen worker, int x, int y, int z, int range) Checks if a worker is at his working site.Methods inherited from class com.minecolonies.core.entity.pathfinding.proxy.AbstractWalkToProxy
addToProxyList, getCurrentProxy, getEntity, getProxy, getProxyList, reset, walkToBlock, walkToBlock
-
Constructor Details
-
EntityCitizenWalkToProxy
Creates a walkToProxy for a certain worker.- Parameters:
entity- the citizen entity.
-
-
Method Details
-
getWayPoints
Description copied from interface:IWalkToProxyGet a list of waypoints depending on the entity.- Returns:
- the set of waypoints.
-
careAboutY
public boolean careAboutY()Description copied from interface:IWalkToProxyCheck 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:IWalkToProxyTry 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:
isLivingAtSiteWithMovein interfaceIWalkToProxy- Overrides:
isLivingAtSiteWithMovein classAbstractWalkToProxy- 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 checkx- X-coordinatey- Y-coordinatez- Z-coordinaterange- Range to check in- Returns:
- True if worker is at site, otherwise false.
-