public class AbstractValue extends java.lang.Object implements Value
Constructor and Description |
---|
AbstractValue() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
apply(Context context,
Arguments arguments)
This is called when the code running on a machine tries to index this
value.
|
java.lang.Object[] |
call(Context context,
Arguments arguments)
This is called when the code running on a machine tries to call this
value as a function.
|
void |
dispose(Context context)
This is called when the object's representation in the machine it was
pushed to is garbage collected.
|
void |
load(net.minecraft.nbt.NBTTagCompound nbt)
Restores a previous state of the object from the specified NBT tag.
|
void |
save(net.minecraft.nbt.NBTTagCompound nbt)
Saves the current state of the object into the specified NBT tag.
|
void |
unapply(Context context,
Arguments arguments)
This is called when the code running on a machine tries to assign a new
value at the specified index of this value.
|
public java.lang.Object apply(Context context, Arguments arguments)
Value
public void unapply(Context context, Arguments arguments)
Value
public java.lang.Object[] call(Context context, Arguments arguments)
Value
public void dispose(Context context)
Value
public void load(net.minecraft.nbt.NBTTagCompound nbt)
Persistable
load
in interface Persistable
nbt
- the tag to read the state from.public void save(net.minecraft.nbt.NBTTagCompound nbt)
Persistable
Persistable.load(net.minecraft.nbt.NBTTagCompound)
is called with that tag.save
in interface Persistable
nbt
- the tag to save the state to.