Posted July 28, 20169 yr ItemStack slot1 = new ItemStack(Items.books); GL11.glPushMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int k = (this.width - 176) / 2; int l = (this.height - 166 - 50) / 2; GL11.glPushMatrix(); GL11.glColor4f(10.0f, 200.0f, 10.0f, 1.0f); this.mc.renderEngine.bindTexture(new ResourceLocation("textures/atlas/items.png")); this.drawTexturedModelRectFromIcon(guiX, guiY - 35, slot1.getIconIndex(), 16, 16); GL11.glPopMatrix(); GL11.glPopMatrix(); if change item for block. ItemStack slot1 = new ItemStack(Item.getItemFromBlock(Blocks.stone)); GL11.glPushMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int k = (this.width - 176) / 2; int l = (this.height - 166 - 50) / 2; GL11.glPushMatrix(); GL11.glColor4f(10.0f, 200.0f, 10.0f, 1.0f); this.mc.renderEngine.bindTexture(new ResourceLocation("textures/atlas/items.png")); this.drawTexturedModelRectFromIcon(guiX, guiY - 35, slot1.getIconIndex(), 16, 16); GL11.glPopMatrix(); GL11.glPopMatrix(); will can't show icon of block. i need show icon of block in gui screen.
July 28, 20169 yr Because block textures aren't in the items texture atlas. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
July 28, 20169 yr Author OK i try change "textures/atlas/items.png" to "textures/atlas/blocks.png" but it show texture, not block. now i need how to render model block in guiscreen.
July 28, 20169 yr Author and i can check itemstack that is block or item ? I'm sorry I can't explain in English what you understand.
July 28, 20169 yr That's because those are textures, models. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
July 29, 20169 yr ItemStack#getItem() instanceof ItemBlock Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.