public abstract class DroneAIBlockInteraction<W extends ProgWidgetAreaItemBase>
extends net.minecraft.entity.ai.goal.Goal
| Modifier and Type | Field and Description |
|---|---|
protected IDroneBase |
drone |
protected W |
progWidget |
| Constructor and Description |
|---|
DroneAIBlockInteraction(IDroneBase drone,
W progWidget) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
protected void |
addEndingDebugEntry() |
boolean |
canContinueToUse()
Returns whether an in-progress EntityAIBase should continue executing
|
boolean |
canUse()
Returns whether the EntityAIBase should begin execution.
|
protected abstract boolean |
doBlockInteraction(net.minecraft.util.math.BlockPos pos,
double squareDistToBlock)
Carry out the actual interaction operation.
|
protected abstract boolean |
isValidPosition(net.minecraft.util.math.BlockPos pos)
Check if the given blockpos is valid for the purposes of this operation; generally the operation that is
carried out by
doBlockInteraction(BlockPos, double) should be attempted as a simulation. |
protected boolean |
moveIntoBlock() |
protected boolean |
moveToPositions() |
protected boolean |
respectClaims() |
DroneAIBlockInteraction<?> |
setMaxActions(int maxActions) |
protected final IDroneBase drone
protected final W extends ProgWidgetAreaItemBase progWidget
public DroneAIBlockInteraction(IDroneBase drone, W progWidget)
drone - the droneprogWidget - needs to implement IBlockOrderedpublic boolean canUse()
canUse in class net.minecraft.entity.ai.goal.Goalpublic DroneAIBlockInteraction<?> setMaxActions(int maxActions)
protected abstract boolean isValidPosition(net.minecraft.util.math.BlockPos pos)
doBlockInteraction(BlockPos, double) should be attempted as a simulation. If this
method returns true, then the drone will attempt to move there (if appropriate) and call
doBlockInteraction(BlockPos, double) to actually carry out the operation.pos - the block pos to examineprotected abstract boolean doBlockInteraction(net.minecraft.util.math.BlockPos pos,
double squareDistToBlock)
pos - the block pos to work onsquareDistToBlock - squared distance from the drone to the blockpublic boolean canContinueToUse()
canContinueToUse in class net.minecraft.entity.ai.goal.Goalprotected void addEndingDebugEntry()
protected boolean respectClaims()
protected boolean moveIntoBlock()
public void abort()
protected boolean moveToPositions()