public class ItemStackArrayValue extends AbstractValue
Constructor and Description |
---|
ItemStackArrayValue() |
ItemStackArrayValue(net.minecraft.item.ItemStack[] arr) |
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.
|
java.lang.Object[] |
count(Context context,
Arguments arguments) |
java.lang.Object[] |
getAll(Context context,
Arguments arguments) |
void |
load(net.minecraft.nbt.NBTTagCompound nbt)
Restores a previous state of the object from the specified NBT tag.
|
java.lang.Object[] |
reset(Context context,
Arguments arguments) |
void |
save(net.minecraft.nbt.NBTTagCompound nbt)
Saves the current state of the object into the specified NBT tag.
|
java.lang.String |
toString() |
dispose, unapply
public ItemStackArrayValue(net.minecraft.item.ItemStack[] arr)
public ItemStackArrayValue()
public java.lang.Object[] call(Context context, Arguments arguments)
Value
call
in interface Value
call
in class AbstractValue
context
- the context from which the method is called, usually the
instance of the computer running the script that made
the call.arguments
- the arguments passed to the method.public java.lang.Object apply(Context context, Arguments arguments)
Value
apply
in interface Value
apply
in class AbstractValue
context
- the context from which the method is called, usually the
instance of the computer running the script that made
the call.arguments
- the arguments passed to the method.public void load(net.minecraft.nbt.NBTTagCompound nbt)
Persistable
load
in interface Persistable
load
in class AbstractValue
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
save
in class AbstractValue
nbt
- the tag to save the state to.public java.lang.Object[] reset(Context context, Arguments arguments) throws java.lang.Exception
java.lang.Exception
public java.lang.Object[] count(Context context, Arguments arguments) throws java.lang.Exception
java.lang.Exception
public java.lang.Object[] getAll(Context context, Arguments arguments) throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object