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 Copyimport 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
Methods
Link to methods
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();
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 CopyRandomizableContainer.setLootTable(lootTable as ResourceKey<LootTable>)
Parameter | Type | Description |
---|---|---|
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 CopyRandomizableContainer.setLootTable(lootTable as ResourceLocation)
Parameter | Type | Description |
---|---|---|
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 CopyRandomizableContainer.setLootTable(lootTable as ResourceKey<LootTable>, seed as long)
Parameter | Type | Description |
---|---|---|
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 CopyRandomizableContainer.setLootTable(lootTable as ResourceLocation, seed as long)
Parameter | Type | Description |
---|---|---|
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. |
Name: setLootTableSeed
Sets the seed used by the loot table.
ZenScript CopyRandomizableContainer.setLootTableSeed(seed as long)
Parameter | Type | Description |
---|---|---|
Parameter seed | Type long | Description The seed for the loot table to use. |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
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. |