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


Java ModelRegistryEvent类代码示例

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


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

示例1: setupModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
   public static void setupModels(ModelRegistryEvent event) {
	
	registerBlockModel(lodestone_ore);
	registerBlockModel(celestial_stone);
	registerBlockModel(rift);
	registerBlockModel(pipe);
	registerBlockModel(stability_projector);
	
	registerBlockModel(test_tank);
	registerBlockModel(creative_tank);
	
	((ItemMaterial) material).registerModels();
	registerItemModel(seeing_stone);
	registerItemModel(tuning_fork);
	
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRift.class, new TileEntityRiftRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new TileEntityPipeRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStabilityProjector.class, new TileEntityStabilityProjectorRenderer());
}
 
开发者ID:the-realest-stu,项目名称:Etheric,代码行数:21,代码来源:RegistryManager.java

示例2: handleModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void handleModels(ModelRegistryEvent event)
{
    for (Map.Entry<ItemStack, ModelResourceLocation> entry : LOCATIONS.entrySet())
    {
        ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
    }
}
 
开发者ID:oitsjustjose,项目名称:Geolosys,代码行数:10,代码来源:ClientRegistry.java

示例3: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
	registerItem(ModItems.largemass);
	registerItem(ModItems.defiercore);
	registerItem(ModItems.pattern);
	registerItem(ModItems.defierstar);
	registerItem(ModItems.energystar);
	registerItem(ModItems.energystar, 1);
	registerItem(ModItems.energystar, 2);
	registerItem(ModItems.energystar, 3);
	registerItem(ModItems.strongstar);
	registerItem(ModItems.speedstar);
	registerItem(Item.getItemFromBlock(ModItems.compressor));
	registerItem(Item.getItemFromBlock(ModItems.patternmolder));
	
	ModelRegistryHelper.registerItemRenderer(Item.getItemFromBlock(ModItems.defier), new RenderDefierItem());
	ModelRegistryHelper.registerItemRenderer(Item.getItemFromBlock(ModItems.energyprovider), new RenderEnergyProviderItem());
}
 
开发者ID:tiffit,项目名称:Defier,代码行数:19,代码来源:ClientProxy.java

示例4: registerInventoryModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerInventoryModels(final ModelRegistryEvent event)
{
	for (Item item : items)
	{
		if (item instanceof IMultiItem)
		{
			final Class enumClass = (Class<?>)ReflectionUtils.getGenericInterfaceType(item.getClass(), IMultiItem.class);
			for (ISubItem value : (ISubItem[])enumClass.getEnumConstants())
			{
				ModelLoader.setCustomModelResourceLocation(item, value.getMetadata(), new ModelResourceLocation(item.getRegistryName(), "inventory"));
			}
		}
		else
		{
			ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
		}
	}

}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:22,代码来源:ModItems.java

