MCGame

Holds general game information. Can be accessed using the game global keyword

导入相关包

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
Copy
import crafttweaker.api.game.MCGame;

方法

localize

Return Type: string

ZenScript
Copy
MCGame.localize(translationKey as string) as string
game.localize("gui.up");
参数类型描述
translationKeystringNo Description Provided

参数

名称类型可获得可设置
blockStatesCollection<MCBlockState>truefalse
blocksCollection<MCBlock>truefalse
directionAxisesCollection<DirectionAxis>truefalse
effectsCollection<MCPotionEffect>truefalse
entityClassificationsCollection<MCEntityClassification>truefalse
entityTypesCollection<MCEntityType>truefalse
fluidsCollection<MCFluid>truefalse
formattingsCollection<TextFormatting>truefalse
itemsCollection<IItemStack>truefalse
potionsCollection<MCPotion>truefalse
recipeTypesCollection<IRecipeManager>truefalse