Posted April 26, 201510 yr I copied my working 1.7 code over to 1.8 and made the necessary changes to get rid of the errors, but in-game, the quad I want to draw just doesn't appear. Does anyone know what change I need to make? Code: @Override public void renderTileEntityAt(TileEntity te, double x, double z, double something, float somethingElse, int somethingElser) { ItemStack stack = ((TileEntityFloowerPot)te).getStackInSlot(0); if(stack != null && stack.stackSize > 0) { GL11.glPushMatrix(); BlockPos pos = te.getPos(); GL11.glTranslated(pos.getX(), pos.getY(), pos.getZ()); Tessellator t = Tessellator.getInstance(); WorldRenderer r = t.getWorldRenderer(); r.startDrawingQuads(); this.bindTexture(DataReference.powderRes); double level = (((float)stack.stackSize / 64) * 0.3125) + 0.0625; r.addVertexWithUV(0.625, level, 0.625, 1.0, 1.0); r.addVertexWithUV(0.625, level, 0.375, 1.0, 0.0); r.addVertexWithUV(0.375, level, 0.375, 0.0, 0.0); r.addVertexWithUV(0.375, level, 0.625, 0.0, 1.0); t.draw(); GL11.glPopMatrix(); } } Thanks for reading. Edited August 5, 20178 yr by FredTargaryen
April 26, 201510 yr Hi This tutorial project has a working example of tessellator rendering in TESR using quads https://github.com/TheGreyGhost/MinecraftByExample (see MBE21) -TGG
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.