Java Code Examples for net.minecraftforge.client.model.AdvancedModelLoader

The following are top voted examples for showing how to use net.minecraftforge.client.model.AdvancedModelLoader. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Extruder   File: EntityExtruderRenderer.java   View source code 6 votes vote down vote up
private void renderBase(EntityExtruder extruder, double x, double y, double z) {
    GL11.glTranslated(x, y, z);
    float angle = determineAngle(extruder);
    switch (extruder.getFacing()) {
        case DOWN:
            GL11.glRotatef(angle, 1.0F, 0.0F, 0.0F);
            GL11.glTranslatef(0.0F, -0.5F, -0.5F);
            break;
        case UP:
            GL11.glRotatef(angle, 1.0F, 0.0F, 0.0F);
            GL11.glTranslatef(0.0F, -0.5F, 0.5F);
            break;
        case NORTH:
        case SOUTH:
        case WEST:
        case EAST:
            GL11.glRotatef(angle, 0.0F, 1.0F, 0.0F);
            break;
    }

    AdvancedModelLoader.loadModel(model).renderPart("Base");
}
 
Example 2
Project: MateriaMuto   File: ClientProxy.java   View source code 6 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent event) {
    super.preInit(event);

    MinecraftForge.EVENT_BUS.register(new ItemTooltipEventHandler());

    FMLCommonHandler.instance().bus().register(new KeyInputEventHandler());
    ClientRegistry.registerKeyBinding(Keybindings.charge);
    ClientRegistry.registerKeyBinding(Keybindings.mode);
    ClientRegistry.registerKeyBinding(Keybindings.release);
    ClientRegistry.registerKeyBinding(Keybindings.toggle);

    AdvancedModelLoader.registerModelHandler(new TechneModelLoader());

    ClientRegistry.bindTileEntitySpecialRenderer(TileCondenser.class, new RenderTileCondenser());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MMBlocks.condenser), new RenderItemCondenser());

    ClientRegistry.bindTileEntitySpecialRenderer(TileAlchemicalChest.class, new RenderTileAlchemicalChest());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MMBlocks.alchemicalChest), new RenderItemAlchemicalChest());

    ClientRegistry.bindTileEntitySpecialRenderer(TileCollector.class, new RenderTileCollector());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MMBlocks.collector), new RenderItemCollector());
}
 
Example 3
Project: BiotechMod   File: EnergyContainerTESR.java   View source code 6 votes vote down vote up
public EnergyContainerTESR() {
    texture = new ResourceLocation("minecraft:textures/blocks/planks_oak.png");
    model = AdvancedModelLoader.loadModel(new ResourceLocation("biotechmod:models/energyContainer.obj"));
    potato = new RenderItem() {
        public boolean shouldBob() {
            return false;
        }
        public boolean shouldSpreadItems() {
            return false;
        }
    };
    dummy = new EntityItem(null);
    dummy.hoverStart = 0.0f;
    dummy.motionX = 0.0f;
    dummy.motionY = 0.0f;
    dummy.motionZ = 0.0f;
    potato.setRenderManager(RenderManager.instance);
}
 
Example 4
Project: 4-Space-Legacy   File: ClientProxyVenus.java   View source code 6 votes vote down vote up
@Override
public void registerRenderInformation()
{
	ClientRegistry.bindTileEntitySpecialRenderer(SCVenusTileEntityTreasureChest.class, new SCVenusTileEntityTreasureChestRenderer());
	
    RenderingRegistry.addNewArmourRendererPrefix("gem");
    RenderingRegistry.addNewArmourRendererPrefix("sulfer");
    RenderingRegistry.addNewArmourRendererPrefix("jetpack");

    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityVenusianVillager.class, new SCVenusRenderVenusianVillager());
    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityFlameling.class, new SCVenusRenderFlameling());
    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityEvolvedBlaze.class, new SCVenusRenderEvolvedBlaze());
  
    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");

    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityRocketT3.class, new GCCoreRenderSpaceship(new SCCoreModelSpaceshipTier3(), VenusCore.ASSET_DOMAIN, "rocketT3"));
    MinecraftForgeClient.registerItemRenderer(VenusItems.spaceshipT3.itemID, new SCVenusItemRendererSpaceshipT3(cargoRocketModel));
}
 
