RandomizableContainer

Link to randomizablecontainer

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.world.RandomizableContainer;

Implemented Interfaces

Link to implemented-interfaces

RandomizableContainer implements the following interfaces. That means all methods defined in these interfaces are also available in RandomizableContainer

Name: getLootTable

Gets the loot table used by the container.

Returns: The loot table used by the container.
Return Type: ResourceKey<T>?

ZenScript
Copy
// RandomizableContainer.getLootTable() as ResourceKey<T>?

myRandomizableContainer.getLootTable();

Link to getLootTableSeed

Name: getLootTableSeed

Gets the seed used by the loot table.

Returns: The seed used by the loot table.
Return Type: long

ZenScript
Copy
// RandomizableContainer.getLootTableSeed() as long

myRandomizableContainer.getLootTableSeed();

Name: setLootTable

Sets the loot table used by the container.

ZenScript
Copy
RandomizableContainer.setLootTable(lootTable as ResourceKey<LootTable>)
ParameterTypeDescription
Parameter
lootTable
Type
ResourceKey<LootTable>
Description
The new loot table for the container to use.

Name: setLootTable

Sets the loot table used by the container.

ZenScript
Copy
RandomizableContainer.setLootTable(lootTable as ResourceLocation)
ParameterTypeDescription
Parameter
lootTable
Type
ResourceLocation
Description
The new loot table for the container to use.

Name: setLootTable

Sets the loot table used by the container.

ZenScript
Copy
RandomizableContainer.setLootTable(lootTable as ResourceKey<LootTable>, seed as long)
ParameterTypeDescription
Parameter
lootTable
Type
ResourceKey<LootTable>
Description
The new loot table for the container to use.
Parameter
seed
Type
long
Description
The seed for the loot table to use.

Name: setLootTable

Sets the loot table used by the container.

ZenScript
Copy
RandomizableContainer.setLootTable(lootTable as ResourceLocation, seed as long)
ParameterTypeDescription
Parameter
lootTable
Type
ResourceLocation
Description
The new loot table for the container to use.
Parameter
seed
Type
long
Description
The seed for the loot table to use.

Link to setLootTableSeed

Name: setLootTableSeed

Sets the seed used by the loot table.

ZenScript
Copy
RandomizableContainer.setLootTableSeed(seed as long)
ParameterTypeDescription
Parameter
seed
Type
long
Description
The seed for the loot table to use.
NameTypeHas GetterHas SetterDescription
Name
lootSeed
Type
long
Has Getter
true
Has Setter
true
Description
Gets the seed used by the loot table.
Name
lootTable
Type
ResourceKey<T>?
Has Getter
true
Has Setter
true
Description
Gets the loot table used by the container.