本文整理汇总了Java中net.minecraft.item.Item.setRegistryName方法的典型用法代码示例。如果您正苦于以下问题:Java Item.setRegistryName方法的具体用法?Java Item.setRegistryName怎么用?Java Item.setRegistryName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.item.Item
的用法示例。
在下文中一共展示了Item.setRegistryName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static void init() {
items = new ArrayList<>();
craftiniumLump = new Item().setUnlocalizedName("craftinium_lump").setCreativeTab(Randores.TAB_CRAFTING);
items.add(craftiniumLump);
tome = new TomeItem().setUnlocalizedName("material_tome").setMaxStackSize(1);
tome.setCreativeTab(new TomeTab());
items.add(tome);
for(Item item : items) {
item.setRegistryName(item.getUnlocalizedName().substring(5));
}
}
示例2: generalRegisterItem
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static void generalRegisterItem(String name, Item item, boolean genericModel)
{
item.setUnlocalizedName(ModConstants.MODID + ":" + name);
item.setRegistryName(name);
item.setCreativeTab(AnimaTab.Tab);
if(genericModel)
items.add(item);
}
示例3: initItem
import net.minecraft.item.Item; //导入方法依赖的package包/类
protected void initItem(Item item, ContentHelper helper)
{
this.item = item;
item.setUnlocalizedName(helper.getModId() + "." + id);
item.setRegistryName(id);
}
示例4: registerItem
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static void registerItem(String id,Item item)
{
item.setRegistryName(Soot.MODID,id);
item.setUnlocalizedName(id);
registerItem(item,true);
}
示例5: init
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static void init() {
items = new ArrayList<>();
RandoresTab materialsTab = null;
for(MaterialType type : Randores.getDefaultMaterials()) {
RandoresMaterial material = new RandoresMaterial(type);
material.setUnlocalizedName(type.getName()).setCreativeTab(materialsTab == null ? (materialsTab = new RandoresTab("randores_materials", material)) : materialsTab);
items.add(material);
RandoresItemRegistry.instance().register(material);
}
pickaxe = new RandoresItem(RandoresKeys.PICKAXE);
pickaxe.setUnlocalizedName(RandoresKeys.PICKAXE).setCreativeTab(new RandoresTab("randores_pickaxes", pickaxe));
items.add(pickaxe);
axe = new RandoresItem(RandoresKeys.AXE);
axe.setUnlocalizedName(RandoresKeys.AXE).setCreativeTab(new RandoresTab("randores_axes", axe));
items.add(axe);
shovel = new RandoresItem(RandoresKeys.SHOVEL);
shovel.setUnlocalizedName(RandoresKeys.SHOVEL).setCreativeTab(new RandoresTab("randores_spades", shovel));
items.add(shovel);
hoe = new RandoresItem(RandoresKeys.HOE);
hoe.setUnlocalizedName(RandoresKeys.HOE).setCreativeTab(new RandoresTab("randores_hoes", hoe));
items.add(hoe);
sword = new RandoresItem(RandoresKeys.SWORD);
sword.setUnlocalizedName(RandoresKeys.SWORD).setCreativeTab(new RandoresTab("randores_swords", sword));
items.add(sword);
bow = new RandoresBow(ComponentType.craftable(RandoresKeys.BOW));
bow.setUnlocalizedName(RandoresKeys.BOW).setCreativeTab(new RandoresTab("randores_bows", bow));
items.add(bow);
stick = new RandoresBasicItem(ComponentType.craftable(RandoresKeys.STICK));
stick.setUnlocalizedName(RandoresKeys.STICK).setCreativeTab(new RandoresTab("randores_sticks", stick));
items.add(stick);
battleaxe = new RandoresBattleaxe(ComponentType.craftable(RandoresKeys.BATTLEAXE));
battleaxe.setUnlocalizedName(RandoresKeys.BATTLEAXE).setCreativeTab(new RandoresTab("randores_battleaxes", battleaxe));
items.add(battleaxe);
sledgehammer = new RandoresSledgehammer(ComponentType.craftable(RandoresKeys.SLEDGEHAMMER));
sledgehammer.setUnlocalizedName(RandoresKeys.SLEDGEHAMMER).setCreativeTab(new RandoresTab("randores_sledgehammers", sledgehammer));
items.add(sledgehammer);
helmet = new RandoresItemArmor(CraftableTypeRegistry.instance().get(RandoresKeys.HELMET));
helmet.setUnlocalizedName(RandoresKeys.HELMET).setCreativeTab(Randores.TAB_ARMOR);
items.add(helmet);
chestplate = new RandoresItemArmor(CraftableTypeRegistry.instance().get(RandoresKeys.CHESTPLATE));
chestplate.setUnlocalizedName(RandoresKeys.CHESTPLATE).setCreativeTab(Randores.TAB_ARMOR);
items.add(chestplate);
leggings = new RandoresItemArmor(CraftableTypeRegistry.instance().get(RandoresKeys.LEGGINGS));
leggings.setUnlocalizedName(RandoresKeys.LEGGINGS).setCreativeTab(Randores.TAB_ARMOR);
items.add(leggings);
boots = new RandoresItemArmor(CraftableTypeRegistry.instance().get(RandoresKeys.BOOTS));
boots.setUnlocalizedName(RandoresKeys.BOOTS).setCreativeTab(Randores.TAB_ARMOR);
items.add(boots);
for(Item item : items) {
item.setRegistryName(item.getUnlocalizedName().substring(5));
}
}
示例6: init
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static void init() {
blocks = new ArrayList<>();
blockItems = new ArrayList<>();
RandoresTab oreTab = null;
for(OreType oreType : Randores.getDefaultOres()) {
for(MaterialType materialType : Randores.getDefaultMaterials()) {
RandoresOre ore = new RandoresOre(Material.ROCK, oreType, materialType);
RandoresItemBlock oreItem = new RandoresItemBlock(ore);
oreItem.setUnlocalizedName(RandoresKeys.ORE + "_" + materialType.getOreName() + "_" + oreType.getName());
blockItems.add(oreItem);
ore.setUnlocalizedName(RandoresKeys.ORE + "_" + materialType.getOreName() + "_" + oreType.getName()).setHardness(3.0F).setResistance(5.0F).setCreativeTab(oreTab == null ? (oreTab = new RandoresTab("randores_ores", ore)) : oreTab);
blocks.add(ore);
RandoresItemRegistry.instance().register(ore);
}
}
brick = new RandoresBlock(Material.ROCK, ComponentType.craftable(CraftableTypeRegistry.instance().get(RandoresKeys.BRICKS)), SoundType.STONE);
brick.setHarvestLevel("pickaxe", 1);
brickItem = new RandoresItemBlock(brick);
brickItem.setUnlocalizedName(RandoresKeys.BRICKS);
blockItems.add(brickItem);
brick.setUnlocalizedName(RandoresKeys.BRICKS).setHardness(2f).setResistance(10f).setCreativeTab(new RandoresTab("randores_bricks", brick));
blocks.add(brick);
torch = new RandoresTorch();
torchItem = new RandoresItemBlock(torch);
torchItem.setUnlocalizedName(RandoresKeys.TORCH);
blockItems.add(torchItem);
torch.setUnlocalizedName(RandoresKeys.TORCH).setHardness(0.0F).setLightLevel(0.9375F).setCreativeTab(new RandoresTab("randores_torches", torch));
blocks.add(torch);
for(Item item : blockItems) {
item.setRegistryName(item.getUnlocalizedName().substring(5));
}
for(Block block : blocks) {
block.setRegistryName(block.getUnlocalizedName().substring(5));
}
}
示例7: init
import net.minecraft.item.Item; //导入方法依赖的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));
}
}
示例8: registerItem
import net.minecraft.item.Item; //导入方法依赖的package包/类
private static void registerItem(final IForgeRegistry<Item> registry, final Item item, final String name) {
item.setRegistryName(GenesisMod.MOD_ID, name);
item.setUnlocalizedName(GenesisMod.MOD_ID + "." + name);
registry.register(item);
ITEMS.add(item);
}
示例9: registerItem
import net.minecraft.item.Item; //导入方法依赖的package包/类
public static Item registerItem(Item item, ResourceLocation rl) {
item.setRegistryName(rl);
return registerItem(item);
}