当前位置: 首页>>代码示例>>Java>>正文


Java LanguageRegistry.addName方法代码示例

本文整理汇总了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");
  	
  	
 }
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:19,代码来源:ModBlocks.java

示例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");
			
			
		}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:23,代码来源:ModBlocks.java

示例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);
	}
}
 
开发者ID:asiekierka,项目名称:Chisel-1.7.2,代码行数:18,代码来源:CarvableHelper.java

示例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]);
}
 
开发者ID:mixerrules,项目名称:piggalot-mod,代码行数:12,代码来源:GGPItem.java

示例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);

}
 
开发者ID:UnderMybrella,项目名称:TiM,代码行数:39,代码来源:TModifiers.java

示例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");

}
 
开发者ID:MoreThanHidden,项目名称:DoomShrine,代码行数:10,代码来源:DoomShrine.java

示例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());
}
 
开发者ID:kieranvs,项目名称:Blockbender,代码行数:12,代码来源:ItemAirStaff.java

示例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());
}
 
开发者ID:kieranvs,项目名称:Blockbender,代码行数:8,代码来源:ItemFoodSeaweedCookies.java

示例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");
}
 
开发者ID:becelot,项目名称:TeamCore,代码行数:14,代码来源:TeamSelectionBlock.java

示例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);
	}
}
 
开发者ID:Electrodynamics,项目名称:Electrodynamics-Core,代码行数:28,代码来源:ItemRegistrar.java

示例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();
}
 
开发者ID:CCM-Modding,项目名称:CcmBurialServicesInc,代码行数:15,代码来源:CommonProxy.java

示例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");
}
 
开发者ID:AwesomeSauwss,项目名称:SteamAge,代码行数:14,代码来源:SteamAge.java

示例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());
}
 
开发者ID:kieranvs,项目名称:Blockbender,代码行数:8,代码来源:ItemFoodFruitPie.java

示例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");*/
	
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:33,代码来源:ModItems.java

示例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());
}
 
开发者ID:kieranvs,项目名称:Blockbender,代码行数:8,代码来源:ItemFoodSeaweedSoup.java


注:本文中的cpw.mods.fml.common.registry.LanguageRegistry.addName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。