The IGame Class is used to obtain general game information. Can be accessed using game

Dieses Paket importieren

Link to dieses-paket-importieren

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.
import crafttweaker.game.IGame;

ZenGetterWhat does it do?RückgabetypUsage
ZenGetter
biomes
What does it do?
Returns all registered biomes as list
Rückgabetyp
List<IBiomes>
Usage
game.biomes
ZenGetter
blocks
What does it do?
Returns all registered blocks as list
Rückgabetyp
List<IBlockDefinition>
Usage
game.blocks
ZenGetter
enchantments
What does it do?
Returns all registered enchantments as list
Rückgabetyp
List<IEnchantmentDefinition>
Usage
game.enchantments
ZenGetter
entities
What does it do?
Returns all registered entities as list
Rückgabetyp
List<IEntityDefinition>
Usage
game.entities
ZenGetter
items
What does it do?
Returns all registered items as list
Rückgabetyp
List<IItemDefinition>
Usage
game.items
ZenGetter
liquids
What does it do?
Returns all registered liquids as list
Rückgabetyp
List<ILiquidDefinition>
Usage
game.liquids
ZenGetter
potions
What does it do?
Returns all registered potions as list
Rückgabetyp
List<IPotion>
Usage
game.potions
ZenScript
Copy
//getEntity(EntityName)

//essentially the same
val sheep = game.getEntity("sheep");
val sheep1 = <entity:minecraft:sheep>;

Sets the localization.
All parameters are strings. game.setLocalization(key, value);
game.setLocalization(lang, key, value);

Returns a localized String
game.localize(key)
game.localize(key, lang)