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


Java OBJLoader类代码示例

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


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

示例1: preinit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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();
	
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:25,代码来源:HeroUtils.java

示例2: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:19,代码来源:ClientProxy.java

示例3: getBakedCluster

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
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;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:23,代码来源:RenderTileCrystalCluster.java

示例4: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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());
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:27,代码来源:ClientProxy.java

示例5: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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");
}
 
开发者ID:gigaherz,项目名称:Enderthing,代码行数:18,代码来源:ClientProxy.java

示例6: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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()));
}
 
开发者ID:TeamWizardry,项目名称:TMT-Refraction,代码行数:17,代码来源:ClientProxy.java

示例7: registerModels

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的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

示例8: init

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
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());
}
 
开发者ID:MoreThanHidden,项目名称:PowerOfMagic,代码行数:17,代码来源:ItemModelRegistry.java

示例9: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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());
}
 
开发者ID:Buuz135,项目名称:Industrial-Foregoing,代码行数:11,代码来源:ClientProxy.java

示例10: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@Override
public void preInit()
{
    Minecraft.getMinecraft().getFramebuffer().enableStencil();
    OBJLoader.INSTANCE.addDomain(PurMag.MODID);
    EntityRegistry.registerClient();
    PurMagClient.INSTANCE.getMicroscopeDataBuilder().setup();
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:9,代码来源:ClientProxy.java

示例11: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent event) {
	OBJLoader.INSTANCE.addDomain(Thelta.MODID);
	super.preInit(event);
	state = ContextState.ModelRegistration;
	for (TheltaModule module : modules) {
		module.registerModels(this);
	}
}
 
开发者ID:Error22,项目名称:Thelta,代码行数:10,代码来源:ClientContext.java

示例12: loadModel

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
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;
}
 
开发者ID:Error22,项目名称:Thelta,代码行数:12,代码来源:TileEntityRendererMachineArm.java

示例13: loadModel

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
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));
    }
}
 
开发者ID:M4thG33k,项目名称:TombManyGraves,代码行数:12,代码来源:ModelHelper.java

示例14: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@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();
}
 
开发者ID:faceofcat,项目名称:Mekfarm,代码行数:13,代码来源:ClientProxy.java

示例15: preInit

import net.minecraftforge.client.model.obj.OBJLoader; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent e)
{
	super.preInit(e);

	OBJLoader.INSTANCE.addDomain(References.ModID);

	ModRenderers.preInit();
}
 
开发者ID:Bartz24,项目名称:UsefulNullifiers,代码行数:10,代码来源:ClientProxy.java


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