本文整理汇总了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));
}
}