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


Java ItemBlock.setRegistryName方法代码示例

本文整理汇总了Java中net.minecraft.item.ItemBlock.setRegistryName方法的典型用法代码示例。如果您正苦于以下问题:Java ItemBlock.setRegistryName方法的具体用法?Java ItemBlock.setRegistryName怎么用?Java ItemBlock.setRegistryName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.item.ItemBlock的用法示例。


在下文中一共展示了ItemBlock.setRegistryName方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: register

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
public static void register() {
	for(Block block : HarshenConfigs.BLOCKS.allComponants)
		if(HarshenConfigs.BLOCKS.isEnabled(block))
		{
			ForgeRegistries.BLOCKS.register(block);
			if(blocksWithItems.contains(block))
			{
				ItemBlock item = block instanceof IMetaItemBlock ? add(block) : new ItemBlock(block);
				item.setRegistryName(block.getRegistryName());
				item.setMaxStackSize(blockStackSize.get(block));
				ForgeRegistries.ITEMS.register(item);
			}
				
		}
			
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:17,代码来源:HarshenBlocks.java

示例3: BlockWopper

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
public BlockWopper(String name){
    super(Material.WOOD);

    this.setRegistryName(name);
    GameRegistry.register(this);

    ItemBlock item = new ItemBlock(this);
    item.setRegistryName(name);
    GameRegistry.register(item);

    this.setUnlocalizedName(Wopper.MOD_ID+"."+name);
    this.setHardness(5F);
    this.setHarvestLevel("axe", 0);
    this.setCreativeTab(CreativeTabs.REDSTONE);
    this.setSoundType(SoundType.WOOD);
}
 
开发者ID:Ellpeck,项目名称:Wopper,代码行数:17,代码来源:BlockWopper.java

示例4: registerItemBlock

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
public void registerItemBlock(BlockBase block) {
	this.registerBlock(block);

	ItemBlock item = new ItemBlock(block);
	item.setRegistryName(block.getRegistryName());
	GameRegistry.register(item);

	block.itemBlock = item;
}
 
开发者ID:astronautlabs,项目名称:rezolve,代码行数:10,代码来源:RezolveMod.java

示例5: registerItems

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
    final IForgeRegistry<Item> registry = event.getRegistry();
    for (final IFluidBlock fluidBlock : MOD_FLUID_BLOCKS) {
        final Block block = (Block) fluidBlock;
        final ItemBlock itemBlock = new ItemBlock(block);
        itemBlock.setRegistryName(block.getRegistryName());
        registry.register(itemBlock);
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:11,代码来源:Fluids.java

示例6: registerBlock

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
private static void registerBlock(Block block) {
	
	GameRegistry.register(block);
	ItemBlock item = new ItemBlock(block);
	item.setRegistryName(block.getRegistryName());
	GameRegistry.register(item);
	
}
 
开发者ID:Bedrockbreaker,项目名称:rtap,代码行数:9,代码来源:ModBlocks.java

示例7: 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

示例8: registerBlock

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
public static void registerBlock(Block block, String name) {
	ForgeRegistries.BLOCKS.register(block.setRegistryName(name));
	ItemBlock item = new ItemBlock(block);
	item.setRegistryName(block.getRegistryName());
	ForgeRegistries.ITEMS.register(item);
	proxy.registerItemBlock(item);
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:8,代码来源:RIG.java

示例9: registerBlock

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
private static void registerBlock(Block block){
    GameRegistry.register(block);
    ItemBlock item = new ItemBlock(block);
    item.setRegistryName(block.getRegistryName());
    GameRegistry.register(item);
}
 
开发者ID:DeflatedPickles-Old-Repositories,项目名称:JustJunk,代码行数:7,代码来源:ModBlocks.java

示例10: getItem

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
protected ItemBlock getItem(){
    ItemBlock item = new ItemBlock(this);
    item.setRegistryName(this.getRegistryName());
    return item;
}
 
开发者ID:canitzp,项目名称:Metalworks,代码行数:6,代码来源:BlockBase.java

示例11: register

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
public static <T extends Block> T register(T b, ItemBlock ib) {
	registry.register(b);
	ib.setRegistryName(b.getRegistryName());
	ItemHandler.itemBlocks.add(ib);
	return b;
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:7,代码来源:BlockHandler.java

示例12: register

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
private static <T extends Block> T register(T block) {
	ItemBlock itemBlock = new ItemBlock(block);
	itemBlock.setRegistryName(block.getRegistryName());
	return register(block, itemBlock);
}
 
开发者ID:djeezuss,项目名称:Valkyrien-Warfare-Drivers-for-OpenComputers,代码行数:6,代码来源:ModBlocks.java

示例13: onRegister

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
@SubscribeEvent
public static void onRegister(RegistryEvent.Register<Item> event) {
	//Thermionics.LOG.info("Registering items");
	
	IForgeRegistry<Item> r = event.getRegistry();
	
	//Blocks first
	for(Block b : Thermionics.instance().needItemRegistration) {
		if (b instanceof BlockBase) {
			item(r, new ItemBlockEquivalentState(b));
		} else if (b instanceof BlockBattery) {
			item(r, new ItemBlockBattery(b));
		} else {
			ItemBlock i = new ItemBlock(b);
			i.setRegistryName(b.getRegistryName());
			item(r, i);
		}
	}
	
	//Unified Hammer
	ThermionicsItems.HAMMER             = item(r, new ItemHammer(ToolMaterial.IRON,    "iron"));
	
	//Legacy Hammers - switchover to neo-hammer isn't done yet, so always register
	//if (CONFIG_ENFORCE_COMPATIBILITY) {
		ThermionicsItems.HAMMER_GOLD    = item(r, new ItemHammer(ToolMaterial.GOLD,    "gold"));
		ThermionicsItems.HAMMER_DIAMOND = item(r, new ItemHammer(ToolMaterial.DIAMOND, "diamond"));
		//Since we can't *safely*, *cleanly* rendezvous with other mods about Item.ToolMaterial properties, make our own
		//For hammers, these values are multiplied by 9 (so iron, which gives a pick 250 uses, gives a hammer 2250 to
		//compensate for the extra material used
           /*                                                        name      repairOre     level  uses eff dmg ench */
           /*                                                        iron      ingotIron      2     250  6f  2f  14   */
		ThermionicsItems.HAMMER_COPPER  = item(r, new ItemHammer("copper", "ingotCopper", 2,     200, 7f, 1f, 20));
		ThermionicsItems.HAMMER_LEAD    = item(r, new ItemHammer("lead",   "ingotLead",   2,    1550, 4f, 2f,  8));
		ThermionicsItems.HAMMER_INVAR   = item(r, new ItemHammer("invar",  "ingotInvar",  2,     300, 6f, 2f, 14));
	//}
	
	//Ingredients
	ThermionicsItems.INGREDIENT         = item(r, new ItemSubtyped<EnumIngredient>      ("ingredient",       EnumIngredient.values(),       false));
	ThermionicsItems.FABRIC_SQUARE      = item(r, new ItemFabricSquare());
	ThermionicsItems.ALLOMANTIC_POWDER  = item(r, new ItemSubtyped<EnumAllomanticPowder>("allomanticpowder", EnumAllomanticPowder.values(), true));
	OreDictionary.registerOre("gearBrass", new ItemStack(ThermionicsItems.INGREDIENT,1, EnumIngredient.GEAR_BRASS.ordinal()));
	
	//Booze
	ThermionicsItems.EMPTY_SPIRIT_BOTTLE= item(r, new ItemSpiritBottle("empty"));
	ThermionicsItems.SPIRIT_BOTTLE      = item(r, new ItemSpiritBottle(null));
	
	//Cloaks
	ThermionicsItems.MISTCLOAK          = item(r, new ItemMistcloak());
	ThermionicsItems.SCARF              = item(r, new ItemScarf());
	
	//Creative
	ThermionicsItems.CHUNK_UNLOADER     = item(r, new ItemChunkUnloader());
}
 
开发者ID:elytra,项目名称:Thermionics,代码行数:54,代码来源:ThermionicsItems.java

示例14: register

import net.minecraft.item.ItemBlock; //导入方法依赖的package包/类
private static <T extends Block> T register(T block) {
    ItemBlock itemBlock = new ItemBlock(block);
    itemBlock.setRegistryName(block.getRegistryName());
    return register(block, itemBlock);
}
 
开发者ID:OCDiary,项目名称:TheOink,代码行数:6,代码来源:OinkBlocks.java


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