當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。