Glistre Posted December 15, 2015 Share Posted December 15, 2015 No ideas left what to look at, any suggestions?: I am getting a black background effect behind my custom potion icon when I select an item in inventory while the player is under the custom potion effect. I used renderInventory method. The size of the black space corresponds the the width and height parameters in the drawTexturedModalRect method. Any thoughts on what could be happening? It does not occur when selecting blocks. Also tried the setIcOnIndex hack for my custom potion icon and it does exactly the same thing. I noticed the effect does not occur if I select a full stack of my potion in inventory , only if I select one. Also, the effect does not occur if I select blocks Wish I knew what was going on ...should I be creating custom gui overlay and making it an event to ensure that I am not having the gui opened twice ? Any thoughts appreciated I noticed the effect does not occur if I select a full stack of my potion in inventory , only if I select one. Also, the effect does not occur if I select blocks Wish I knew what was going on ...should I be creating custom gui overlay and making it an event to ensure that I am not having the gui opened twice ? Any thoughts appreciated and now my icon is perfect but still see some black behind the potion effects rectangle Now my code looks like this: private static int Width = 18; private static int Height = 18; public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc){ GL11.glEnable(GL11.GL_BLEND); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("glistremod","textures/gui/inventory.png")); mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, u + 9, v + 9, Width, Height); } I am probably doing this all wrong possibly need events to render anything with gui The effect does not occur when selecting blocks. What seems to be happened is when I click on an item, my icon renders but an additional icon renders. The u & v icons control the placing of this second icon on the screen and the x & y control the placing of the initial icon. What I want to happen is that the initial icon that is rendering just stays as is and nothing else shows up. Could someone explain to me how this method is working I am sure I could fix it if I understood it? Are there any tutorials on this or other posts? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.