Java 类net.minecraftforge.client.model.obj.OBJLoader 实例源码

项目:HeroUtils    文件:HeroUtils.java   
@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();

}
项目:CrystalMod    文件:ClientProxy.java   
@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);
}
项目:CrystalMod    文件:RenderTileCrystalCluster.java   
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;
}
项目:Qbar    文件:ClientProxy.java   
@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());
}
项目:Enderthing    文件:ClientProxy.java   
@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");
}
项目:TMT-Refraction    文件:ClientProxy.java   
@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()));
}
项目:Ender-Rift    文件:ClientProxy.java   
@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());
}
项目:PowerOfMagic    文件:ItemModelRegistry.java   
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());
}
项目:Industrial-Foregoing    文件:ClientProxy.java   
@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());
}
项目:PurificatiMagicae    文件:ClientProxy.java   
@Override
public void preInit()
{
    Minecraft.getMinecraft().getFramebuffer().enableStencil();
    OBJLoader.INSTANCE.addDomain(PurMag.MODID);
    EntityRegistry.registerClient();
    PurMagClient.INSTANCE.getMicroscopeDataBuilder().setup();
}
项目:Thelta    文件:ClientContext.java   
@Override
public void preInit(FMLPreInitializationEvent event) {
    OBJLoader.INSTANCE.addDomain(Thelta.MODID);
    super.preInit(event);
    state = ContextState.ModelRegistration;
    for (TheltaModule module : modules) {
        module.registerModels(this);
    }
}
项目:Thelta    文件:TileEntityRendererMachineArm.java   
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;
}
项目:TombManyGraves    文件:ModelHelper.java   
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));
    }
}
项目:Mekfarm    文件:ClientProxy.java   
@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();
}
项目:UsefulNullifiers    文件:ClientProxy.java   
@Override
public void preInit(FMLPreInitializationEvent e)
{
    super.preInit(e);

    OBJLoader.INSTANCE.addDomain(References.ModID);

    ModRenderers.preInit();
}
项目:Toms-Mod    文件:TomsModUtils.java   
@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);
}
项目:LP2    文件:ClientProxy.java   
@Override
public void preInit(FMLPreInitializationEvent event){
    super.preInit(event);

    OBJLoader.INSTANCE.addDomain(References.MODID);
    BlockRegistry.initModels();
    PipeRegistry.initModels();
    ItemRegistry.initModels();
}
项目:Guidebook    文件:ClientProxy.java   
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
{
    OBJLoader.INSTANCE.addDomain(GuidebookMod.MODID);
    ModelLoaderRegistry.registerLoader(new BookBakedModel.ModelLoader());

    registerItemModel(GuidebookMod.guidebook);
}
项目:DFArtifacts    文件:ModelHandler.java   
public static void preInit()
{

    OBJLoader.INSTANCE.addDomain(LibMisc.MOD_ID);

    for(IVariantHolder holder : BaseItem.varaintHolders)
        registerModel(holder);
}
项目:AquaMunda    文件:ClientProxy.java   
@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();
}
项目:rflux    文件:TintedModelLoader.java   
@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;
    }
项目:Kingdom-Keys-Re-Coded    文件:ModelEternalFlames.java   
public ModelEternalFlames () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/eternalflames.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelBurnout.java   
public ModelBurnout() {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/burnout.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelFerrisWheel.java   
public ModelFerrisWheel () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/ferriswheel.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelSizzlingEdge.java   
public ModelSizzlingEdge () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/sizzlingedge.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelPrometheus.java   
public ModelPrometheus () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/prometheus.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelIfrit.java   
public ModelIfrit () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/ifrit.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelOutbreak.java   
public ModelOutbreak () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/outbreak.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelInferno.java   
public ModelInferno () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/"+ Strings.Inferno+".obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelCombustion.java   
public ModelCombustion () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/combustion.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelMoulinRouge.java   
public ModelMoulinRouge () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/moulinrouge.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelDoledrum.java   
public ModelDoledrum () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/doldrums.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelOmegaTrinity.java   
public ModelOmegaTrinity () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/omegatrinity.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelProminence.java   
public ModelProminence() {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/prominence.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelBlazeofGlory.java   
public ModelBlazeofGlory () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/blazeofglory.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelZephyr.java   
public ModelZephyr () {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/item/zephyr.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {

    }
}
项目:Kingdom-Keys-Re-Coded    文件:ModelPortal.java   
public ModelPortal() {
    try {
        model = (OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("kk:models/block/portal.obj"));
        modelParts = ModelHelper.getModelsForGroups(model);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:TwinTails    文件:TwinTailsCommonProxy.java   
public TwinTailsCommonProxy() {
    super(TwinTailsMod.MODID);

    SidedCall.run(Side.CLIENT, new Runnable() {
        @Override
        public void run() {
            OBJLoader.INSTANCE.addDomain("twintails");
        }
    });
}
项目:OnTheRails    文件:ClientProxy.java   
@Override
public void preInit() {
    OBJLoader.INSTANCE.addDomain("ontherails");
}
项目:Thermionics    文件:ClientProxy.java   
@Override
public void preInit() {
    OBJLoader.INSTANCE.addDomain(Thermionics.MODID);
}