示例5: onModelRegistry

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent e) 
{
	for (Item item : Ref.ITEMS)
		if (item instanceof IHasModel)
		{
			((IHasModel) item).initModel(e);
			
		}
	for (Block block : Ref.BLOCKS)
		if (block instanceof IHasModel)
		{
			((IHasModel) block).initModel(e);
			System.out.println("initModel run");
		}
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:17,代码来源:ClientProxy.java

示例6: registerItemBlockModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
/**
 * Register this mod's ItemBlock Models.
 *
 * @param event The event
 */
@SubscribeEvent
public static void registerItemBlockModels(ModelRegistryEvent event) {
	if (!ModConfig.blocks)
		return;

	VIEWED_BLOCK.initModel();
	SMOOTH_GLOWSTONE.initModel();
	STAINED_LAMP.initModel();
	LIT_STAINED_LAMP.initModel();
	POLISHED_GLOWSTONE.initModel();
	SNOW_BRICK.initModel();
	BLOCK_BREAKER.initModel();
	CRYING_OBSIDIAN.initModel();
	SPIKE_BLOCK.initModel();
	BLOCK_PLACER.initModel();
	DECORATIVE_STONE.initModel();
	BRICK_VARIANT.initModel();
	
	SMOOTH_DOUBLE_STONE_SLAB.initModel();
	SMOOTH_DOUBLE_SANDSTONE_SLAB.initModel();
	SMOOTH_DOUBLE_RED_SANDSTONE_SLAB.initModel();
	SLATE.initModel();
}
 
开发者ID:williambl,项目名称:EssentialFeatures,代码行数:29,代码来源:ModBlocks.java

示例7: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
    registerRender(Bonfires.estusFlask, 0, Bonfires.estusFlask.getRegistryName() + "_empty");
    registerRender(Bonfires.estusFlask, 1, Bonfires.estusFlask.getRegistryName() + "_quarter");
    registerRender(Bonfires.estusFlask, 2, Bonfires.estusFlask.getRegistryName() + "_half");
    registerRender(Bonfires.estusFlask, 3, Bonfires.estusFlask.getRegistryName() + "");
    registerRender(Bonfires.ashPile);
    registerRender(Bonfires.coiledSword);
    registerRender(Bonfires.coiledSwordFragment);
    registerRender(Bonfires.estusShard);
    registerRender(Bonfires.homewardBone);
    registerRender(Bonfires.titaniteShard);
    registerRender(Bonfires.largeTitaniteShard);
    registerRender(Bonfires.titaniteChunk);
    registerRender(Bonfires.titaniteSlab);
    registerRender(Bonfires.undeadBoneShard);
    registerRender(Item.getItemFromBlock(Bonfires.ashBonePile));
    registerRender(Item.getItemFromBlock(Bonfires.ashBlock));
}
 
开发者ID:Wehavecookies56,项目名称:Bonfires,代码行数:20,代码来源:ClientProxy.java

示例8: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
{
    OBJLoader.INSTANCE.addDomain(EnderRiftMod.MODID);

    registerItemModel(EnderRiftMod.riftOrb);
    registerBlockModelAsItem(EnderRiftMod.rift);
    registerBlockModelAsItem(EnderRiftMod.structure);
    registerBlockModelAsItem(EnderRiftMod.riftInterface);
    registerBlockModelAsItem(EnderRiftMod.browser, 0, "crafting=false,facing=south");
    registerBlockModelAsItem(EnderRiftMod.browser, 1, "crafting=true,facing=south");
    registerBlockModelAsItem(EnderRiftMod.extension);
    registerBlockModelAsItem(EnderRiftMod.generator);
    registerBlockModelAsItem(EnderRiftMod.driver);

    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderRift.class, new RenderRift());
}
 
开发者ID:gigaherz,项目名称:Ender-Rift,代码行数:18,代码来源:ClientProxy.java

示例9: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(final ModelRegistryEvent event) {
    ModelLoader.setCustomModelResourceLocation(SWItems.DOG_TAG, 0, Resources.DOG_TAG_MODEL);
    ModelLoader.setCustomModelResourceLocation(SWItems.DOG_TREAT, 0, Resources.DOG_TREAT_MODEL);
    ModelLoader.setCustomModelResourceLocation(SWItems.WHISTLE, 0, Resources.WHISTLE_MODEL);
    ModelLoader.setCustomModelResourceLocation(SWItems.PET_CARRIER, 0, Resources.PET_CARRIER_MODEL);

    for (EnumWolfSpecies wolfSpecies : EnumWolfSpecies.values()) {
        ModelLoader.setCustomModelResourceLocation(SWItems.DOG_EGG, wolfSpecies.ordinal(), Resources.SPAWN_EGG_MODEL);
    }

    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 0, Resources.DOG_BOWL);
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 1, Resources.DOG_BOWL1);
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 2, Resources.DOG_BOWL2);
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 3, Resources.DOG_BOWL3);
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 4, Resources.DOG_BOWL4);
    ModelBakery.registerItemVariants(SWBlocks.DOG_BOWL_IB, Resources.DOG_BOWL, Resources.DOG_BOWL1, Resources.DOG_BOWL2, Resources.DOG_BOWL3, Resources.DOG_BOWL4);
}
 
