Jump to content

Custom Gui texture not working outside eclipse.


EarthGuardian

Recommended Posts

hey all.

 

my custom furnace gui texture isnt working outside eclipse .. :(

 

iv updated elipse, updated forge, reinstalled eclipce, reinstalled forge, reinstalled mc,

iv changed the location setup manny times over like the forum sugested,

i renammed the location serveral times, and iv done all the tings the forums sugested before.

 

why isnt my gui still not working outside ecplipse (runmode) ...

 

Version forge mod loader 871,

mc 1.6.2

mcp v8.04

 

(both normal mc and eclipse same stuff)

 

the gui class:

 

package Earth.Combiner.Utilety.MachineUtilety;

import Earth.Combiner.CombinerCore;
import Earth.Combiner.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;// Cant import somhow ...

@SideOnly(Side.CLIENT)
public class GuiCombMachine extends GuiContainer
{  
    private TileEntityCombMachine commachineInventory;

    public GuiCombMachine(InventoryPlayer par1InventoryPlayer, TileEntityCombMachine par2TileEntityCombMachine)
    {
        super(new ContainerCombMachine(par1InventoryPlayer, par2TileEntityCombMachine));
        this.commachineInventory = par2TileEntityCombMachine;
    }

    /**
     * Draw the foreground layer for the GuiContainer (everything in front of the items)
     */
    protected void drawGuiContainerForegroundLayer(int par1, int par2)
    {
        String s = this.commachineInventory.isInvNameLocalized() ? this.commachineInventory.getInvName() : I18n.getString(this.commachineInventory.getInvName());
        this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752);
        this.fontRenderer.drawString(I18n.getString("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
    }

    /**
     * Draw the background layer for the GuiContainer (everything behind the items)
     */
    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        mc.renderEngine.bindTexture(Strings.GUI_COMBHEATER);
        int k = (this.width - this.xSize) / 2;
        int l = (this.height - this.ySize) / 2;
        this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
        int i1;

        if (this.commachineInventory.isCombining())
        {
        	this.drawTexturedModalRect(k+31, l+38, 176, 32, 12, 12);
            i1 = this.commachineInventory.getCombTimeRemainingScaled(12);
            this.drawTexturedModalRect(k + 78, l + 54 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
        }

        i1 = this.commachineInventory.getCombDurProgressScaled(24);
        this.drawTexturedModalRect(k + 70, l + 34, 176, 14, i1 + 1, 16);
        
    }
}

 

 

the location class:

 

package Earth.Combiner.lib;

import java.util.List;
import net.minecraft.util.ResourceLocation;

public class Strings {

// Needed for the textures
    public static final String modID = "combinercore"; 

// Item Strings
public static final String ROUNDSTONE_NAME = "Stone Round";
public static final String COMBSTONE_NAME = "Combiner Stone";
public static final String COMBIRON_NAME = "Combiner Iron";
public static final String COMBGOLD_NAME = "Combiner Gold";
public static final String COMBEMERALD_NAME = "Combiner Diamond";
public static final String WOODSCRAP_NAME = "Wood Scrap";
public static final String COBBLESCRAP_NAME = "Cobble Scrap";
public static final String COMPWOODSCRAP_NAME = "Compressed Wood Scrap";
public static final String COMPCOALSCRAP_NAME = "Compressed Coal Scrap";

// Tool Strings
public static final String COBBLETOOL_NAME = "Cobble Tool";
public static final String IRONTOOL_NAME = "Iron Tool";
public static final String GOLDTOOL_NAME = "Gold Tool";
public static final String EMERALDTOOL_NAME = "Diamond Tool";

// Block Strings
public static final String COMB_MACHINEON_NAME = "CombMachine";
public static final String COMB_MACHINEOFF_NAME = "CombinerMachine";
public static final String COAL_HEATERON_NAME = "CoalHeat";
public static final String COAL_HEATEROFF_NAME = "CoalHeater";
public static final String STONEGLASS_NAME = "Stone Glass";
public static final String STONEPLANK_NAME = "Stone Plank";

// Gui stings
public static final String GUI_LOCATION = "/textures/gui/";

// Gui final location
public static final ResourceLocation GUI_COMBHEATER = new ResourceLocation(modID, GUI_LOCATION + "combheater.png");
public static final ResourceLocation GUI_COALHEATER = new ResourceLocation(modID, GUI_LOCATION + "coalheater.png");

}

 

 

hope i wil get som help with this becose im stunned this gui texture not rendering outside eclipse.

 

greets

Link to comment
Share on other sites

Eclipse reads files slightly differently, when compiled it has be exactly correct but eclipse is a little more lenient.

Really annoying actually, if you accidentally do your capitalization wrong on a texture, it'll work in eclipse but not when compiled :P

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.