Class ProgWidgetConditionBase
java.lang.Object
me.desht.pneumaticcraft.common.progwidgets.ProgWidget
me.desht.pneumaticcraft.common.progwidgets.ProgWidgetConditionBase
- All Implemented Interfaces:
IProgWidgetBase,IJump,IProgWidget
- Direct Known Subclasses:
ProgWidgetCoordinateCondition,ProgWidgetDroneCondition,ProgWidgetItemCondition
Base class for non-world conditions (drone/item/coordinate)
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.common.progwidgets.IProgWidget
IProgWidget.WidgetDifficulty -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrors(List<net.minecraft.network.chat.Component> curInfo, List<IProgWidget> widgets) abstract booleanevaluate(IDroneBase drone, IProgWidget widget) net.minecraft.world.item.DyeColorgetColor()getOutputWidget(IDroneBase drone, List<IProgWidget> allWidgets) Get the next widget in the program, which may or may not be the widget attached to the bottom of this one.booleanCan this widget connect to a widget above?For parameter widgets that are added onto the left or right of another widget, get the type of the widget being connected to.Methods inherited from class me.desht.pneumaticcraft.common.progwidgets.ProgWidget
addWarnings, canBeRunByComputers, canSetParameter, copy, fromNBT, fromPacket, getConnectedParameters, getExtraStringInfo, getHeight, getMaxUV, getOutputWidget, getParent, getTooltip, getType, getTypeID, getWidgetAI, getWidgetTargetAI, getWidth, getX, getY, hasBlacklist, hasStepOutput, isAvailable, readFromNBT, readFromPacket, setOutputWidget, setParameter, setParent, setX, setY, writeToNBT, writeToPacketMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.common.progwidgets.IProgWidget
freeToUse, getParameters, getTexture, getTranslationKey, isDifficultyOK
-
Method Details
-
hasStepInput
public boolean hasStepInput()Description copied from interface:IProgWidgetCan this widget connect to a widget above?- Specified by:
hasStepInputin interfaceIProgWidget- Returns:
- true if it can, false otherwise
-
returnType
Description copied from interface:IProgWidgetFor parameter widgets that are added onto the left or right of another widget, get the type of the widget being connected to.- Specified by:
returnTypein interfaceIProgWidget- Returns:
- the widget being connected to, or null if this widget isn't a parameter widget.
-
getDifficulty
- Specified by:
getDifficultyin interfaceIProgWidget
-
addErrors
public void addErrors(List<net.minecraft.network.chat.Component> curInfo, List<IProgWidget> widgets) - Specified by:
addErrorsin interfaceIProgWidget- Overrides:
addErrorsin classProgWidget
-
getPossibleJumpLocations
- Specified by:
getPossibleJumpLocationsin interfaceIJump
-
getOutputWidget
Description copied from interface:IProgWidgetGet the next widget in the program, which may or may not be the widget attached to the bottom of this one. This method variant is called when running in a live program, and has access to the drone context and a view of the full program so it can deal with special conditions like jumps etc.- Specified by:
getOutputWidgetin interfaceIProgWidget- Overrides:
getOutputWidgetin classProgWidget- Parameters:
drone- the droneallWidgets- a list of widgets- Returns:
- the next widget to run
-
evaluate
-
getColor
public net.minecraft.world.item.DyeColor getColor()- Specified by:
getColorin interfaceIProgWidget
-