开发者ID:NightKosh,项目名称:Sophisticated-wolves,代码行数:19,代码来源:SWModels.java

示例10: onModelRegister

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegister(ModelRegistryEvent e) {
 regRenderer(EnderZoo.itemWitheringDust, ItemWitheringDust.NAME);
 regRenderer(EnderZoo.itemConfusingDust, ItemConfusingDust.NAME);
 regRenderer(EnderZoo.itemEnderFragment, ItemEnderFragment.NAME);
 regRenderer(EnderZoo.itemOwlEgg, ItemOwlEgg.NAME);
 regRenderer(EnderZoo.itemForCreativeMenuIcon, ItemForCreativeMenuIcon.NAME);
 if (Config.guardiansBowEnabled) 
     regRenderer(EnderZoo.itemGuardiansBow, ItemGuardiansBow.NAME);
 if (Config.confusingChargeEnabled) 
   regRenderer(Item.getItemFromBlock(EnderZoo.blockConfusingCharge), BlockConfusingCharge.NAME);
 if (Config.concussionChargeEnabled)
   regRenderer(Item.getItemFromBlock(EnderZoo.blockConcussionCharge), BlockConcussionCharge.NAME);
 if (Config.enderChargeEnabled)
   regRenderer(Item.getItemFromBlock(EnderZoo.blockEnderCharge), BlockEnderCharge.NAME);
}
 
开发者ID:SleepyTrousers,项目名称:EnderZoo,代码行数:17,代码来源:ClientProxy.java

示例11: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void registerModels(ModelRegistryEvent event){
	for (Item i : items){
		if (i instanceof IModeledObject){
			((IModeledObject)i).initModel();
		}
	}
	for (Block b : blocks){
		if (b instanceof IModeledObject){
			((IModeledObject)b).initModel();
		}
	}
}
 
开发者ID:elucent,项目名称:SimplyTea,代码行数:14,代码来源:SimplyTea.java

示例12: onModelRegistry

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event)
{
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 0, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass", "inventory"));
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 1, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass_projector", "inventory"));
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 2, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass", "inventory"));

    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlassTerminal), 0, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass_terminal", "inventory"));
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:10,代码来源:EventHandlerClient.java

示例13: onModelRegistry

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event)
{
    ModelLoader.setCustomModelResourceLocation(Torched.itemTorchGun, 0, new ModelResourceLocation("torched:torchgun", "inventory"));
    ModelLoader.setCustomModelResourceLocation(Torched.itemTorchFirework, 0, new ModelResourceLocation("torched:torchfirework", "inventory"));
    ModelLoader.setCustomModelResourceLocation(Torched.itemTorchFirework, 1, new ModelResourceLocation("torched:torchrpt", "inventory"));
    ModelLoader.setCustomModelResourceLocation(Torched.itemTorchLauncher, 0, new ModelResourceLocation("torched:torchlauncher", "inventory"));

    ModelBakery.registerItemVariants(Torched.itemTorchFirework, new ResourceLocation("torched", "torchfirework"), new ResourceLocation("torched", "torchrpt"));
}
 
开发者ID:iChun,项目名称:Torched,代码行数:11,代码来源:EventHandlerClient.java

示例14: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
    ItemBase.ITEMS.forEach(ItemBase::registerClient);
    BlockBase.BLOCKS.forEach(BlockBase::registerClient);

    steelTools.bakeModels();
    steelArmor.bakeModels();
}
 
开发者ID:canitzp,项目名称:Metalworks,代码行数:10,代码来源:Registry.java

示例15: registerModels

import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
{
	ModBlocks.initModels();
	ModEntities.initModels();
	ModFluids.initModels();
	ModItems.initModels();
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:9,代码来源:ClientProxy.java


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