Example 5
Project: PneumaticCraft   File: RenderItemPneumaticHelmet.java   View source code 6 votes vote down vote up
public void render(){
    if(helmetModel == null) {
        helmetModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET);
        eyesModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET_EYES);
        faceModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET_FACE);
        if(!Config.useHelmetModel) {
            PneumaticCraft.proxy.getPlayer().addChatComponentMessage(new ChatComponentTranslation("message.date.ironman"));
        }
    }

    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glColor4d(1, 0.2, 0.2, 1);
    helmetModel.renderAll();
    GL11.glColor4d(1, 1, 0.7, 1);
    faceModel.renderAll();
    GL11.glColor4d(1, 1, 1, 1);
    GL11.glDisable(GL11.GL_CULL_FACE);
    eyesModel.renderAll();

    GL11.glEnable(GL11.GL_TEXTURE_2D);
}
 
Example 6
Project: 4Space-5   File: MarsModuleClient.java   View source code 5 votes vote down vote up
@Override
    public void postInit(FMLPostInitializationEvent event)
    {
        IModelCustom chamberModel = AdvancedModelLoader.loadModel(new ResourceLocation(MarsModule.ASSET_PREFIX, "models/chamber.obj"));
        IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel(new ResourceLocation(MarsModule.ASSET_PREFIX, "models/cargoRocket.obj"));

        // Tile Entity Renderers
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChestMars.class, new TileEntityTreasureChestRenderer());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCryogenicChamber.class, new TileEntityCryogenicChamberRenderer(chamberModel));
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTerraformer.class, new TileEntityBubbleProviderRenderer(0.25F, 1.0F, 0.25F));

        // Entities
        RenderingRegistry.registerEntityRenderingHandler(EntitySludgeling.class, new RenderSludgeling());
        RenderingRegistry.registerEntityRenderingHandler(EntitySlimeling.class, new RenderSlimeling());
        RenderingRegistry.registerEntityRenderingHandler(EntityCreeperBoss.class, new RenderCreeperBoss());
        RenderingRegistry.registerEntityRenderingHandler(EntityTier2Rocket.class, new RenderTier1Rocket(new ModelTier2Rocket(), MarsModule.ASSET_PREFIX, "rocketT2"));
//        RenderingRegistry.registerEntityRenderingHandler(EntityTerraformBubble.class, new RenderBubble(0.25F, 1.0F, 0.25F));
        RenderingRegistry.registerEntityRenderingHandler(EntityProjectileTNT.class, new RenderProjectileTNT());
        RenderingRegistry.registerEntityRenderingHandler(EntityLandingBalloons.class, new RenderLandingBalloons());
        RenderingRegistry.registerEntityRenderingHandler(EntityLandingBalloons.class, new RenderLandingBalloons());
        RenderingRegistry.registerEntityRenderingHandler(EntityCargoRocket.class, new RenderCargoRocket(cargoRocketModel));

        // Add Armor Renderer Prefix
        RenderingRegistry.addNewArmourRendererPrefix("desh");

        // Item Renderers
        MinecraftForgeClient.registerItemRenderer(MarsItems.spaceship, new ItemRendererTier2Rocket(cargoRocketModel));
        MinecraftForgeClient.registerItemRenderer(MarsItems.key, new ItemRendererKey(new ResourceLocation(MarsModule.ASSET_PREFIX, "textures/model/treasure.png")));
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MarsBlocks.machine), new ItemRendererMachine(chamberModel));
    }
 
