Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Game

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.

script.zs
import crafttweaker.api.game.Game;

Members

Getter
script.zs
// Game.blocks as Collection<Block>
myGame.blocks

Return Type: Collection<Block>

blocks() as Collection<Block>
script.zs
// Game.blocks() as Collection<Block>;
myGame.blocks();

Return Type: Collection<Block>

Getter
script.zs
// Game.blockStates as Collection<BlockState>
myGame.blockStates

Return Type: Collection<BlockState>

blockStates() as Collection<BlockState>
script.zs
// Game.blockStates() as Collection<BlockState>;
myGame.blockStates();

Return Type: Collection<BlockState>

Getter
script.zs
// Game.effects as Collection<MobEffect>
myGame.effects

Return Type: Collection<MobEffect>

effects() as Collection<MobEffect>
script.zs
// Game.effects() as Collection<MobEffect>;
myGame.effects();

Return Type: Collection<MobEffect>

Getter
script.zs
// Game.enchantments as Collection<Enchantment>
myGame.enchantments

Return Type: Collection<Enchantment>

enchantments() as Collection<Enchantment>
script.zs
// Game.enchantments() as Collection<Enchantment>;
myGame.enchantments();

Return Type: Collection<Enchantment>

Getter
script.zs
// Game.entityTypes as Collection<EntityType<Entity>>
myGame.entityTypes

Return Type: Collection<EntityType<Entity>>

entityTypes() as Collection<EntityType<Entity>>
script.zs
// Game.entityTypes() as Collection<EntityType<Entity>>;
myGame.entityTypes();

Return Type: Collection<EntityType<Entity>>

Getter
script.zs
// Game.fluids as Collection<Fluid>
myGame.fluids

Return Type: Collection<Fluid>

fluids() as Collection<Fluid>
script.zs
// Game.fluids() as Collection<Fluid>;
myGame.fluids();

Return Type: Collection<Fluid>

Getter
script.zs
// Game.items as Collection<IItemStack>
myGame.items

Return Type: Collection<IItemStack>

items() as Collection<IItemStack>
script.zs
// Game.items() as Collection<IItemStack>;
myGame.items();

Return Type: Collection<IItemStack>

localize(translationKey as string) as string

Returns: a localized String

script.zs
// Game.localize(translationKey as string) as string;
myGame.localize("gui.up");

Parameters:

translationKey Type: string

Return Type: string

Getter
script.zs
// Game.potions as Collection<Potion>
myGame.potions

Return Type: Collection<Potion>

potions() as Collection<Potion>
script.zs
// Game.potions() as Collection<Potion>;
myGame.potions();

Return Type: Collection<Potion>

Getter
script.zs
// Game.recipeTypes as Collection<IRecipeManager<Recipe>>
myGame.recipeTypes

Return Type: Collection<IRecipeManager<Recipe>>

recipeTypes() as Collection<IRecipeManager<Recipe>>
script.zs
// Game.recipeTypes() as Collection<IRecipeManager<Recipe>>;
myGame.recipeTypes();

Return Type: Collection<IRecipeManager<Recipe>>

Getter
script.zs
// Game.villagerProfessions as Collection<VillagerProfession>
myGame.villagerProfessions

Return Type: Collection<VillagerProfession>

villagerProfessions() as Collection<VillagerProfession>
script.zs
// Game.villagerProfessions() as Collection<VillagerProfession>;
myGame.villagerProfessions();

Return Type: Collection<VillagerProfession>