@EventHandler public void preinit(FMLPreInitializationEvent event) { ItemRegistry items; BlockRegistry blocks; EntityRegister entityreg; OBJLoader.INSTANCE.addDomain(HeroUtils.MODID); proxy.init(); tab = new TabRegister(); items = new ItemRegistry(); items.init(); items.register(); blocks = new BlockRegistry(); blocks.init(); blocks.register(); entityreg = new EntityRegister(); entityreg.register(); }
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); ModItems.initClient(); ModelLoaderRegistry.registerLoader(new BakedModelLoader()); ModelLoaderRegistry.registerLoader(ModelSeed.LoaderSeeds.INSTANCE); ModelLoaderRegistry.registerLoader(ModelWrappedFood.LoaderWrappedFood.INSTANCE); IResourceManager manager = FMLClientHandler.instance().getClient().getResourceManager(); if(manager !=null && manager instanceof IReloadableResourceManager){ ((IReloadableResourceManager)manager).registerReloadListener(new GuidePageLoader()); ((IReloadableResourceManager)manager).registerReloadListener(this); } MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); MinecraftForge.EVENT_BUS.register(new DisguiseClientHandler()); ModBlocks.initClient(); ModEntites.initClient(); OBJLoader.INSTANCE.addDomain(CrystalMod.MODID); }
public static IBakedModel getBakedCluster(){ if(bakedCluster == null){ IModel model; try { model = OBJLoader.INSTANCE.loadModel(CrystalMod.resourceL("models/block/obj/cluster.obj")); Function<ResourceLocation, TextureAtlasSprite> textureGetter; textureGetter = new Function<ResourceLocation, TextureAtlasSprite>() { @Override public TextureAtlasSprite apply(ResourceLocation location) { return RenderUtil.getSprite(location); } }; bakedCluster = model.bake(new SimpleModelState(DynamicBaseModel.DEFAULT_PERSPECTIVE_TRANSFORMS), DefaultVertexFormats.BLOCK, textureGetter); } catch (Exception e) { e.printStackTrace(); } } return bakedCluster; }
@Override public void preInit(final FMLPreInitializationEvent e) { OBJLoader.INSTANCE.addDomain(QBarConstants.MODID); ModelLoaderRegistry.registerLoader(QBarOBJLoader.INSTANCE); QBarOBJLoader.INSTANCE.addDomain(QBarConstants.MODID); MinecraftForge.EVENT_BUS.register(this); super.preInit(e); QBarOBJLoader.INSTANCE.addRetexturedModel("_belt_animated.mwm", new ResourceLocation(QBarConstants.MODID + ":block/belt.mwm"), new String[]{"Top"}, new String[]{"qbar:blocks/belt_top_anim"}); QBarOBJLoader.INSTANCE.addRetexturedModel("_belt_slope_animated.mwm", new ResourceLocation(QBarConstants.MODID + ":block/belt_slope.mwm"), new String[]{"None"}, new String[]{"qbar:blocks/belt_slope_anim"}); QBarOBJLoader.INSTANCE.addRetexturedModel("_belt_slope2_animated.mwm", new ResourceLocation(QBarConstants.MODID + ":block/belt_slope2.mwm"), new String[]{"None"}, new String[]{"qbar:blocks/belt_slope_anim"}); ClientProxy.registerFluidsClient(); MinecraftForge.EVENT_BUS.register(new ClientTickHandler()); QBarItems.ITEMS.stream().filter(item -> item instanceof IItemModelProvider) .forEach(item -> ((IItemModelProvider) item).registerVariants()); }
@Override public void preInit() { OBJLoader.INSTANCE.addDomain(Enderthing.MODID); ClientRegistry.bindTileEntitySpecialRenderer(TileEnderKeyChest.class, new RenderEnderKeyChest()); registerBlockModelAsItem(Enderthing.enderKeyChest, 0, "facing=north,inventory=true,private=false"); registerBlockModelAsItem(Enderthing.enderKeyChest, 8, "facing=north,inventory=true,private=true"); registerItemModel(Enderthing.enderKey, 0, "ender_key"); registerItemModel(Enderthing.enderKey, 1, "ender_key_private"); registerItemModel(Enderthing.enderLock, 0, "ender_lock"); registerItemModel(Enderthing.enderLock, 1, "ender_lock_private"); registerItemModel(Enderthing.enderPack, 0, "ender_pack"); registerItemModel(Enderthing.enderPack, 1, "ender_pack_private"); registerItemModel(Enderthing.enderCard, 0, "ender_card"); }
@Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); OBJLoader.INSTANCE.addDomain(Constants.MOD_ID); LaserRenderer.INSTANCE.getClass(); ScrewdriverOverlay.INSTANCE.getClass(); GunOverlay.INSTANCE.getClass(); EventHandlerClient.INSTANCE.getClass(); // ditto ModBlocks.initModels(); ModItems.initModels(); RenderingRegistry.registerEntityRenderingHandler(EntityLaserPointer.class, RenderLaserPoint::new); RenderingRegistry.registerEntityRenderingHandler(EntityPlasma.class, RenderPlasma::new); RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, manager -> new RenderGrenade(manager, ModItems.GRENADE, Minecraft.getMinecraft().getRenderItem())); }
@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()); }
public static void init() { //Blocks ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.blockGemGreen), 0); ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.blockGemOrange), 0); ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.blockGemPurple), 0); ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.gemOre), 0); ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.blockCable), 0); OBJLoader.INSTANCE.addDomain(powerofmagic.MODID.toLowerCase()); ModelHelper.registerItemModel(Item.getItemFromBlock(BlockRegistry.gemCube), 0); //Items ((IModelRegister)ItemRegistry.gem).registerModels(); MinecraftForge.EVENT_BUS.register(new BlockModelResolver()); }
@Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); OBJLoader.INSTANCE.addDomain(Reference.MOD_ID); //MinecraftForge.EVENT_BUS.register(new MobRenderInPrisonHandler()); MinecraftForge.EVENT_BUS.register(new IFTextureStichEvent()); MinecraftForge.EVENT_BUS.register(new IFWorldRenderLastEvent()); MinecraftForge.EVENT_BUS.register(new IFTooltipEvent()); }
@Override public void preInit() { Minecraft.getMinecraft().getFramebuffer().enableStencil(); OBJLoader.INSTANCE.addDomain(PurMag.MODID); EntityRegistry.registerClient(); PurMagClient.INSTANCE.getMicroscopeDataBuilder().setup(); }
@Override public void preInit(FMLPreInitializationEvent event) { OBJLoader.INSTANCE.addDomain(Thelta.MODID); super.preInit(event); state = ContextState.ModelRegistration; for (TheltaModule module : modules) { module.registerModels(this); } }
public IBakedModel loadModel(String modelname) { IBakedModel ret = null; try { ret = bake((OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation(Thelta.MODID, modelname))); } catch (Exception e) { e.printStackTrace(); } return ret; }
public static OBJModel loadModel(String suffix){ OBJModel model; try { model = ((OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("tombmanygraves:models/block/" + suffix + ".obj"))); return model; } catch (Exception e) { throw new ReportedException(new CrashReport("Error making the model for " + suffix + "!", e)); } }
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); MekfarmMod.logger.info("ClientProxy::preInit"); OBJLoader.INSTANCE.addDomain(MekfarmMod.MODID); // Typically initialization of models and such goes here: BlockRendererRegistry.registerBlockRenderers(); ItemRenderersRegistry.registerItemRenderers(); FluidRenderersRegistry.registerFluidRenderers(); }
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); OBJLoader.INSTANCE.addDomain(References.ModID); ModRenderers.preInit(); }
@SideOnly(Side.CLIENT) public static IModel getModelOBJ(ResourceLocation loc) { if (!EventHandlerClient.models.containsKey(loc)) { IModel model = null; try { model = OBJLoader.INSTANCE.loadModel(loc); } catch (Exception e) { e.printStackTrace(); } if (model == null) model = ModelLoaderRegistry.getMissingModel(); EventHandlerClient.models.put(loc, model); } return EventHandlerClient.models.get(loc); }
@Override public void preInit(FMLPreInitializationEvent event){ super.preInit(event); OBJLoader.INSTANCE.addDomain(References.MODID); BlockRegistry.initModels(); PipeRegistry.initModels(); ItemRegistry.initModels(); }
@SubscribeEvent public static void registerModels(ModelRegistryEvent event) { OBJLoader.INSTANCE.addDomain(GuidebookMod.MODID); ModelLoaderRegistry.registerLoader(new BookBakedModel.ModelLoader()); registerItemModel(GuidebookMod.guidebook); }
public static void preInit() { OBJLoader.INSTANCE.addDomain(LibMisc.MOD_ID); for(IVariantHolder holder : BaseItem.varaintHolders) registerModel(holder); }
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); MinecraftForge.EVENT_BUS.register(new ClientForgeEventHandlers()); OBJLoader.INSTANCE.addDomain(AquaMunda.MODID); ModelLoaderRegistry.registerLoader(new TankModelLoader()); ModBlocks.initModels(); ModItems.initModels(); SoundController.init(); FluidSetup.initRenderer(); }
@Override public IModel loadModel(ResourceLocation modelLocation) throws Exception { IModel model = OBJLoader.INSTANCE.loadModel(modelLocation); // return new IModel() { // @Override // public Collection<ResourceLocation> getDependencies() { // return model.getDependencies(); // } // // @Override // public Collection<ResourceLocation> getTextures() { // return model.getTextures(); // } // // @Override // public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) { // IBakedModel bakedModel = model.bake(state, format, bakedTextureGetter); // List<BakedQuad> quads = bakedModel.getQuads(null, null, 0); // // // return ; // } // // @Override // public IModelState getDefaultState() { // return model.getDefaultState(); // } // }; return model; }
public ModelEternalFlames () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/eternalflames.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelBurnout() { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/burnout.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelFerrisWheel () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/ferriswheel.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelSizzlingEdge () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/sizzlingedge.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelPrometheus () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/prometheus.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelIfrit () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/ifrit.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelOutbreak () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/outbreak.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelInferno () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/"+ Strings.Inferno+".obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelCombustion () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/combustion.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelMoulinRouge () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/moulinrouge.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelDoledrum () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/doldrums.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelOmegaTrinity () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/omegatrinity.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelProminence() { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/prominence.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelBlazeofGlory () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/blazeofglory.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelZephyr () { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/zephyr.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { } }
public ModelPortal() { try { model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/block/portal.obj")); modelParts = ModelHelper.getModelsForGroups(model); } catch (Exception e) { e.printStackTrace(); } }
public TwinTailsCommonProxy() { super(TwinTailsMod.MODID); SidedCall.run(Side.CLIENT, new Runnable() { @Override public void run() { OBJLoader.INSTANCE.addDomain("twintails"); } }); }
@Override public void preInit() { OBJLoader.INSTANCE.addDomain("ontherails"); }
@Override public void preInit() { OBJLoader.INSTANCE.addDomain(Thermionics.MODID); }