public class FullStatement<S extends IStatement> extends java.lang.Object implements IReference<S>
StatementWrapper
and its
IStatementParameter
's.Modifier and Type | Class and Description |
---|---|
static interface |
FullStatement.IStatementChangeListener |
Modifier and Type | Field and Description |
---|---|
boolean |
canInteract |
int |
maxParams |
StatementType<S> |
type |
Constructor and Description |
---|
FullStatement(StatementType<S> type,
int maxParams,
FullStatement.IStatementChangeListener listener) |
Modifier and Type | Method and Description |
---|---|
boolean |
canSet(int index,
java.lang.Object param) |
boolean |
canSet(java.lang.Object value) |
S |
get() |
IStatementParameter |
get(int index) |
int |
getParamCount() |
IStatementParameter[] |
getParameters() |
IReference<IStatementParameter> |
getParamRef(int i) |
void |
postSetFromGui(int paramIndex)
Gui elements should call this after calling
set(IStatement) or set(int, IStatementParameter) ,
with either -1 or the param index respectively. |
void |
readFromBuffer(PacketBufferBC buffer) |
void |
readFromNbt(net.minecraft.nbt.NBTTagCompound nbt) |
void |
set(int index,
IStatementParameter param) |
void |
set(S to) |
void |
writeToBuffer(PacketBufferBC buffer) |
net.minecraft.nbt.NBTTagCompound |
writeToNbt() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setIfCan
public final StatementType<S extends IStatement> type
public final int maxParams
public boolean canInteract
public FullStatement(StatementType<S> type, int maxParams, FullStatement.IStatementChangeListener listener)
public void readFromNbt(net.minecraft.nbt.NBTTagCompound nbt)
public net.minecraft.nbt.NBTTagCompound writeToNbt()
public void readFromBuffer(PacketBufferBC buffer) throws java.io.IOException
java.io.IOException
public void writeToBuffer(PacketBufferBC buffer)
public S get()
get
in interface IReference<S extends IStatement>
public void set(S to)
set
in interface IReference<S extends IStatement>
public boolean canSet(java.lang.Object value)
canSet
in interface IReference<S extends IStatement>
public IReference<IStatementParameter> getParamRef(int i)
public IStatementParameter get(int index)
public void set(int index, IStatementParameter param)
public boolean canSet(int index, java.lang.Object param)
public int getParamCount()
public IStatementParameter[] getParameters()
public void postSetFromGui(int paramIndex)
set(IStatement)
or set(int, IStatementParameter)
,
with either -1 or the param index respectively.