本文整理汇总了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();
}
示例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);
}
示例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;
}
示例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());
}
示例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");
}
示例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()));
}
示例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());
}
示例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());
}
示例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());
}
示例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();
}
示例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);
}
}
示例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;
}
示例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));
}
}
示例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();
}
示例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();
}