net.minecraftforge.client.model.obj.OBJLoader Java Examples
The following examples show how to use
net.minecraftforge.client.model.obj.OBJLoader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientProxy.java From Valkyrien-Skies with Apache License 2.0 | 6 votes |
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); OBJLoader.INSTANCE.addDomain(ValkyrienSkiesMod.MOD_ID.toLowerCase()); RenderingRegistry.registerEntityRenderingHandler(PhysicsWrapperEntity.class, new PhysicsWrapperEntityRenderFactory()); // Register events MinecraftForge.EVENT_BUS.register(new EventsClient()); MinecraftForge.EVENT_BUS.register(keyEvents); // Register VS Minecraft resource reload listener. IReloadableResourceManager mcResourceManager = (IReloadableResourceManager) Minecraft .getMinecraft() .getResourceManager(); // When Minecraft reloads resources tell GibsModelRegistry to delete all its caches. mcResourceManager.registerReloadListener(GibsModelRegistry::onResourceManagerReload); registerAnimations(); }
Example #2
Source File: ClientOnlyProxy.java From EmergingTechnology with MIT License | 5 votes |
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); EmergingTechnologyConfig.clientPreInit(); OBJLoader.INSTANCE.addDomain(EmergingTechnology.MODID); }
Example #3
Source File: ClientProxy.java From Logistics-Pipes-2 with MIT License | 5 votes |
@Override public void preInit(FMLPreInitializationEvent event){ super.preInit(event); OBJLoader.INSTANCE.addDomain(References.MODID); BlockRegistry.initModels(); PipeRegistry.initModels(); ItemRegistry.initModels(); }
Example #4
Source File: ClientProxy.java From YouTubeModdingTutorial with MIT License | 4 votes |
@Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); OBJLoader.INSTANCE.addDomain(MyMod.MODID); MinecraftForge.EVENT_BUS.register(OverlayRenderer.instance); }
Example #5
Source File: ClientProxyControl.java From Valkyrien-Skies with Apache License 2.0 | 4 votes |
@Override public void preInit(FMLStateEvent event) { super.preInit(event); // Register events MinecraftForge.EVENT_BUS.register(new ControlEventsClient()); // Register gibs OBJLoader.INSTANCE.addDomain(ValkyrienSkiesControl.MOD_ID.toLowerCase()); registerControlGibs("chadburn_dial_simplevoxel_geo"); registerControlGibs("chadburn_glass_simplevoxel_geo"); registerControlGibs("chadburn_handles_simplevoxel_geo"); registerControlGibs("chadburn_speed_telegraph_simplevoxel_geo"); registerControlGibs("ship_helm_base"); registerControlGibs("ship_helm_dial"); registerControlGibs("ship_helm_dial_glass"); registerControlGibs("ship_helm_wheel"); registerRudderGibs("rudder_geo"); registerRudderGibs("rudder_axle_geo"); registerGearboxGibs("gearbox_back_geo"); registerGearboxGibs("gearbox_bottom_geo"); registerGearboxGibs("gearbox_front_geo"); registerGearboxGibs("gearbox_left_geo"); registerGearboxGibs("gearbox_right_geo"); registerGearboxGibs("gearbox_top_geo"); GibsAnimationRegistry.registerAnimation("valkyrium_compressor", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/valkyrium_compressor/compressor_animations.atom")); GibsAnimationRegistry.registerAnimation("valkyrium_engine", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/valkyrium_engine/valkyrium_engine.atom")); GibsAnimationRegistry.registerAnimation("lift_lever", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/controls/lift_lever_keyframes.atom")); GibsAnimationRegistry.registerAnimation("gearbox", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/gearbox/gearbox.atom")); GibsAnimationRegistry.registerAnimation("pocketwatch_body", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/pocketwatch/pocketwatch_keyframes.atom")); GibsAnimationRegistry.registerAnimation("pocketwatch_lid", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/pocketwatch/pocketwatch_lid_keyframes.atom")); GibsAnimationRegistry.registerAnimation("telescope", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/telescope/telescope_keyframes.atom")); GibsAnimationRegistry.registerAnimation("rudder", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/rudder/rudder_animation.atom")); GibsAnimationRegistry.registerAnimation("rotation_axle", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/rotation_axle/rotation_axle.atom")); GibsAnimationRegistry.registerAnimation("giant_propeller", new ResourceLocation(ValkyrienSkiesControl.MOD_ID, "models/block/giant_propeller/giant_propeller.atom")); }
Example #6
Source File: ClientProxy.java From TFC2 with GNU General Public License v3.0 | 4 votes |
private void setupBlockMeshes() { OBJLoader.INSTANCE.addDomain(Reference.ModID); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(TFCBlocks.LooseRocks), 0, new ModelResourceLocation(Reference.ModID + ":loose_rock", "inventory")); Item anvilItem = Item.getItemFromBlock(TFCBlocks.Anvil); ModelLoader.setCustomModelResourceLocation(anvilItem, 0, new ModelResourceLocation(Reference.ModID + ":anvil")); //Change the StateMapper for this block so that it will point to a different file for a specific Property StateMapperBase ignoreState = new StateMapperBase() { @Override protected ModelResourceLocation getModelResourceLocation(IBlockState iBlockState) { if(iBlockState.getValue(BlockLeaves2.META_PROPERTY) == WoodType.Palm) return new ModelResourceLocation("tfc2:leaves_palm"); else return new ModelResourceLocation("tfc2:leaves2"); } }; ModelLoader.setCustomStateMapper(TFCBlocks.Leaves2, ignoreState); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Dirt), "Dirt/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Grass), "Grass/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Stone), "Stone/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Rubble), "Rubble/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Sand), "Sand/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Gravel), "Gravel/", Global.STONE_ALL, 0, 16); //registerVariantModel(Item.getItemFromBlock(TFCBlocks.LooseRocks), "LooseRocks/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Planks), "Wood/Planks/", WoodType.getNamesArray(), 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Sapling), "Wood/Saplings/", WoodType.getNamesArray(), 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.LogVertical), "Wood/Logs/", WoodType.getNamesArray(), 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Leaves), "Wood/Leaves/", WoodType.getNamesArray(), 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Planks2), "Wood/Planks/", WoodType.getNamesArray(), 16, 19); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Sapling2), "Wood/Saplings/", WoodType.getNamesArray(), 16, 19); registerVariantModel(Item.getItemFromBlock(TFCBlocks.LogVertical2), "Wood/Logs/", WoodType.getNamesArray(), 16, 19); registerVariantModel(Item.getItemFromBlock(TFCBlocks.Leaves2), "Wood/Leaves/", WoodType.getNamesArray(), 16, 18); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(TFCBlocks.Leaves2), 18, new ModelResourceLocation(Reference.ModID + ":leaves_palm", "inventory")); //registerVariantModel(Item.getItemFromBlock(TFCBlocks.Ore), "Ore/", OreType.getNamesArray(), 0, 13); registerVariantModel(Item.getItemFromBlock(TFCBlocks.StoneBrick), "StoneBrick/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.StoneSmooth), "StoneSmooth/", Global.STONE_ALL, 0, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.SupportBeam), "Wood/SupportBeams/", WoodType.getNamesArray(), 0, 8); registerVariantModel(Item.getItemFromBlock(TFCBlocks.SupportBeam2), "Wood/SupportBeams/", WoodType.getNamesArray(), 8, 16); registerVariantModel(Item.getItemFromBlock(TFCBlocks.SupportBeam3), "Wood/SupportBeams/", WoodType.getNamesArray(), 16, 19); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(TFCBlocks.TorchOn),0,new ModelResourceLocation(Reference.ModID + ":torch_on", "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(TFCBlocks.TorchOff),0,new ModelResourceLocation(Reference.ModID + ":torch_off", "inventory")); for(Block b : TFCBlocks.stairsList) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(b),0,new ModelResourceLocation(Reference.ModID + ":Wood/Stairs/"+Core.getUnlocalized(b.getUnlocalizedName()), "inventory")); } RegistryItemQueue.getInstance().registerMeshes(); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(TFCBlocks.Thatch), 0, new ModelResourceLocation(Reference.ModID + ":thatch", "inventory")); }
Example #7
Source File: ClientProxy.java From AdvancedRocketry with MIT License | 3 votes |
@Override public void preinit() { OBJLoader.INSTANCE.addDomain("advancedrocketry"); registerRenderers(); }