public abstract class DroneAIImExBase<W extends ProgWidgetInventoryBase> extends DroneAIBlockInteraction<W> implements IBlockInteractHandler
drone, progWidget| Modifier | Constructor and Description |
|---|---|
protected |
DroneAIImExBase(IDroneBase drone,
W widget) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUse()
Returns whether the EntityAIBase should begin execution.
|
void |
decreaseCount(int count)
When
IBlockInteractHandler.useCount() returns true, this should be called to notify the amount actually transferred. |
protected boolean |
doBlockInteraction(net.minecraft.util.math.BlockPos pos,
double squareDistToBlock)
Carry out the actual interaction operation.
|
int |
getRemainingCount()
When
IBlockInteractHandler.useCount() returns true, transfer only up to this much of the resource in question. |
boolean[] |
getSides()
Returns a boolean[6] of all sides, in order D,U,N,S,W,E; you can use
Direction.get3DDataValue() to get
an index into this array to get the facing direction, or you use the IBlockInteractHandler.isSideAccessible(Direction)
convenience method. |
boolean |
useCount()
This is controlled by players setting the "Use Count" checkbox in the widget GUI.
|
abort, addEndingDebugEntry, canContinueToUse, isValidPosition, moveIntoBlock, moveToPositions, respectClaims, setMaxActionsgetFlags, isInterruptable, setFlags, start, stop, tick, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitabort, isSideAccessibleprotected DroneAIImExBase(IDroneBase drone, W widget)
public boolean canUse()
DroneAIBlockInteractioncanUse in class DroneAIBlockInteraction<W extends ProgWidgetInventoryBase>public void decreaseCount(int count)
IBlockInteractHandlerIBlockInteractHandler.useCount() returns true, this should be called to notify the amount actually transferred.decreaseCount in interface IBlockInteractHandlercount - the amount to notifypublic int getRemainingCount()
IBlockInteractHandlerIBlockInteractHandler.useCount() returns true, transfer only up to this much of the resource in question.getRemainingCount in interface IBlockInteractHandlerprotected boolean doBlockInteraction(net.minecraft.util.math.BlockPos pos,
double squareDistToBlock)
DroneAIBlockInteractiondoBlockInteraction in class DroneAIBlockInteraction<W extends ProgWidgetInventoryBase>pos - the block pos to work onsquareDistToBlock - squared distance from the drone to the blockpublic boolean[] getSides()
IBlockInteractHandlerDirection.get3DDataValue() to get
an index into this array to get the facing direction, or you use the IBlockInteractHandler.isSideAccessible(Direction)
convenience method.getSides in interface IBlockInteractHandlerpublic boolean useCount()
IBlockInteractHandleruseCount in interface IBlockInteractHandler