public abstract class ProgWidget extends java.lang.Object implements IProgWidget
IProgWidget.WidgetDifficulty| Constructor and Description |
|---|
ProgWidget(ProgWidgetType<?> type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrors(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets) |
void |
addWarnings(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets) |
boolean |
canBeRunByComputers(IDroneBase drone,
IProgWidget widget) |
boolean |
canSetParameter(int index) |
IProgWidget |
copy() |
static IProgWidget |
fromNBT(net.minecraft.nbt.CompoundNBT widgetTag) |
static IProgWidget |
fromPacket(net.minecraft.network.PacketBuffer buf) |
IProgWidget[] |
getConnectedParameters() |
java.util.List<net.minecraft.util.text.ITextComponent> |
getExtraStringInfo() |
int |
getHeight() |
org.apache.commons.lang3.tuple.Pair<java.lang.Float,java.lang.Float> |
getMaxUV() |
IProgWidget |
getOutputWidget()
Get the next widget in the program; the widget attached to the bottom of this one.
|
IProgWidget |
getOutputWidget(IDroneBase drone,
java.util.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.
|
IProgWidget |
getParent() |
int |
getTextureSize() |
void |
getTooltip(java.util.List<net.minecraft.util.text.ITextComponent> curTooltip) |
ProgWidgetType<?> |
getType() |
net.minecraft.util.ResourceLocation |
getTypeID() |
net.minecraft.entity.ai.goal.Goal |
getWidgetAI(IDroneBase drone,
IProgWidget widget)
Get the AI for this progwidget
|
net.minecraft.entity.ai.goal.Goal |
getWidgetTargetAI(IDroneBase drone,
IProgWidget widget)
Get the targeting AI for this progwidget
|
int |
getWidth() |
int |
getX() |
int |
getY() |
protected boolean |
hasBlacklist() |
boolean |
hasStepOutput()
Can another widget be connected below this widget?
|
boolean |
isAvailable()
Is this widget currently available in this world? i.e.
|
void |
readFromNBT(net.minecraft.nbt.CompoundNBT tag) |
void |
readFromPacket(net.minecraft.network.PacketBuffer buf) |
void |
setOutputWidget(IProgWidget widget)
Set the output widget for this widget, i.e.
|
void |
setParameter(int index,
IProgWidget parm) |
void |
setParent(IProgWidget widget) |
void |
setX(int x) |
void |
setY(int y) |
void |
writeToNBT(net.minecraft.nbt.CompoundNBT tag)
At least do
tag.putString("name", getTypeID().toString()); |
void |
writeToPacket(net.minecraft.network.PacketBuffer buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, freeToUse, getColor, getDifficulty, getParameters, getTexture, getTranslationKey, hasStepInput, isDifficultyOK, returnTypepublic ProgWidget(ProgWidgetType<?> type)
public ProgWidgetType<?> getType()
getType in interface IProgWidgetpublic net.minecraft.util.ResourceLocation getTypeID()
getTypeID in interface IProgWidgetpublic void getTooltip(java.util.List<net.minecraft.util.text.ITextComponent> curTooltip)
getTooltip in interface IProgWidgetpublic java.util.List<net.minecraft.util.text.ITextComponent> getExtraStringInfo()
getExtraStringInfo in interface IProgWidgetpublic void addWarnings(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets)
addWarnings in interface IProgWidgetpublic void addErrors(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets)
addErrors in interface IProgWidgetpublic boolean isAvailable()
IProgWidgetisAvailable in interface IProgWidgetpublic int getX()
getX in interface IProgWidgetpublic int getY()
getY in interface IProgWidgetpublic void setX(int x)
setX in interface IProgWidgetpublic void setY(int y)
setY in interface IProgWidgetpublic int getWidth()
getWidth in interface IProgWidgetpublic int getHeight()
getHeight in interface IProgWidgetpublic void setParent(IProgWidget widget)
setParent in interface IProgWidgetpublic IProgWidget getParent()
getParent in interface IProgWidgetpublic org.apache.commons.lang3.tuple.Pair<java.lang.Float,java.lang.Float> getMaxUV()
getMaxUV in interface IProgWidgetpublic int getTextureSize()
getTextureSize in interface IProgWidgetpublic boolean hasStepOutput()
IProgWidgethasStepOutput in interface IProgWidgetpublic net.minecraft.entity.ai.goal.Goal getWidgetTargetAI(IDroneBase drone, IProgWidget widget)
IProgWidgetgetWidgetTargetAI in interface IProgWidgetdrone - the dronewidget - Will be 'this' most of the time, but not when controlled externally (e.g. ComputerCraft)public net.minecraft.entity.ai.goal.Goal getWidgetAI(IDroneBase drone, IProgWidget widget)
IProgWidgetgetWidgetAI in interface IProgWidgetdrone - the dronewidget - will be 'this' most of the time, but not when controlled externally (e.g. ComputerCraft)public void setParameter(int index,
IProgWidget parm)
setParameter in interface IProgWidgetpublic boolean canSetParameter(int index)
canSetParameter in interface IProgWidgetprotected boolean hasBlacklist()
public IProgWidget[] getConnectedParameters()
getConnectedParameters in interface IProgWidgetpublic void setOutputWidget(IProgWidget widget)
IProgWidgetsetOutputWidget in interface IProgWidgetwidget - the next widget in the programpublic IProgWidget getOutputWidget()
IProgWidgetgetOutputWidget in interface IProgWidgetpublic IProgWidget getOutputWidget(IDroneBase drone, java.util.List<IProgWidget> allWidgets)
IProgWidgetgetOutputWidget in interface IProgWidgetdrone - the droneallWidgets - a list of widgetspublic IProgWidget copy()
copy in interface IProgWidgetpublic void writeToNBT(net.minecraft.nbt.CompoundNBT tag)
IProgWidgettag.putString("name", getTypeID().toString());
Note that the base implementation ProgWidget does this.
writeToNBT in interface IProgWidgettag - NBT tag to write topublic void readFromNBT(net.minecraft.nbt.CompoundNBT tag)
readFromNBT in interface IProgWidgetpublic void writeToPacket(net.minecraft.network.PacketBuffer buf)
writeToPacket in interface IProgWidgetpublic void readFromPacket(net.minecraft.network.PacketBuffer buf)
readFromPacket in interface IProgWidgetpublic static IProgWidget fromPacket(net.minecraft.network.PacketBuffer buf)
public static IProgWidget fromNBT(net.minecraft.nbt.CompoundNBT widgetTag)
public boolean canBeRunByComputers(IDroneBase drone, IProgWidget widget)
canBeRunByComputers in interface IProgWidget