Example 7
Project: 4Space-5   File: AsteroidsModuleClient.java   View source code 5 votes vote down vote up
@Override
public void postInit(FMLPostInitializationEvent event)
{
    RenderingRegistry.registerEntityRenderingHandler(EntitySmallAsteroid.class, new RenderSmallAsteroid());
    RenderingRegistry.registerEntityRenderingHandler(EntityGrapple.class, new RenderGrapple());
    IModelCustom podModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/pod.obj"));
    RenderingRegistry.registerEntityRenderingHandler(EntityEntryPod.class, new RenderEntryPod(podModel));
    IModelCustom rocketModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/tier3rocket.obj"));
    RenderingRegistry.registerEntityRenderingHandler(EntityTier3Rocket.class, new RenderTier3Rocket(rocketModel, AsteroidsModule.ASSET_PREFIX, "tier3rocket"));
    RenderingRegistry.registerEntityRenderingHandler(EntityAstroMiner.class, new RenderAstroMiner());
    IModelCustom grappleModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/grapple.obj"));
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.grapple, new ItemRendererGrappleHook(grappleModel));
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.beamReceiver), new ItemRendererBeamReceiver());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.beamReflector), new ItemRendererBeamReflector());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.tier3Rocket, new ItemRendererTier3Rocket(rocketModel));
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.astroMiner, new ItemRendererAstroMiner());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.thermalPadding, new ItemRendererThermalArmor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.shortRangeTelepad), new ItemRendererShortRangeTelepad());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.heavyNoseCone, new ItemRendererHeavyNoseCone());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkway), new ItemRendererWalkway());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkwayOxygenPipe), new ItemRendererWalkway());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkwayWire), new ItemRendererWalkway());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBeamReflector.class, new TileEntityBeamReflectorRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBeamReceiver.class, new TileEntityBeamReceiverRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMinerBase.class, new TileEntityMinerBaseRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShortRangeTelepad.class, new TileEntityShortRangeTelepadRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChestAsteroids.class, new TileEntityTreasureChestRenderer());
    
    if (Loader.isModLoaded("craftguide"))
    	CraftGuideIntegration.register();
}
 
Example 8
Project: 4Space-5   File: TileEntityBubbleProviderRenderer.java   View source code 5 votes vote down vote up
public TileEntityBubbleProviderRenderer(float colorRed, float colorGreen, float colorBlue)
{
    sphere = AdvancedModelLoader.loadModel(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "models/sphere.obj"));
    this.colorRed = colorRed;
    this.colorGreen = colorGreen;
    this.colorBlue = colorBlue;
}
 
Example 9
Project: Rival-Rebels-Mod   File: RenderRhodes.java   View source code 5 votes vote down vote up
public RenderRhodes()
{
   	texture = new ResourceLocation(RivalRebels.MODID, "textures/entity/rhodes.png");
   	flametex = new ResourceLocation(RivalRebels.MODID, "textures/entity/flame.png");
   	head = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/head.obj"));
   	torso = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/torso.obj"));
   	flag = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/flag.obj"));
   	upperarm = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/upperarm.obj"));
   	lowerarm = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/lowerarm.obj"));
   	flamethrower = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/flamethrower.obj"));
   	rocketlauncher = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/rocketlauncher.obj"));
   	thigh = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/thigh.obj"));
   	shin = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/shin.obj"));
   	flame = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/flame.obj"));
   	laser = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/laser.obj"));
   	booster = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/booster.obj"));
   	
   	ffhead = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/ffhead.obj"));
   	fftorso = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/fftorso.obj"));
   	ffupperarm = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/ffupperarm.obj"));
   	fflowerarm = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/fflowerarm.obj"));
   	ffthigh = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/ffthigh.obj"));
   	ffshin = AdvancedModelLoader.loadModel(new ResourceLocation(RivalRebels.MODID, "models/rhodes/ffshin.obj"));
   	
	modelsphere = new ModelBlastSphere();
	try
	{
		md = ModelFromObj.readObjFile("d.obj");
		b2jet = ModelFromObj.readObjFile("s.obj");
		md.scale(2.5f, 2.5f, 2.5f);
		b2jet.scale(2.5f, 2.5f, 2.5f);
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
}
 
Example 10
Project: RFUtilities   File: ClientUtils.java   View source code 5 votes vote down vote up
public static WavefrontObject getModel(String path)
{
    ResourceLocation rl = resourceMap.containsKey(path) ? resourceMap.get(path) : new ResourceLocation(path);
    if(!resourceMap.containsKey(path))
    {
        resourceMap.put(path, rl);
    }
    return (WavefrontObject) AdvancedModelLoader.loadModel(rl);
}
 
Example 11
Project: FissionWarfare   File: ItemRenderBase.java   View source code 5 votes vote down vote up
public ItemRenderBase(String modelName, String texturePath) {
	this.textureName = texturePath;
	this.modelName = modelName;
	
	model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID + ":obj/" + modelName + ".obj"));
	texture = new ResourceLocation(Reference.MOD_ID + ":textures/models/" + texturePath + ".png");
}
 
