Game
Link to game
导入类
Link to 导入类
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.game.Game;
使用方式
Link to 使用方式
Name: getBlockStates
Return Type: Collection<BlockState>
ZenScript Copy// Game.getBlockStates() as Collection<BlockState>
myGame.getBlockStates();
Name: getBlocks
Return Type: Collection<Block>
ZenScript Copy// Game.getBlocks() as Collection<Block>
myGame.getBlocks();
Name: getEnchantments
Return Type: Collection<Enchantment>
ZenScript Copy// Game.getEnchantments() as Collection<Enchantment>
myGame.getEnchantments();
Name: getEntityTypes
Return Type: Collection<EntityType>
ZenScript Copy// Game.getEntityTypes() as Collection<EntityType>
myGame.getEntityTypes();
Name: getFluids
Return Type: Collection<Fluid>
ZenScript Copy// Game.getFluids() as Collection<Fluid>
myGame.getFluids();
Name: getItemStacks
Return Type: Collection<IItemStack>
ZenScript Copy// Game.getItemStacks() as Collection<IItemStack>
myGame.getItemStacks();
Name: getMobEffects
Return Type: Collection<MobEffect>
ZenScript Copy// Game.getMobEffects() as Collection<MobEffect>
myGame.getMobEffects();
Name: getPotions
Return Type: Collection<Potion>
ZenScript Copy// Game.getPotions() as Collection<Potion>
myGame.getPotions();
Name: getRecipeTypes
Return Type: Collection<IRecipeManager>
ZenScript Copy// Game.getRecipeTypes() as Collection<IRecipeManager>
myGame.getRecipeTypes();
Name: getVillagerProfessions
Return Type: Collection<VillagerProfession>
ZenScript Copy// Game.getVillagerProfessions() as Collection<VillagerProfession>
myGame.getVillagerProfessions();
Name: localize
Returns: a localized String
Return Type: string
ZenScript Copy// Game.localize(translationKey as string) as string
myGame.localize("gui.up");
参数 | 类型 |
---|---|
参数 translationKey | 类型 string |
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 blockStates | 类型 Collection<BlockState> | 可获得 true | 可设置 false |
名称 blocks | 类型 Collection<Block> | 可获得 true | 可设置 false |
名称 effects | 类型 Collection<MobEffect> | 可获得 true | 可设置 false |
名称 enchantments | 类型 Collection<Enchantment> | 可获得 true | 可设置 false |
名称 entityTypes | 类型 Collection<EntityType> | 可获得 true | 可设置 false |
名称 fluids | 类型 Collection<Fluid> | 可获得 true | 可设置 false |
名称 items | 类型 Collection<IItemStack> | 可获得 true | 可设置 false |
名称 potions | 类型 Collection<Potion> | 可获得 true | 可设置 false |
名称 recipeTypes | 类型 Collection<IRecipeManager> | 可获得 true | 可设置 false |
名称 villagerProfessions | 类型 Collection<VillagerProfession> | 可获得 true | 可设置 false |