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


Java ModelBakery类代码示例

本文整理汇总了Java中net.minecraft.client.resources.model.ModelBakery的典型用法代码示例。如果您正苦于以下问题:Java ModelBakery类的具体用法?Java ModelBakery怎么用?Java ModelBakery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ModelBakery类属于net.minecraft.client.resources.model包,在下文中一共展示了ModelBakery类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "bricks2");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:sandstone_brick");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:red_sandstone_brick");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "bricks2");
	ItemBrickTypes2[] aenumtype = ItemBrickTypes2.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		ItemBrickTypes2 enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_brick", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:23,代码来源:ItemBricks2.java

示例2: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "chips");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:preserver_chips");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:collision_chips");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:inversion_chips");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:selfsufficient_chips");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:placer_chips");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "chips");
	ItemChipTypes[] aenumtype = ItemChipTypes.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		ItemChipTypes enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_chips", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:26,代码来源:ItemUpgradeChips.java

示例3: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_planks");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:redwood_planks");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:frozen_oak_planks");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_planks");
	MWoodType[] aenumtype = MWoodType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		MWoodType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_planks", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:23,代码来源:MBlockPlanks.java

示例4: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_leaves");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:redwood_leaves");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:frozen_oak_leaves");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_leaves");
	MWoodType[] aenumtype = MWoodType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		MWoodType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_leaves", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:23,代码来源:MBlockLeaves.java

示例5: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_sapling");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:redwood_sapling");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:frozen_oak_sapling");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_sapling");
	MWoodType[] aenumtype = MWoodType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		MWoodType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_sapling", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:23,代码来源:MBlockSapling.java

示例6: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item item = GameRegistry.findItem(MReference.MODID, "virtian_soil");

	ModelBakery.addVariantName(item, "ministrapp:virtian_soil_dirt");
	ModelBakery.addVariantName(item, "ministrapp:virtian_soil_coarse_dirt");
	ModelBakery.addVariantName(item, "ministrapp:virtian_soil_podzol");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "virtian_soil");
	DirtType[] aenumtype = BlockDirt.DirtType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		BlockDirt.DirtType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + "virtian_soil_" + enumtype
				                                                                                                .getName(),
		                                                                            "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:24,代码来源:BlockVirtianSoil.java

示例7: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender(String type)
{
	Item itemBlockpVariants = GameRegistry.findItem(MReference.MODID, "pumpkin_minestrapp_" + type);

	ModelBakery.addVariantName(itemBlockpVariants, "ministrapp:simple_carved_" + type);
	ModelBakery.addVariantName(itemBlockpVariants, "ministrapp:average_carved_" + type);
	ModelBakery.addVariantName(itemBlockpVariants, "ministrapp:complex_carved_" + type);

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "pumpkin_minestrapp_" + type);
	MPumpkinType[] aenumtype = MPumpkinType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		MPumpkinType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_carved_" + type,
		                                                                            "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:25,代码来源:BlockCarvedPumpkin.java

示例8: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item item = GameRegistry.findItem(MReference.MODID, "cold_sand");

	ModelBakery.addVariantName(item, "ministrapp:cold_sand");
	ModelBakery.addVariantName(item, "ministrapp:cold_red_sand");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "cold_sand");
	EnumType[] aenumtype = BlockSand.EnumType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		BlockSand.EnumType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":" + "cold_"
			                                                                            + enumtype.getName(),
		                                                                            "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:22,代码来源:BlockMSand.java

示例9: inventoryRender

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void inventoryRender()
{
	Item itemBlockBrickVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_log");

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:redwood_log");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:frozen_oak_log");

	Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "ministrapp_log");
	MWoodType[] aenumtype = MWoodType.values();
	int i = aenumtype.length;

	for (int j = 0; j < i; ++j)
	{
		MWoodType enumtype = aenumtype[j];
		ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":"
			                                                                            + enumtype
				                                                                              .getUnlocalizedName()
			                                                                            + "_log", "inventory");
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
		         .register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:23,代码来源:MBlockLog.java

