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.
import crafttweaker.api.game.Game;
Members
Getter
myGame.blocks
Return Type:
Collection<Block>
blocks() as Collection<Block>
Getter
myGame.blockStates
Return Type:
Collection<BlockState>
blockStates() as Collection<BlockState>
Getter
myGame.effects
Return Type:
Collection<MobEffect>
effects() as Collection<MobEffect>
Getter
myGame.enchantments
Return Type:
Collection<Enchantment>
enchantments() as Collection<Enchantment>
Getter
myGame.entityTypes
Return Type:
Collection<EntityType<Entity>>
entityTypes() as Collection<EntityType<Entity>>
Getter
myGame.fluids
Return Type:
Collection<Fluid>
fluids() as Collection<Fluid>
Getter
myGame.items
Return Type:
Collection<IItemStack>
items() as Collection<IItemStack>
localize(translationKey as string) as string
Returns: a localized String
// Game.localize(translationKey as string) as string;myGame.localize("gui.up");
Parameters:
translationKey: string
Type: string
Return Type:
string
Getter
myGame.potions
Return Type:
Collection<Potion>
potions() as Collection<Potion>
Getter
myGame.recipeTypes
Return Type:
Collection<IRecipeManager<Recipe>>
recipeTypes() as Collection<IRecipeManager<Recipe>>
Getter
myGame.villagerProfessions
Return Type:
Collection<VillagerProfession>
villagerProfessions() as Collection<VillagerProfession>