Jump to content

Sakul6499

Members
  • Posts

    2
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Sakul6499's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks too all! It works! my Class: package de.sakul6499.GUI; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiYesNo; import net.minecraft.client.gui.inventory.GuiFurnace; import net.minecraft.util.ResourceLocation; import de.sakul6499.ExoTech; import de.sakul6499.Blocks.Blocks; import de.sakul6499.Blocks.TestBlockTileEntity; public class BasicGui extends GuiScreen { private static final ResourceLocation texture = new ResourceLocation(ExoTech.MODID + ":" + "textures/gui/guismasher.png"); int xSize = 176; int ySize = 214; @Override public void drawScreen(int mouseX, int mouseY, float renderParticleTicks) { mc.getTextureManager().bindTexture(texture); int x = ((this.width - this.xSize) / 2); int y = ((this.height - this.ySize) / 2); this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } @Override public boolean doesGuiPauseGame() { return false; } }
  2. Hey, I want to create a custom GUI for a Block. If I Click the Block it's shows a "Interface" but with Purple and Black Points (like: NoTextureFound) My GUIClass: public class GUIBasic extends GuiScreen { public GUIBasic() { } @Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ResourceLocation res = new ResourceLocation(ModMain.MODID + ":" + "assets/textures/gui/GUI_Smasher.png"); this.mc.getTextureManager().bindTexture(res); int xSize = 176; int ySize = 214; int w = this.width; int h = this.height; int x = ((w - xSize) / 2); int y = ((h - ySize) / 2); drawTexturedModalRect(x, y, 0, 0, xSize, ySize); } } The GUI_Smasher.png file exist and can be found under: resources/assets.usefull_extensions.textures.gui.GUI_Smasher.png xSize and ySize describe the Scale of the Picture... The Original Picture is scaled by 255 x 255. The Exeption: java.io.FileNotFoundException: usefull_extensions:assets/userfull_extensions/textures/gui/GUI_Smasher.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) ~[simpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) [TextureManager.class:?] at de.sakul6499.gui.GUIBasic.drawScreen(GUIBasic.java:25) [GUIBasic.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] I think it must be something with the path... but i try'ed something but nothing works
×
×
  • Create New...

Important Information

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