示例10: buildRenderFor

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static void buildRenderFor(Block block, String name)
{
	final ModelResourceLocation fluidLocation = new ModelResourceLocation(MReference.MODID + ":" + name, "fluid");
	Item fluid = Item.getItemFromBlock(block);
	ModelBakery.addVariantName(fluid);
	ModelLoader.setCustomMeshDefinition(fluid, new ItemMeshDefinition()
	{
		@Override
		public ModelResourceLocation getModelLocation(ItemStack stack)
		{
			return fluidLocation;
		}
	});
	ModelLoader.setCustomStateMapper(block, new StateMapperBase()
	{
		@Override
		protected ModelResourceLocation getModelResourceLocation(IBlockState state)
		{
			return fluidLocation;
		}
	});
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:24,代码来源:MFluid.java

示例11: registerRenders

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
@Override
public void registerRenders(){
    super.registerRenders();
    RenderingRegistry.registerEntityRenderingHandler(EntityRook.class, new RenderChessPiece(new ModelRook(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityKing.class, new RenderChessPiece(new ModelKing(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPawn.class, new RenderChessPiece(new ModelPawn(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityKnight.class, new RenderChessPiece(new ModelKnight(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityQueen.class, new RenderChessPiece(new ModelQueen(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityBishop.class, new RenderChessPiece(new ModelBishop(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPickyXPOrb.class, new RenderXPOrb(Minecraft.getMinecraft().getRenderManager()));
    MinecraftForge.EVENT_BUS.register(new MineChessDrawBlockHighlightHandler());

    String[] names = new String[5];
    for(int i = 0; i < 5; i++) {
        String name = "chessmod:" + new ItemStack(MineChess.itemPieceMover, 1, i).getUnlocalizedName().substring(5);
        names[i] = name;
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(MineChess.itemPieceMover, i, new ModelResourceLocation(name, "inventory"));
    }
    ModelBakery.addVariantName(MineChess.itemPieceMover, names);
}
 
开发者ID:MineMaarten,项目名称:MineChess,代码行数:21,代码来源:ClientProxyMineChess.java

示例12: registerVariants

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void registerVariants()
{
	String[] variantNames = new String[metaNames.length];
	for (int i = 0; i < metaNames.length; i++)
	{
		variantNames[i] = AuraMod.MODID + ":" + getNameFromDamage(i);
	}
	ModelBakery.addVariantName(AuraMod.orb, variantNames);
}
 
开发者ID:Glitch-Byte,项目名称:AuraMod,代码行数:10,代码来源:ItemAuraOrb.java

示例13: registerVariants

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
public static void registerVariants()
{
	String[] variants = new String[values().length];

	for (int i = 0; i < values().length; i++)
	{
		variants[i] = values()[i].getResouceLocation();
	}

	ModelBakery.addVariantName(Item.getItemFromBlock(AuraMod.AuraStone), variants);
}
 
开发者ID:Glitch-Byte,项目名称:AuraMod,代码行数:12,代码来源:BlockAuraStone.java

示例14: initOreChunks

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
private static void initOreChunks(RenderItem renderItem) {
    ModelBakery.registerItemVariants(
            ModItems.oreChunk,
            new ResourceLocation(Reference.MODID + ":ore_chunk_iron"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_gold"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_copper"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_tin"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_nickel"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_lead"),
            new ResourceLocation(Reference.MODID + ":ore_chunk_silver"));

    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.IRON_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_iron", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.GOLD_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_gold", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.COPPER_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_copper", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.TIN_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_tin", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.NICKEL_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_nickel", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.LEAD_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_lead", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.oreChunk,
            ItemOreChunk.SILVER_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":ore_chunk_silver", "inventory"));
}
 
开发者ID:CombatFrogs,项目名称:SimplySledgehammers,代码行数:41,代码来源:ModRendering.java

示例15: initUnsmeltedIngots

import net.minecraft.client.resources.model.ModelBakery; //导入依赖的package包/类
private static void initUnsmeltedIngots(RenderItem renderItem) {
    ModelBakery.registerItemVariants(
            ModItems.unsmeltedIngot,
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_iron"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_gold"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_copper"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_tin"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_nickel"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_lead"),
            new ResourceLocation(Reference.MODID + ":unsmelted_ingot_silver"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.IRON_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_iron", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.GOLD_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_gold", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.COPPER_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_copper", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.TIN_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_tin", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.NICKEL_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_nickel", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.LEAD_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_lead", "inventory"));
    renderItem.getItemModelMesher().register(
            ModItems.unsmeltedIngot,
            ItemUnsmeltedIngot.SILVER_DAMAGE,
            new ModelResourceLocation(Reference.MODID + ":unsmelted_ingot_silver", "inventory"));
}
 
开发者ID:CombatFrogs,项目名称:SimplySledgehammers,代码行数:40,代码来源:ModRendering.java


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