本文整理匯總了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;
}
示例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);
}
示例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));
}
}