Example 12
Project: amunra   File: ClientProxy.java   View source code 5 votes vote down vote up
@Override
public void postInit(FMLPostInitializationEvent event)
{
    rocketModel = AdvancedModelLoader.loadModel(new ResourceLocation(AmunRa.ASSETPREFIX, "models/shuttle2.obj"));
    engineModel = AdvancedModelLoader.loadModel(new ResourceLocation(AmunRa.ASSETPREFIX, "models/jet.obj"));
    engineModelIon = AdvancedModelLoader.loadModel(new ResourceLocation(AmunRa.ASSETPREFIX, "models/jet-ion.obj"));
    ClientProxy.registerEntityRenderers();
    ClientProxy.registerItemRenderers();
}
 
Example 13
Project: M4thThings   File: MediumQuantumTankRenderer.java   View source code 5 votes vote down vote up
public MediumQuantumTankRenderer()
{
    modelBlock = AdvancedModelLoader.loadModel(new ResourceLocation("m4ththings","models/quantumTank.obj"));
    modelTexture = new ResourceLocation("m4ththings","models/fluidTank3.png");
    fluidTexture = TextureMap.locationBlocksTexture;
    modelCube = AdvancedModelLoader.loadModel(new ResourceLocation("m4ththings","models/cube.obj"));
    modelHexPlate = AdvancedModelLoader.loadModel(new ResourceLocation("m4ththings","models/sphereHexPlate.obj"));
    hexTexture = new ResourceLocation("m4ththings","models/sphereHexPlate.png");
    getValveIcons();
}
 
Example 14
Project: M4thThings   File: SolarGeneratorRenderer.java   View source code 5 votes vote down vote up
public SolarGeneratorRenderer()
{
    super();

    blockModel = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/solarGenerator.obj"));
    blockTexture = new ResourceLocation(Reference.MOD_ID,"models/solarGenerator.png");
    energyTexture = new ResourceLocation(Reference.MOD_ID,"textures/overlays/energySquare.png");
    fluidTexture = new ResourceLocation(Reference.MOD_ID,"textures/overlays/waterSquare.png");
    sunEmblem = new ResourceLocation(Reference.MOD_ID,"textures/overlays/SunEmblem.png");
}
 
Example 15
Project: M4thThings   File: SolarCollectorRenderer.java   View source code 5 votes vote down vote up
public SolarCollectorRenderer()
{
    model = AdvancedModelLoader.loadModel(new ResourceLocation("m4ththings","models/solarCollection.obj"));
    glassPanesModel = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/solarCollectionGlassPanes.obj"));
    modelBase = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/solarCollectionBase.obj"));
    tankModel =  AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/solarCollectionTanks.obj"));
    modelTexture = new ResourceLocation("m4ththings","models/defaultTexture.png");
    textureMap = TextureMap.locationBlocksTexture;
    glassPaneTexture = new ResourceLocation(Reference.MOD_ID,"textures/blocks/glassTest.png");
    baseTexture = new ResourceLocation("m4ththings","models/solarCollectionBase.png");
    tankTexture = new ResourceLocation("m4ththings","models/solarCollectionTanks.png");
}
 
