當前位置: 首頁>>代碼示例>>Java>>正文


Java ItemBlock.setUnlocalizedName方法代碼示例

本文整理匯總了Java中net.minecraft.item.ItemBlock.setUnlocalizedName方法的典型用法代碼示例。如果您正苦於以下問題:Java ItemBlock.setUnlocalizedName方法的具體用法?Java ItemBlock.setUnlocalizedName怎麽用?Java ItemBlock.setUnlocalizedName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.item.ItemBlock的用法示例。


在下文中一共展示了ItemBlock.setUnlocalizedName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BaseLiquid

import net.minecraft.item.ItemBlock; //導入方法依賴的package包/類
public BaseLiquid(String fluidName, Consumer<Fluid> f, int col) {
	super(fluidName, new ResourceLocation(FirmaMod.MODID + ":blocks/water_still"), new ResourceLocation(FirmaMod.MODID + ":blocks/water_flow"));
	this.setUnlocalizedName(FirmaMod.MODID + ":fluid." + fluidName);
	FluidRegistry.registerFluid(this);
	f.accept(this);
	block = new BaseBlockLiquid(this, Material.WATER);
	block.setRegistryName(FirmaMod.MODID + ":fluid." + fluidName);
	block.setUnlocalizedName(FirmaMod.MODID + ":fluid." + fluidName);
	block.setCreativeTab(FirmaMod.blockTab);
	block.setLightOpacity(3);
	block.setLightLevel(0);
	
	GameRegistry.register(block);
	i = new ItemBlock(block);
	i.setRegistryName(FirmaMod.MODID+":fluid."+fluidName);
	i.setUnlocalizedName(FirmaMod.MODID+":fluid."+fluidName);
	GameRegistry.register(i);
	FirmaMod.allFluids.add(this);
	this.col = col;
}
 
開發者ID:trigg,項目名稱:Firma,代碼行數:21,代碼來源:BaseLiquid.java

示例2: registerBlock

import net.minecraft.item.ItemBlock; //導入方法依賴的package包/類
private static void registerBlock(Block block) {
	
	GameRegistry.register(block);
	ItemBlock item = new ItemBlock(block);
	item.setUnlocalizedName(block.getUnlocalizedName());
	item.setRegistryName(block.getRegistryName());
	GameRegistry.register(item);
	
}
 
開發者ID:RedPer,項目名稱:MC-More-Ore-Mod,代碼行數:10,代碼來源:ModBlocks.java

示例3: init

import net.minecraft.item.ItemBlock; //導入方法依賴的package包/類
public static void init() {
    blocks = new ArrayList<>();

    craftiniumTable = new CraftiniumTable();
    craftiniumTable.setCreativeTab(Randores.TAB_CRAFTING);
    blocks.add(craftiniumTable);

    craftiniumForge = new CraftiniumForge(false);
    craftiniumForge.setCreativeTab(Randores.TAB_CRAFTING);
    blocks.add(craftiniumForge);

    craftiniumOre = new CraftiniumOre();
    craftiniumOre.setCreativeTab(Randores.TAB_CRAFTING);
    blocks.add(craftiniumOre);

    craftiniumConverter = new CraftiniumConverter();
    craftiniumConverter.setCreativeTab(Randores.TAB_CRAFTING);
    blocks.add(craftiniumConverter);

    craftiniumForgeLit = new CraftiniumForge(true);
    blocks.add(craftiniumForgeLit);


    blockItems = new ArrayList<>();

    tableItem = new ItemBlock(craftiniumTable);
    tableItem.setUnlocalizedName("craftinium_table");
    blockItems.add(tableItem);

    forgeItem = new ItemBlock(craftiniumForge);
    forgeItem.setUnlocalizedName("craftinium_forge");
    blockItems.add(forgeItem);

    forgeLitItem = new ItemBlock(craftiniumForgeLit);
    forgeLitItem.setUnlocalizedName("craftinium_forge_lit");
    blockItems.add(forgeLitItem);

    converterItem = new ItemBlock(craftiniumConverter);
    converterItem.setUnlocalizedName("craftinium_converter");
    blockItems.add(converterItem);

    oreItem = new ItemBlock(craftiniumOre);
    oreItem.setUnlocalizedName("craftinium_ore");
    blockItems.add(oreItem);

    for(Item item : blockItems) {
        item.setRegistryName(item.getUnlocalizedName().substring(5));
    }

    for(Block block : blocks) {
        block.setRegistryName(block.getUnlocalizedName().substring(5));
    }
}
 
開發者ID:Randores,項目名稱:Randores2,代碼行數:54,代碼來源:CraftingBlocks.java


注:本文中的net.minecraft.item.ItemBlock.setUnlocalizedName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。