本文整理汇总了Java中cpw.mods.fml.common.registry.LanguageRegistry.addName方法的典型用法代码示例。如果您正苦于以下问题:Java LanguageRegistry.addName方法的具体用法?Java LanguageRegistry.addName怎么用?Java LanguageRegistry.addName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.registry.LanguageRegistry
的用法示例。
在下文中一共展示了LanguageRegistry.addName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadDarkBlocks
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public static void loadDarkBlocks(){
/*darlaxStone = new BlockDarlaxStone(800,Material.rock).setUnlocalizedName("darlaxStone").setTextureName(ZeroQuest.modid + ":" + "darlaxStone");
GameRegistry.registerBlock(darlaxStone, ZeroQuest.modid + "." + darlaxStone.getUnlocalizedName().substring(5));
blockTeleporter2 = new BlockTeleporter(801).setUnlocalizedName("blockTeleporter2");
GameRegistry.registerBlock(blockTeleporter2, ZeroQuest.modid + "." + blockTeleporter2.getUnlocalizedName().substring(5));
darlaxFire = new BlockDarkFire(802).setUnlocalizedName("darlaxFire").setTextureName(ZeroQuest.modid + ":" + "darlaxFire");
GameRegistry.registerBlock(darlaxFire, ZeroQuest.modid + "." + darlaxFire.getUnlocalizedName().substring(5));*/
darkGrainOre = new BlockDarkGrainOre(803,Material.rock).setUnlocalizedName("darkGrainOre").setTextureName(ZeroQuest.modid + ":" + "darkGrainOre");
GameRegistry.registerBlock(darkGrainOre, ZeroQuest.modid +"." + darkGrainOre.getUnlocalizedName().substring(5));
/*LanguageRegistry.addName(darlaxStone, "Darlax Stone");
LanguageRegistry.addName(blockTeleporter2, "Darlax Teleporter Block");
LanguageRegistry.addName(darlaxFire, "Darlax Fire");*/
LanguageRegistry.addName(darkGrainOre, "Dark Grain Ore");
}
示例2: addNames
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public static void addNames() {
LanguageRegistry.addName(nileStone, "Nile Stone");
LanguageRegistry.addName(nileCobblestone, "Nile Cobbletone");
LanguageRegistry.addName(vitoidPlant, "Vitoid Plant");
//LanguageRegistry.addName(nileLog, "Nile Log");
//LanguageRegistry.addName(nileLeaf, "Nile Leaves");
//LanguageRegistry.addName(nileSapling, "Nile Sapling");
LanguageRegistry.addName(nileWorktable, "Nile Crafting Table");
LanguageRegistry.addName(nileBlackFlower, "Nile Black Flower");
LanguageRegistry.addName(nillaxStone, "Nillax Stone");
LanguageRegistry.addName(blockTeleporter, "Nillax Teleporter Block");
LanguageRegistry.addName(nileFire, "Nile Fire");
LanguageRegistry.addName(nileBlueFlower, "Nile Blue Flower");
LanguageRegistry.addName(destroFlower, "Destro Flower");
LanguageRegistry.addName(nilePinkFlower, "Nile Pink Flower");
LanguageRegistry.addName(nileCoalOre, "Nile Coal Ore");
LanguageRegistry.addName(nileGrainOre, "Nile Grain Ore");
LanguageRegistry.addName(looseBedrock, "Loose Bedrock");
}
示例3: registerVariation
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public void registerVariation(String name, CarvableVariation variation, Block block, int blockMeta) {
LanguageRegistry.addName(new ItemStack(block, 1, blockMeta),
Chisel.blockDescriptions?
variation.blockName:
variation.description
);
if(forbidChiseling) return;
if (variation.block == null) {
Carving.chisel.addVariation(name, block, blockMeta, variation.metadata);
block.setHarvestLevel("chisel", 0, blockMeta);
} else {
Carving.chisel.addVariation(name, variation.block, variation.blockMeta, variation.metadata);
variation.block.setHarvestLevel("chisel", 0, variation.blockMeta);
}
}
示例4: addItem
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
/**
* add item to the hashmap
* @param name
* @param newItem
*/
private static void addItem(String[] name, Item newItem)
{
itemMap.put(name[0], newItem);
GameRegistry.registerItem(newItem, newItem.getUnlocalizedName());
LanguageRegistry.addName(newItem, name[1]);
}
示例5: preinit
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
@EventHandler
public void preinit(FMLPreInitializationEvent event)
{
modifierDirectory = new File(event.getSuggestedConfigurationFile().getAbsolutePath().replace(MODID + ".cfg", NAME));
if(modifierDirectory.exists())
for(File f : modifierDirectory.listFiles())
f.delete();
else
modifierDirectory.mkdir();
configFile = new File(event.getSuggestedConfigurationFile().getAbsolutePath().replace(MODID, NAME));
jsonFile = new File(event.getSuggestedConfigurationFile().getAbsolutePath().replace(MODID, NAME).replace(".cfg", ".json"));
if(!jsonFile.exists())
{
jsonFile = new File(modifierDirectory.getAbsolutePath() + File.separator + NAME + ".json");
if(!jsonFile.exists()){
try {
jsonFile.createNewFile();
PrintStream out = new PrintStream(new FileOutputStream(jsonFile));
writeDefaultJSON(out);
out.close();
} catch (IOException e) {
Logger.getLogger(NAME).log(Level.WARNING, "Could not create json file - " + e);
}
}
}
GameRegistry.registerItem(updateChecker, "updateChecker");
LanguageRegistry.addName(updateChecker, "Update Checker");
CraftingManager.getInstance().addRecipe(new ItemStack(updateChecker), "RRR", "RBR", "RRR", 'R', Items.redstone, 'B', Items.bread);
TConstructRegistry.registerActiveToolMod(new TModifiersToolMod());
MinecraftForge.EVENT_BUS.register(this);
}
示例6: addNames
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public static void addNames(){
//Temporary Naming
LanguageRegistry.addName(doomShrineBlock, "Doom Shrine");
LanguageRegistry.addName(shrineStaffItem, "Shrine Staff");
LanguageRegistry.addName(leafItem, "Leaf");
LanguageRegistry.addName(shrineScripturesItem, "Shrine Scriptures");
LanguageRegistry.instance().addStringLocalization("itemGroup.Doom Shrine", "en_US", "Doom Shrine");
}
示例7: ItemAirStaff
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public ItemAirStaff() {
super();
if(state != 0){
this.unlocalizedName = "Air Staff Open";
}
this.setUnlocalizedName(unlocalizedName);
LanguageRegistry.addName(this, "Air Staff");
this.setCreativeTab(mod_Avatar.tabAirbending);
this.setFull3D();
this.setTextureName(mod_Avatar.modid + ":" + this.getUnlocalizedName());
}
示例8: ItemFoodSeaweedCookies
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public ItemFoodSeaweedCookies() {
super(5, 0.6F, false);
this.setUnlocalizedName("SeaweedCookies");
LanguageRegistry.addName(this, "Seaweed Cookies");
this.setCreativeTab(CreativeTabs.tabFood);
this.setTextureName(mod_Avatar.modid + ":" + this.getUnlocalizedName());
}
示例9: register
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public static void register() {
TeamSelectionBlock teamSelectionBlock = new TeamSelectionBlock(TeamConfig.teamSelectionId, Material.ground);
GameRegistry.registerBlock(teamSelectionBlock, TeamSelectionItemBlock.class, "teamSelectionBlock");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 0), "Team Selection Block");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 1), "Team Red");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 2), "Team Yellow");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 3), "Team Green");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 4), "Team Blue");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 5), "Team Cyan");
LanguageRegistry.addName(new ItemStack(teamSelectionBlock, 1, 6), "Team Purple");
}
示例10: registerItem
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public void registerItem(Item i){
try{
Class<? extends Item> c = i.getClass();
if(Validator.hasAnnotation(Localize.class, c)){
Localize l = c.getAnnotation(Localize.class);
if(Validator.hasAnnotation(Meta.class, c)){
Meta m = c.getAnnotation(Meta.class);
GameRegistry.registerItem(i, String.format("%s:%s", mod.modid(), l.value()));
for(int x = 0; x < m.tags().length; x++){
this.alloc.allocateRawMetaTag(this.alloc.getRootAllocationTag(c), m.tags()[x], x);
LanguageRegistry.addName(new ItemStack(i, 1, x), this.local.translate(String.format("item.%s.%s.name", l.value(), m.tags()[x])));
}
} else{
GameRegistry.registerItem(i, String.format("%s:%s", mod.modid(), l.value()));
LanguageRegistry.addName(i, this.local.translate(String.format("item.%s.name", l.value())));
}
} else{
throw new RegistrarException(i);
}
} catch(Exception ex){
throw new RuntimeException(ex);
}
}
示例11: preInit
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public void preInit(FMLPreInitializationEvent event)
{
new GraveBlock(BurialServices.getConfig().graveBlockID);
GameRegistry.registerTileEntity(GraveTE.class, "GraveTE");
GameRegistry.registerBlock(GraveBlock.getInstance(), "GraveBlock");
LanguageRegistry.addName(GraveBlock.getInstance(), "Grave");
VillagerRegistry.instance().registerVillagerId(BurialServices.getConfig().villagerID);
VillagerRegistry.instance().registerVillageTradeHandler(BurialServices.getConfig().villagerID, new VillageTradeHandler());
VillagerRegistry.instance().registerVillageCreationHandler(new GraveyardHandler());
EventHandler.INSTANCE.init();
GuiHandler.INSTANCE.init();
}
示例12: SteamAge
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public SteamAge() {
//Item registry
//GameReg
GameRegistry.registerItem(ObsidianStick, "Ostick");
//LangReg
LanguageRegistry.addName(ObsidianStick, "Ostick");
//Block registry
//GameReg
GameRegistry.registerBlock(CopperPipe, "Cpipe");
//LangReg
LanguageRegistry.addName(CopperPipe, "Copper Pipe");
}
示例13: ItemFoodFruitPie
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public ItemFoodFruitPie(){
super(9, 0.6F, false);
this.setUnlocalizedName("FruitPie");
LanguageRegistry.addName(this, "Fruit Pie");
this.setCreativeTab(CreativeTabs.tabFood);
this.setTextureName(mod_Avatar.modid + ":" + this.getUnlocalizedName());
}
示例14: addNames
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public static void addNames() {
LanguageRegistry.addName(nileSword, "Nile Sword");
LanguageRegistry.addName(nileAxe, "Nile Axe");
LanguageRegistry.addName(nilePickaxe, "Nile Pickaxe");
LanguageRegistry.addName(nileShovel, "Nile Shovel");
LanguageRegistry.addName(nileHoe, "Nile Hoe");
LanguageRegistry.addName(vitoidSeed, "Vitoid Seed");
LanguageRegistry.addName(vitoidFruit, "Vitoid Fruit");
LanguageRegistry.addName(nileEssence, "Nile Essence");
LanguageRegistry.addName(nileDust, "Nile Dust");
LanguageRegistry.addName(nileGrain, "Nile Grain");
LanguageRegistry.addName(nileBow, "Nile Bow");
LanguageRegistry.addName(nileCoal, "Nile Coal");
LanguageRegistry.addName(dogTreat, "Dog Treat");
LanguageRegistry.addName(nileBone, "Nile Bone");
LanguageRegistry.addName(animalCage, "Animal Cage");
LanguageRegistry.addName(nileSpark, "Nile Spark");
//LanguageRegistry.addName(nileSaddle, "Nile Saddle");
LanguageRegistry.addName(zertumMeatRaw, "Raw Zertum Meat");
LanguageRegistry.addName(zertumMeatCooked, "Cooked Zertum Meat");
LanguageRegistry.addName(jakanMeatRaw, "Raw Jakan Meat");
LanguageRegistry.addName(jakanMeatCooked, "Cooked Jakan Meat");
LanguageRegistry.addName(entityEgg, "Spawn");
LanguageRegistry.addName(FPoisonball, "Flaming Poisonball");
//LanguageRegistry.addName(nileGun, "Nile Gun");
/*LanguageRegistry.addName(nileHelmet, "Nile Helmet");
LanguageRegistry.addName(nileChest, "Nile Chestplate");
LanguageRegistry.addName(nileLegs, "Nile Leggings");
LanguageRegistry.addName(nileBoots, "Nile Boots");*/
}
示例15: ItemFoodSeaweedSoup
import cpw.mods.fml.common.registry.LanguageRegistry; //导入方法依赖的package包/类
public ItemFoodSeaweedSoup() {
super(7);
this.setUnlocalizedName("SeaweedStew");
LanguageRegistry.addName(this, "Seaweed Soup");
this.setCreativeTab(CreativeTabs.tabFood);
this.setTextureName(mod_Avatar.modid + ":" + this.getUnlocalizedName());
}