Posted May 13, 201510 yr Hi, i'm trying to make a camouflage block with a TileEntitySpecialRenderer This is the code (copied from http://www.minecraftforge.net/forum/index.php?topic=11397.msg59091#msg59091, just for an experiment) : @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof MyTileEntity) { Block block = Blocks.dirt; // i just trying dirt if (block != null) { RenderHelper.disableStandardItemLighting(); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_BLEND); if (Minecraft.isAmbientOcclusionEnabled()) { GL11.glShadeModel(GL11.GL_SMOOTH); } else { GL11.glShadeModel(GL11.GL_FLAT); } GL11.glPushMatrix(); GL11.glTranslated(d0, d1, d2); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("minecraft", "textures/blocks/dirt.png")); // bind dirt Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); RenderBlocks renderBlocks = new RenderBlocks(tileEntity.getWorldObj()); tessellator.setTranslation(-te.xCoord, -te.yCoord, -te.zCoord); renderBlocks.renderBlockByRenderType(block, te.xCoord, te.yCoord, te.zCoord); tessellator.draw(); tessellator.setTranslation(0, 0, 0); GL11.glPopMatrix(); RenderHelper.enableStandardItemLighting(); } } } This is what happens:
May 13, 201510 yr #ThisIsWhyYouUse"glPushState()"And"glPopState()" 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.
May 14, 201510 yr Author Sorry, and where i used them? This is my frist look to a renderer and i need help
May 14, 201510 yr http://goo.gl/OF5NIo 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.