RandomizableContainer
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.world.RandomizableContainer;
Implements
RandomizableContainer
implements the following interfaces:
Members
Getter
// RandomizableContainer.changedmyRandomizableContainer.changed
changed()
// RandomizableContainer.changed();myRandomizableContainer.changed();
clearContent()
Clears the contents of this Clearable.script.zs
// RandomizableContainer.clearContent();myRandomizableContainer.clearContent();
Getter
Gets the size (how many slots) of this Containerscript.zs
// RandomizableContainer.containerSize as intmyRandomizableContainer.containerSize
Return Type:
int
containerSize() as int
Gets the size (how many slots) of this Containerscript.zs
Returns: The amount of slots this Container has.
// RandomizableContainer.containerSize() as int;myRandomizableContainer.containerSize();
Return Type:
int
countItem(item as Item) as int
myRandomizableContainer.countItem(myItem);
Parameters:
item: ItemDefinition
Type: ItemDefinition
Return Type:
int
countStack(item as IItemStack) as int
myRandomizableContainer.countStack(myIItemStack);
Parameters:
item: IItemStack
Type: IItemStack
Return Type:
int
getItem(index as int) as ItemStack
hasAnyOf(items as Set<Item>) as bool
myRandomizableContainer.hasAnyOf(mySet);
Parameters:
items: Set<ItemDefinition>
Type: Set<ItemDefinition>
Return Type:
bool
Getter
Checks if this Container is empty.script.zs
// RandomizableContainer.isEmpty as boolmyRandomizableContainer.isEmpty
Return Type:
bool
isEmpty() as bool
Checks if this Container is empty.script.zs
Returns: True if empty. False otherwise.
// RandomizableContainer.isEmpty() as bool;myRandomizableContainer.isEmpty();
Return Type:
bool
Getter
Gets the seed used by the loot table.script.zs
// RandomizableContainer.lootSeed as longmyRandomizableContainer.lootSeed
Return Type:
long
Setter
Sets the seed used by the loot table.script.zs
// RandomizableContainer.lootSeed = (seed as long);myRandomizableContainer.lootSeed = myLong;
Parameters:
seed: long
Type: long
- The seed for the loot table to use. lootSeed() as long
Gets the seed used by the loot table.script.zs
Returns: The seed used by the loot table.
// RandomizableContainer.lootSeed() as long;myRandomizableContainer.lootSeed();
Return Type:
long
lootSeed(seed as long)
Sets the seed used by the loot table.script.zs
// RandomizableContainer.lootSeed(seed as long);myRandomizableContainer.lootSeed(myLong);
Parameters:
seed: long
Type: long
- The seed for the loot table to use. Getter
Gets the loot table used by the container.script.zs
myRandomizableContainer.lootTable
Return Type:
ResourceKey<LootTable>
Setter
Sets the loot table used by the container.script.zs
myRandomizableContainer.lootTable = myResourceKey;
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
- The new loot table for the container to use. lootTable() as ResourceKey<LootTable>
Gets the loot table used by the container.script.zs
Returns: The loot table used by the container.
myRandomizableContainer.lootTable();
Return Type:
ResourceKey<LootTable>
lootTable(lootTable as ResourceKey<LootTable>)
Sets the loot table used by the container.script.zs
myRandomizableContainer.lootTable(myResourceKey);
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
- The new loot table for the container to use. Getter
// RandomizableContainer.maxStackSize as intmyRandomizableContainer.maxStackSize
Return Type:
int
maxStackSize() as int
// RandomizableContainer.maxStackSize() as int;myRandomizableContainer.maxStackSize();
Return Type:
int
setLootTable(lootTable as ResourceKey<LootTable>, seed as long)
Sets the loot table used by the container.script.zs
myRandomizableContainer.setLootTable(myResourceKey, myLong);
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
- The new loot table for the container to use. seed: long
Type: long
- The seed for the loot table to use. setLootTable(lootTable as ResourceLocation)
Sets the loot table used by the container.script.zs
myRandomizableContainer.setLootTable(myResourceLocation);
Parameters:
setLootTable(lootTable as ResourceLocation, seed as long)
Sets the loot table used by the container.script.zs
myRandomizableContainer.setLootTable(myResourceLocation, myLong);
Parameters:
seed: long
Type: long
- The seed for the loot table to use.