Example 16
Project: M4thThings   File: WaterGeneratorRenderer.java   View source code 5 votes vote down vote up
public WaterGeneratorRenderer()
{
    super();
    pylonModel = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/pylon.obj"));
    pylonTexture = glassTexture;//new ResourceLocation(Reference.MOD_ID,"models/defaultTexture.png");
    torus = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MOD_ID,"models/torus.obj"));
    torusTexture = new ResourceLocation(Reference.MOD_ID,"models/lightBlueTransparent.png");

}
 
Example 17
Project: MC-MineAPI.Java   File: RenderingFactoryProduct.java   View source code 5 votes vote down vote up
public RenderingFactoryProduct(ModelArchive renderInformation)
{
    super();

    // Master model list we will manipulate with packets from server.
    this.modelRenderingReference = new LinkedHashMap<String, TechneModel>();

    // Unique rendering ID for each instance of a renderer product.
    this.renderingID = RenderingRegistry.getNextAvailableRenderId();

    // Load default texture from this machine as a resource location for renderer to bind to when referenced.
    this.textureResource = new ResourceLocation( ModMetadata.ID,
                                                 renderInformation.getMachineTexture() );

    // Load clone of item render information.
    this.modelItemRenderInformation = renderInformation.getItemRenderInfoClone();

    // Load clone of world render information.
    this.modelWorldRenderInformation = renderInformation.getWorldRenderInfoClone();

    // Load clone of models and textures associated with this product.
    for (MachineModel productModel : renderInformation.getMachineModelsFilesClone())
    {
        this.modelRenderingReference.put( productModel.getModelName(),
                                          (TechneModel) AdvancedModelLoader.loadModel( productModel.getModelPath() ) );
    }
}
 
Example 18
Project: lib-colladamodel   File: ModelManager.java   View source code 5 votes vote down vote up
@Override
public void onResourceManagerReload(IResourceManager var1) {
	for (ResourceLocation resource : models.keySet()) {
		models.put(resource, (IModelAnimationCustom) AdvancedModelLoader
				.loadModel(resource));
	}
}
 
Example 19
Project: lib-colladamodel   File: ModColladaModel.java   View source code 5 votes vote down vote up
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	AdvancedModelLoader.registerModelHandler(new ColladaModelLoader());
	if (event.getSide() == Side.CLIENT) {
		modelManager = new ModelManager();

		((IReloadableResourceManager) Minecraft.getMinecraft()
				.getResourceManager()).registerReloadListener(modelManager);
	}
}
 
Example 20
Project: Magma   File: SimpleBlockOBJRenderer.java   View source code 5 votes vote down vote up
public SimpleBlockOBJRenderer(Addon addon, int renderID, ResourceLocation modelLocation) {
    super(addon, renderID);
    final IModelCustom temp = AdvancedModelLoader.loadModel(modelLocation);
    if (!(temp instanceof WavefrontObject)) {
        throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!");
    }
    model = (WavefrontObject) temp;
}
 
Example 21
Project: Magma   File: SimpleBlockOBJRenderer.java   View source code 5 votes vote down vote up
/**
 * Creates a renderer using properties from a {@link org.obsidianbox.magma.block.SimpleBlock}
 *
 * This will also set the render type for that block
 * @param addon The addon creating the block
 * @param renderID The render type used by Forge
 * @param block Block being rendered
 */
public SimpleBlockOBJRenderer(Addon addon, int renderID, SimpleBlock block) {
    super(addon, renderID);
    final IModelCustom temp = AdvancedModelLoader.loadModel(new ResourceLocation(addon.getDescription().getIdentifier(), "models/blocks/" + block.getIdentifier() + ".obj"));
    if (!(temp instanceof WavefrontObject)) {
        throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!");
    }
    model = (WavefrontObject) temp;
    block.setRenderType(renderID);
}
 
Example 22
Project: hcables   File: TESRCableHook.java   View source code 5 votes vote down vote up
public TESRCableHook(){
	model = AdvancedModelLoader.loadModel(new ResourceLocation("hcables", "models/stone_cube.obj"));
	texture = new ResourceLocation("hcables", "textures/blocks/stone.png");
	
	lightbulb = AdvancedModelLoader.loadModel(new ResourceLocation("hcables", "models/lightbulb.obj"));
	texL1 = new ResourceLocation("hcables", "textures/blocks/bedrock.png");
	texL2 = new ResourceLocation("hcables", "textures/blocks/glass_orange.png");
}
 
