@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()); }
@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()); } }
@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()); }
@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")); } } }
@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"); } }
/** * 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(); }
@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)); }
@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()); }
@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); }
@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); }
@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(); } } }
@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")); }
@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")); }
@SideOnly(Side.CLIENT) @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { ItemBase.ITEMS.forEach(ItemBase::registerClient); BlockBase.BLOCKS.forEach(BlockBase::registerClient); steelTools.bakeModels(); steelArmor.bakeModels(); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event) { ModBlocks.initModels(); ModEntities.initModels(); ModFluids.initModels(); ModItems.initModels(); }
@SideOnly(Side.CLIENT) default public void initModels(ModelRegistryEvent e) { if (this instanceof Item) sMRL("items", (Item) this, 0, "item=" + ((Item) this).getRegistryName().getResourcePath()); else if (this instanceof Block) ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock((Block) this), 0, new ModelResourceLocation(((IForgeRegistryEntry<?>) this).getRegistryName(), "inventory")); else throw new IllegalStateException("wat are u doin"); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event) { RenderingRegistry.registerEntityRenderingHandler(EntityItemFancy.class, new RenderEntityItemFancy.Factory()); RenderingRegistry.registerEntityRenderingHandler(EntityMagicCircles.class, new RenderEntityMagicCircles.Factory()); for (Item i : ModRegistry.ITEMS) if (i instanceof IHasModel) ((IHasModel) i).initModels(event); for (Block b : ModRegistry.BLOCKS) if (b instanceof IHasModel) ((IHasModel) b).initModels(event); }
@Override public void initModels(ModelRegistryEvent e) { for (int i = 0; variants > 0 ? i < variants : i <= 0; i++) { IHasModel.sMRL("items", this, i, "item=" + getRegistryName().getResourcePath() + (i == 0 ? "" : i)); } }
@SubscribeEvent @SideOnly(Side.CLIENT) public void onModelLoad(ModelRegistryEvent ev) { RandoresBlocks.registerModels(); RandoresItems.registerModels(); CraftingBlocks.registerModels(); CraftingItems.registerModels(); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels (ModelRegistryEvent event) { ModelRegistry modelRegistry = Chameleon.instance.modelRegistry; modelRegistry.registerItemVariants(material); modelRegistry.registerItemVariants(candelilla_seeds); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels (ModelRegistryEvent event) { ModelRegistry modelRegistry = Chameleon.instance.modelRegistry; modelRegistry.registerItemVariants(stoneMaterial); modelRegistry.registerItemVariants(metalMaterial); modelRegistry.registerItemVariants(bloomeryFurnace); modelRegistry.registerItemVariants(metalFence); modelRegistry.registerItemVariants(candelabra); modelRegistry.registerItemVariants(candelilla); ModelLoader.setCustomStateMapper(metalFence, (new StateMap.Builder()).withName(BlockFence.VARIANT).withSuffix("_wrought_iron_fence").build()); ModelLoader.setCustomStateMapper(metalLattice, (new StateMap.Builder()).withName(BlockLattice.VARIANT).withSuffix("_lattice").build()); ModelLoader.setCustomStateMapper(candelabra, (new StateMap.Builder()).withName(BlockCandelabra.VARIANT).withSuffix("_candelabra").build()); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalFence), 0, new ModelResourceLocation("gardenstuff:metal_fence_0", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalFence), 1, new ModelResourceLocation("gardenstuff:metal_fence_1", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalFence), 2, new ModelResourceLocation("gardenstuff:metal_fence_2", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalFence), 3, new ModelResourceLocation("gardenstuff:metal_fence_3", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalLattice), 0, new ModelResourceLocation("gardenstuff:lattice_iron", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalLattice), 1, new ModelResourceLocation("gardenstuff:lattice_wrought_iron", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalLattice), 2, new ModelResourceLocation("gardenstuff:lattice_rust", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalLattice), 3, new ModelResourceLocation("gardenstuff:lattice_aged", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(metalLattice), 4, new ModelResourceLocation("gardenstuff:lattice_moss", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(candelabra), 0, new ModelResourceLocation("gardenstuff:candelabra_level0", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(candelabra), 1, new ModelResourceLocation("gardenstuff:candelabra_level1", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(candelabra), 2, new ModelResourceLocation("gardenstuff:candelabra_level2", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(candelabra), 3, new ModelResourceLocation("gardenstuff:candelabra_level3", "inventory")); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event){ StateMapperBase mapper=new StateMapperBase() { @Override protected ModelResourceLocation getModelResourceLocation(IBlockState state) { return new ModelResourceLocation(new ResourceLocation(Constants.MODID, "creosote"), "creosote"); } }; if(FluidsRegistry.BlockCreosote!=null) ModelLoader.setCustomStateMapper(FluidsRegistry.BlockCreosote, mapper); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event){ coke.initModel(); ash.initModel(); fertilizer.initModel(); clay_Pot.initModel(); magic_Coal.initModel(); logPile.initModel(); cokeBlock.initModel(); stoneCollector.initModel(); brickCollector.initModel(); netherCollector.initModel(); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(final ModelRegistryEvent event) { for (final Item item : ITEMS) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } for (final Block block : BLOCKS) { if (block instanceof BlockLeaves) { ModelLoader.setCustomStateMapper(block, new StateMap.Builder().ignore(BlockLeaves.CHECK_DECAY, BlockLeaves.DECAYABLE).build()); } } }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(final ModelRegistryEvent event) { for (final Item item : ITEMS) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } }
@SubscribeEvent public void onModelRegistry(ModelRegistryEvent event){ // register all the things! for (ItemBase item : ItemRegistry.Items().All) { item.register(event); } }
@Override public void register(ModelRegistryEvent event) { // register the models ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(this.getRegistryName(), "inventory")); ModelLoader.setCustomModelResourceLocation(this, 1, new ModelResourceLocation(this.getRegistryName() + "_bound", "inventory")); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(ModelRegistryEvent event) { items.forEach(item->generalRegisterModel(item)); initSpecialModels(); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(ModelRegistryEvent event) { blocks.forEach( block->ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")) ); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(ModelRegistryEvent event) { ModItems.registerModels(); ModBlocks.registerModels(); }
default public void initModel(ModelRegistryEvent e) { System.out.println(((IForgeRegistryEntry<?>) this).getRegistryName()); if (this instanceof Item) ModelLoader.setCustomModelResourceLocation((Item) this, 0, new ModelResourceLocation(((IForgeRegistryEntry<?>) this).getRegistryName(), "inventory")); else if (this instanceof Block) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock((Block) this), 0, new ModelResourceLocation(((IForgeRegistryEntry<?>) this).getRegistryName(), "inventory")); System.out.println("block"); } else throw new IllegalArgumentException("No/invalid object for model"); }
public static final void registerItemRenders(ModelRegistryEvent e) { for (ItemBase item : items) { registerItemRender(item); } LogUtils.info("Registered item renders."); for (ItemBaseBlock block : blocks) { registerItemRender(block); } LogUtils.info("Registered block item renders."); }
@SubscribeEvent public void onModelRegistry(ModelRegistryEvent event) { for(ModelLocation l : MODELS_TO_REGISTER) { ModelLoader.setCustomModelResourceLocation(l.item, l.meta, l.location); } MODELS_TO_REGISTER.clear(); Log.logger.info("Models registered."); }
@SubscribeEvent @SideOnly(CLIENT) public static void registerModels(ModelRegistryEvent event) throws Exception { for (Field f : Items.class.getDeclaredFields()) { Item item = (Item)f.get(null); ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } ClientRegistry.bindTileEntitySpecialRenderer(TileEntityQuarry.class, new QuarryRenderer()); }
@SubscribeEvent @SideOnly(Side.CLIENT) public void registerModels(ModelRegistryEvent event) { PEARL_HOLDER.initModel(); JAR.initModel(); MANA_MAGNET.initModel(); registerFluidRender(FluidMana.instance); registerFluidRender(FluidNacre.instance); }
@SubscribeEvent public void onModelRegister(ModelRegistryEvent e) { for (Block b : GrowableCells.INFO.getBlockList()) if (b instanceof IHasModel) ((IHasModel) b).initModels(e); for (Item i : GrowableCells.INFO.getItemList()) if (i instanceof IHasModel) ((IHasModel) i).initModels(e); }
/** * Register this mod's Item Models. * * @param event The event */ @SubscribeEvent public static void registerItemBlockModels(ModelRegistryEvent event) { if (!ModConfig.items) return; CEREAL.initModel(); IRON_CEREAL.initModel(); LONDON_CLAY.initModel(); SAND_CLAY_MIXTURE.initModel(); LONDON_BRICK.initModel(); CREAM_BRICK.initModel(); RECORD_SCARLET.initModel(); RECORD_LOFI.initModel(); }
@SideOnly(Side.CLIENT) @SubscribeEvent public static void onModelRegistry(final ModelRegistryEvent event) { if (!ModConfiguration.registerNuggets) return; // register the inventory models for (EnumNuggetType nuggetType : EnumNuggetType.usedValues()) { ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(ModUncrafting.MODID + ":" + nuggetType.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(NUGGET, nuggetType.getMetadata(), itemModelResourceLocation); } }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void registerModels(final ModelRegistryEvent event) { // register the inventory model Item item = Item.getItemFromBlock(UNCRAFTING_TABLE); ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(UNCRAFTING_TABLE.getRegistryName().toString(), "inventory")); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event) { for (Block block: ModRegistry.ModBlocks) { ClientEventHandler.regBlock(block); } for (Item item: ModRegistry.ModItems) { ClientEventHandler.regItem(item); } }