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


Java ModelBakery.addVariantName方法代码示例

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


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

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

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

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

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

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

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

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

示例8: modelForMetadata

import net.minecraft.client.resources.model.ModelBakery; //导入方法依赖的package包/类
private static void modelForMetadata(Block block, String... parts) {
    Item item = DataUtil.getItem(block);
    for (int md = 0; md < parts.length; md++) {
        String name = parts[md];
        name = "factorization:" + name;
        parts[md] = name;
        ModelResourceLocation modelName = new ModelResourceLocation(name, "inventory");
        ModelLoader.setCustomModelResourceLocation(item, md, modelName);
    }
    ModelBakery.addVariantName(item, parts);
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:12,代码来源:FactorizationClientProxy.java

示例9: modelForMetadataExplicit

import net.minecraft.client.resources.model.ModelBakery; //导入方法依赖的package包/类
private static void modelForMetadataExplicit(Block block, Object... parts) {
    ArrayList<String> found = new ArrayList<String>();
    Item item = DataUtil.getItem(block);
    if (parts.length % 2 != 0) throw new IllegalArgumentException("Invalid argument format");
    for (int i = 0; i < parts.length; i += 2) {
        int md = (Integer) parts[i];
        String name = (String) parts[i + 1];
        name = "factorization:" + name;
        parts[i + 1] = name;
        ModelLoader.setCustomModelResourceLocation(item, md, new ModelResourceLocation(name, "inventory"));
        found.add(name);
    }
    ModelBakery.addVariantName(item, found.toArray(new String[found.size()]));
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:15,代码来源:FactorizationClientProxy.java

示例10: preInitClientOnly

import net.minecraft.client.resources.model.ModelBakery; //导入方法依赖的package包/类
public static void preInitClientOnly()
  {
//    need to add the variants to the bakery so it knows what models are available for rendering the different subtypes
    ModelBakery.addVariantName(StartupCommon.itemMT52,  "missingtextures:mt52_itemmodel_1"
//            , "missingtextures:mt52_itemmodel_2"
    );
  }
 
开发者ID:TheGreyGhost,项目名称:MissingTextures,代码行数:8,代码来源:StartupClientOnly.java

示例11: inventoryRender

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

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deepstone_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:coldstone_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:icestone_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:glacierrock_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_coldstone_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:red_rock_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_redrock_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:oceanstone_chiseled");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:pressurized_oceanstone_chiseled");

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

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

示例12: inventoryRender

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

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deepstone_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:coldstone_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:icestone_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:glacierrock_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_coldstone_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:red_rock_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_redrock_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:oceanstone_uranium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:pressurized_oceanstone_uranium");

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

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

示例13: preInitClientOnly

import net.minecraft.client.resources.model.ModelBakery; //导入方法依赖的package包/类
public static void preInitClientOnly()
  {
//    need to add the variants to the bakery so it knows what models are available for rendering the different subtypes
    ModelBakery.addVariantName(StartupCommon.itemVariants,  "missingtextures:mbe11_item_variants_0pc",
            "missingtextures:mbe11_item_variants_25pc",
            "missingtextures:mbe11_item_variants_50pc",
            "missingtextures:mbe11_item_variants_75pc",
            "missingtextures:mbe11_item_variants_100pc"
    );
  }
 
开发者ID:TheGreyGhost,项目名称:MissingTextures,代码行数:11,代码来源:StartupClientOnly.java

示例14: initModel

import net.minecraft.client.resources.model.ModelBakery; //导入方法依赖的package包/类
@Override
public void initModel() {
    String mesherName = CivCraft.instance.meta.modId + ":" + name + "_";
    String[] names = new String[] { mesherName + "none", mesherName + "some", mesherName + "all" };
    ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
    for (int i = 0; i < 3; i++)
        mesher.register(this, i, new ModelResourceLocation(names[i], "inventory"));
    ModelBakery.addVariantName(this, names);
}
 
开发者ID:AlexIIL,项目名称:CivCraft,代码行数:10,代码来源:ItemTechnology.java

示例15: inventoryRender

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

	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deepstone_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:coldstone_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:icestone_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:glacierrock_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_coldstone_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:red_rock_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:deep_redrock_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:oceanstone_titanium");
	ModelBakery.addVariantName(itemBlockBrickVariants, "ministrapp:pressurized_oceanstone_titanium");

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

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


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