July 25, 201312 yr In my GUI class' drawBackground() method: this.mc.renderEngine.func_110577_a(new ResourceLocation("plunderrummage", "textures/gui/disenchanter.png")); In my recompiled, reobfuscated, zipped mod for the client, I have this setup: PlunderRummage.zip > com > mod > plunderrummage > .class PlunderRummage.zip > assets > plunderrummage > textures > gui > disenchanter.png, others. . . PlunderRummage.zip > mcmod.info I use that set up for ALL of my mods, and it works fine. If you're using the exact same directory and implementation, your textures should work.
July 25, 201312 yr Your package isn't lower case. ad why does that matter ? eclips can make it work o.0 why sound mc with fml not ?? ist basicly the same ??
July 25, 201312 yr hey guff, btw its a good practice to make resourcelocation 1 time and reuse the same object over and over, specially for something that is used every frame while drawing *thumb up* how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
July 25, 201312 yr hey guff, btw its a good practice to make resourcelocation 1 time and reuse the same object over and over, specially for something that is used every frame while drawing *thumb up* I do, I just used an object fill-in. I would assume he would use a field just the same since it's kind of a given.
July 25, 201312 yr Your package isn't lower case. oooh geus wotn ower casing all my pakkages dint work .. i toght it wouldnt work but i said to myselve elts try it .. but it dint make sence to me.. thx for leting me was 1 hour to rename all my pakkages names to lower case .. it dint work for the GUI texture .. still dont understand why the Gui texture works in eclipse but not as eported mod ... the locations sould be spot on becose eclipse makes it work ..
July 25, 201312 yr hey guff, btw its a good practice to make resourcelocation 1 time and reuse the same object over and over, specially for something that is used every frame while drawing *thumb up* I do, I just used an object fill-in. I would assume he would use a field just the same since it's kind of a given. oh ok, i was also thinking you were printing that for the example, but i wanted to make sure (im a efficiency whore ) how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 15, 201312 yr I made a custom furnace that the GUI texture works fine in the eclispe minecraft, but when I open the furnace in regular minecraft it shows black and purple squares. Custom GUI code. package minecraftmod; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class TutGuiFurnace extends GuiContainer { private TileEntityDarkFurnace furnaceInventory; public TutGuiFurnace(InventoryPlayer par1InventoryPlayer, TileEntityDarkFurnace par2TileEntityFurnace) { super(new ContainerTutFurnace(par1InventoryPlayer, par2TileEntityFurnace)); this.furnaceInventory = par2TileEntityFurnace; } /** * Draw the foreground layer for the GuiContainer (everything in front of the items) */ protected void drawGuiContainerForegroundLayer(int par1, int par2) { String s = this.furnaceInventory.isInvNameLocalized() ? this.furnaceInventory.getInvName() : StatCollector.translateToLocal(this.furnaceInventory.getInvName()); this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752); this.fontRenderer.drawString(StatCollector.translateToLocal("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); this.mc.func_110434_K().func_110577_a(new ResourceLocation("titaniummod:/textures/gui/furnace.png"));< This you want to change to textures/gui/container/furnace.png. Then make sure you have that directory in src/Minecraft/assets/yourmodname/(you have to create the assets folder) 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.furnaceInventory.isBurning()) { i1 = this.furnaceInventory.getBurnTimeRemainingScaled(12); this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); } i1 = this.furnaceInventory.getCookProgressScaled(24); this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); } }
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.