Example 23
Project: ComplexWiring   File: ClientProxy.java   View source code 5 votes vote down vote up
@Override
public void init() {
    super.init();
    AdvancedModelLoader.registerModelHandler(new TechneModelLoader());
    RenderingRegistry.registerBlockHandler(new RenderingHandler());
    ClientRegistry.bindTileEntitySpecialRenderer(TileStorageBox.class, new RenderStorageBox());
    ClientRegistry.bindTileEntitySpecialRenderer(TileSmasher.class, RenderSmasher.instance);
}
 
Example 24
Project: 4-Space-Legacy   File: ClientProxyMoons.java   View source code 5 votes vote down vote up
@Override
public void registerRenderInformation()
{
    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes
    
    RenderingRegistry.registerEntityRenderingHandler(SCJupiterEntityRocketT5.class, new GCCoreRenderSpaceship(new SCJupiterModelSpaceshipTier5(), MoonsCore.ASSET_DOMAIN, "rocketT5"));
    MinecraftForgeClient.registerItemRenderer(JupiterItems.spaceshipT5.itemID, new SCJupiterItemRendererSpaceshipT5(cargoRocketModel));
}
 
Example 25
Project: 4-Space-Legacy   File: ClientProxyMercury.java   View source code 5 votes vote down vote up
@Override
public void registerRenderInformation()
{
    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes
    
    RenderingRegistry.registerEntityRenderingHandler(SCMercuryEntityRocketT4.class, new GCCoreRenderSpaceship(new SCMercuryModelSpaceshipTier4(), MercuryCore.ASSET_DOMAIN, "rocketT4"));
    MinecraftForgeClient.registerItemRenderer(MercuryItems.spaceshipT4.itemID, new SCMercuryItemRendererSpaceshipT4(cargoRocketModel));
}
 
Example 26
Project: 4-Space-Legacy   File: ClientProxySedna.java   View source code 5 votes vote down vote up
@Override
public void registerRenderInformation()
{
    RenderingRegistry.addNewArmourRendererPrefix("gravity");

    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes
        
    RenderingRegistry.registerEntityRenderingHandler(SCSednaEntityRocketT6.class, new GCCoreRenderSpaceship(new SCSednaModelSpaceshipTier6(), SednaCore.ASSET_DOMAIN, "rocketT6"));
    MinecraftForgeClient.registerItemRenderer(SednaItems.spaceshipT6.itemID, new SCSednaItemRendererSpaceshipT6(cargoRocketModel));
}
 
Example 27
Project: WeaponsMod   File: ModelRobot.java   View source code 5 votes vote down vote up
public ModelRobot() {

    	modelBaseBase = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/base/base.obj");
    	modelBaseBlock = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/base/block.obj");
    	modelBaseEye = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/base/eye.obj");
    	modelBaseThrust = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/base/thrust.obj");
    	modelBaseTurnbottom = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/base/turnbottom.obj");
    	modelLeftArm = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/leftarm/arm.obj");
    	modelLeftArmZap = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/leftarm/armzap.obj");
    	modelRightArm = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/rightarm/arm.obj");
    	modelRightArmZap = AdvancedModelLoader.loadModel("/mods/weapons/models/robot/rightarm/armzap.obj");
    }
 
Example 28
Project: 4Space-5   File: RenderLandingBalloons.java   View source code 4 votes vote down vote up
public RenderLandingBalloons()
{
    this.shadowSize = 1.2F;
    this.landerModel = AdvancedModelLoader.loadModel(new ResourceLocation(MarsModule.ASSET_PREFIX, "models/landingBalloon.obj"));
}
 
Example 29
Project: 4Space-5   File: TileEntityBeamReflectorRenderer.java   View source code 4 votes vote down vote up
public TileEntityBeamReflectorRenderer()
{
    TileEntityBeamReflectorRenderer.reflectorModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/reflector.obj"));
}
 
