public interface IStatementParameter extends IGuiSlot
Modifier and Type | Interface and Description |
---|---|
static class |
IStatementParameter.DrawType |
Modifier and Type | Method and Description |
---|---|
default IStatementParameter.DrawType |
getDrawType() |
net.minecraft.item.ItemStack |
getItemStack() |
IStatementParameter[] |
getPossible(IStatementContainer source) |
default boolean |
isPossibleOrdered() |
IStatementParameter |
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.
|
IStatementParameter |
rotateLeft()
This returns the parameter after a left rotation.
|
default void |
writeToBuf(net.minecraft.network.PacketBuffer buffer)
Writes this parameter to the given
PacketBuffer . |
void |
writeToNbt(net.minecraft.nbt.NBTTagCompound nbt) |
getDescription, getSprite, getTooltip, getUniqueTag
@Nonnull net.minecraft.item.ItemStack getItemStack()
ItemStack
to render for this parameter, or ItemStack.EMPTY
if this should not render
an ItemStack
.default IStatementParameter.DrawType getDrawType()
IStatementParameter onClick(IStatementContainer source, IStatement stmt, net.minecraft.item.ItemStack stack, StatementMouseClick mouse)
getPossible(IStatementContainer)
void writeToNbt(net.minecraft.nbt.NBTTagCompound nbt)
default void writeToBuf(net.minecraft.network.PacketBuffer buffer)
PacketBuffer
. The default implementation writes out the value of
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)
IStatementParameter rotateLeft()
IStatementParameter[] getPossible(IStatementContainer source)
default boolean isPossibleOrdered()
getPossible(IStatementContainer)
will be
offset up by one, null added to 0, and all other nulls removed.