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


Java Block.setCreativeTab方法代码示例

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


在下文中一共展示了Block.setCreativeTab方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerBlocks

import net.minecraft.block.Block; //导入方法依赖的package包/类
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
    final IForgeRegistry<Block> registry = event.getRegistry();

    for (final IFluidBlock fluidBlock : MOD_FLUID_BLOCKS) {
        final Block block = (Block) fluidBlock;
        block.setRegistryName(RL("fluid." + fluidBlock.getFluid().getName()));
        block.setUnlocalizedName(fluidBlock.getFluid().getName());
        block.setCreativeTab(PneumaticCraftRepressurized.tabPneumaticCraft);
        registry.register(block);
        fluidToBlockMap.put(fluidBlock.getFluid().getName(), block);
        Log.info("registered block for fluid: " + fluidBlock.getFluid().getName());
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:15,代码来源:Fluids.java

示例2: regRender

import net.minecraft.block.Block; //导入方法依赖的package包/类
public static void regRender(Block block) {
	block.setCreativeTab(HarshenCastle.harshenTab);
	int timesToLoad = 1;
	boolean flag = blockDataMap.keySet().contains(block);
	if(flag)
		timesToLoad = blockDataMap.get(block);
	for(int i = 0; i < timesToLoad; i++)
		ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), i, new ModelResourceLocation(block.getRegistryName() + 
				(flag ? "." + ((IMetaItemBlock)block).getNames()[i]: ""), "inventory"));
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:11,代码来源:HarshenBlocks.java

示例3: registerBlock

import net.minecraft.block.Block; //导入方法依赖的package包/类
private static void registerBlock(Block block, String registryName, ItemBlock itemBlock, boolean inCreativeTab) {
    // Set the registry name.
    block.setRegistryName(Reference.MOD_ID, registryName);
    block.setUnlocalizedName(Reference.MOD_ID + "." + registryName);
    // Add to the game registry.
    GameRegistry.register(block);
    GameRegistry.register(itemBlock, block.getRegistryName());

    if (inCreativeTab)
        block.setCreativeTab(ChatBomb.creativeTab);

    System.out.println("Registered block ~ "+block.getRegistryName());

}
 
开发者ID:MasterEric,项目名称:ChatBomb,代码行数:15,代码来源:ModBlocks.java

示例4: generalRegisterBlock

import net.minecraft.block.Block; //导入方法依赖的package包/类
public static void generalRegisterBlock(String name, Block block)
{
	block.setUnlocalizedName(ModConstants.MODID + ":" + name);
	block.setRegistryName(name);
	block.setCreativeTab(AnimaTab.Tab);
	blocks.add(block);
}
 
开发者ID:Lemonszz,项目名称:Anima-Mundi,代码行数:8,代码来源:AnimaBlocks.java


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