Posted June 15, 20205 yr I am trying to show a map within the inventory and the map is being cut off by items. What should I do to fix this? Code: Spoiler RenderSystem.pushMatrix(); RenderSystem.disableDepthTest(); mc.getTextureManager().bindTexture(MAP_BACKGROUND); BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer(); RenderSystem.translated(x, y + 15.5, 0); RenderSystem.scaled(0.5, 0.5, 1); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); bufferbuilder.pos(-7, 135, 0).color(255, 255, 255, 255).tex(0, 1).lightmap(240).endVertex(); bufferbuilder.pos(135, 135, 0).color(255, 255, 255, 255).tex(1, 1).lightmap(240).endVertex(); bufferbuilder.pos(135, -7, 0).color(255, 255, 255, 255).tex(1, 0).lightmap(240).endVertex(); bufferbuilder.pos(-7, -7, 0).color(255, 255, 255, 255).tex(0, 0).lightmap(240).endVertex(); bufferbuilder.finishDrawing(); RenderSystem.enableAlphaTest(); WorldVertexBufferUploader.draw(bufferbuilder); RenderSystem.translated(0, 0, 1); MatrixStack matrixStack = new MatrixStack(); IRenderTypeBuffer.Impl irendertypebuffer$impl = IRenderTypeBuffer.getImpl(bufferbuilder); mc.gameRenderer.getMapItemRenderer().renderMap(matrixStack, irendertypebuffer$impl, mapdata, true, 15728880); irendertypebuffer$impl.finish(); RenderSystem.enableDepthTest(); RenderSystem.popMatrix(); This is inside the GuiScreenEvent.DrawScreenEvent.Post event Edit: Turns out I just had to increase the z value. Edited June 16, 20205 yr by VendoAU
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.