public class TriggerParameterSignal extends java.lang.Object implements IStatementParameter
IStatementParameter.DrawType| Modifier and Type | Field and Description |
|---|---|
boolean |
active |
net.minecraft.item.EnumDyeColor |
colour |
static TriggerParameterSignal |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
static TriggerParameterSignal |
get(boolean active,
net.minecraft.item.EnumDyeColor colour) |
java.lang.String |
getDescription()
Return the description in the UI.
|
net.minecraft.item.ItemStack |
getItemStack() |
TriggerParameterSignal[] |
getPossible(IStatementContainer source) |
ISprite |
getSprite() |
java.lang.String |
getUniqueTag()
Every statement needs a unique tag, it should be in the format of "<modid>:<name>".
|
TriggerParameterSignal |
onClick(IStatementContainer source,
IStatement stmt,
net.minecraft.item.ItemStack stack,
StatementMouseClick mouse)
Return a non-null value to be set as the statement parameter if you handled the mouse click and do not want all
possible values to be shown, or null if you did nothing and wish to show all possible values.
|
static TriggerParameterSignal |
readFromBuf(net.minecraft.network.PacketBuffer buffer) |
static TriggerParameterSignal |
readFromNbt(net.minecraft.nbt.NBTTagCompound nbt) |
IStatementParameter |
rotateLeft()
This returns the parameter after a left rotation.
|
void |
writeToBuf(net.minecraft.network.PacketBuffer buffer)
Writes this parameter to the given
PacketBuffer. |
void |
writeToNbt(net.minecraft.nbt.NBTTagCompound nbt) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDrawType, isPossibleOrderedgetTooltipconvertTopublic static final TriggerParameterSignal EMPTY
public final boolean active
@Nullable public final net.minecraft.item.EnumDyeColor colour
public static TriggerParameterSignal get(boolean active, net.minecraft.item.EnumDyeColor colour)
public static TriggerParameterSignal readFromNbt(net.minecraft.nbt.NBTTagCompound nbt)
public void writeToNbt(net.minecraft.nbt.NBTTagCompound nbt)
writeToNbt in interface IStatementParameterpublic static TriggerParameterSignal readFromBuf(net.minecraft.network.PacketBuffer buffer)
public void writeToBuf(net.minecraft.network.PacketBuffer buffer)
IStatementParameterPacketBuffer. The default implementation writes out the value of
IStatementParameter.writeToNbt(NBTTagCompound), and that will be passed back into
StatementManager.IParameterReader.readFromNbt(NBTTagCompound).
It is likely that implementors can write a more compact form of themselves, so they are encouraged to override
this and also register an StatementManager.IParamReaderBuf in
StatementManager.registerParameter(String, IParamReaderBuf) or
StatementManager.registerParameter(IParameterReader, IParamReaderBuf)
writeToBuf in interface IStatementParameter@Nonnull public net.minecraft.item.ItemStack getItemStack()
getItemStack in interface IStatementParameterItemStack to render for this parameter, or ItemStack.EMPTY if this should not render
an ItemStack.public ISprite getSprite()
public TriggerParameterSignal onClick(IStatementContainer source, IStatement stmt, net.minecraft.item.ItemStack stack, StatementMouseClick mouse)
IStatementParameteronClick in interface IStatementParameterIStatementParameter.getPossible(IStatementContainer)public java.lang.String getDescription()
IGuiSlotIGuiSlot.getTooltip(). (As such this might return null or throw an exception)getDescription in interface IGuiSlotpublic java.lang.String getUniqueTag()
IGuiSlotgetUniqueTag in interface IGuiSlotpublic IStatementParameter rotateLeft()
IStatementParameterrotateLeft in interface IStatementParameterpublic TriggerParameterSignal[] getPossible(IStatementContainer source)
getPossible in interface IStatementParameter