Example 30
Project: 4Space-5   File: TileEntityShortRangeTelepadRenderer.java   View source code 4 votes vote down vote up
public TileEntityShortRangeTelepadRenderer()
{
    TileEntityShortRangeTelepadRenderer.telepadModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/teleporter.obj"));
}
 
Example 31
Project: 4Space-5   File: TileEntityMinerBaseRenderer.java   View source code 4 votes vote down vote up
public TileEntityMinerBaseRenderer()
{
    TileEntityMinerBaseRenderer.telepadModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/minerbase.obj"));
}
 
Example 32
Project: 4Space-5   File: TileEntityBeamReceiverRenderer.java   View source code 4 votes vote down vote up
public TileEntityBeamReceiverRenderer()
{
    TileEntityBeamReceiverRenderer.receiverModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/receiver.obj"));
}
 
Example 33
Project: 4Space-5   File: ItemRendererWalkway.java   View source code 4 votes vote down vote up
public ItemRendererWalkway()
{
    modelWalkway = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/walkway.obj"));
}
 
Example 34
Project: 4Space-5   File: TileEntityAluminumWireRenderer.java   View source code 4 votes vote down vote up
public TileEntityAluminumWireRenderer()
{
    this.model = AdvancedModelLoader.loadModel(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "models/aluminumWire.obj"));
    this.model2 = AdvancedModelLoader.loadModel(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "models/aluminumWireHeavy.obj"));
}
 
Example 35
Project: 4Space-5   File: ModelRotationRendererGC.java   View source code 4 votes vote down vote up
public ModelRotationRendererGC(ModelBase modelBase, int i, int j, ModelRenderer baseRenderer, int type)
{
    super(modelBase, i, j, (ModelRotationRenderer)baseRenderer);
    this.type = type;
    ModelPlayerBaseGC.frequencyModule = AdvancedModelLoader.loadModel(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "models/frequencyModule.obj"));
}
 
Example 36
Project: MidgarCrusade   File: RenderCaladbolg.java   View source code 4 votes vote down vote up
public RenderCaladbolg()
   {
/* 23 */     this.AncientswordModel = AdvancedModelLoader.loadModel(new ResourceLocation("FF7:models/Caladbolg.obj"));
/* 24 */     this.AncientswordTexture = new ResourceLocation("FF7:models/Caladbolg.png");
   }
 
Example 37
Project: MidgarCrusade   File: RenderTileEntityChest3.java   View source code 4 votes vote down vote up
public RenderTileEntityChest3(){
        texture = new ResourceLocation(Main.MODID, "models/chest3.png");
        objModelLocation = new ResourceLocation(Main.MODID, "models/chest3.obj");
        model = AdvancedModelLoader.loadModel(objModelLocation);
}
 
Example 38
Project: MidgarCrusade   File: Renderenchantedrod.java   View source code 4 votes vote down vote up
public Renderenchantedrod()
   {
/* 23 */     this.AyvuirredModel = AdvancedModelLoader.loadModel(new ResourceLocation("FF7:models/enchantedrod.obj"));
/* 24 */     this.AyvuirredTexture = new ResourceLocation("FF7:models/enchantedrod.png");
   }
 
Example 39
Project: MidgarCrusade   File: RenderTileEntityCauldron.java   View source code 4 votes vote down vote up
public RenderTileEntityCauldron(){
        texture = new ResourceLocation(Main.MODID, "models/cauldron.png");
        objModelLocation = new ResourceLocation(Main.MODID, "models/cauldron.obj");
        model = AdvancedModelLoader.loadModel(objModelLocation);
}
 
Example 40
Project: MidgarCrusade   File: Renderyuna.java   View source code 4 votes vote down vote up
public Renderyuna()
   {
/* 23 */     this.DemonbellModel = AdvancedModelLoader.loadModel(new ResourceLocation("FF7:models/yuna.obj"));
/* 24 */     this.DemonbellTexture = new ResourceLocation("FF7:models/yuna.png");
   }