Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

RedLaboratory

Members
  • Joined

  • Last visited

  1. I somehow figured out how to fix this problem. Vec3d projectedView = Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getProjectedView(); GlStateManager.translated(-projectedView.x, -projectedView.y, -projectedView.z); That function returns exactly what I want.
  2. I have a similar problem. When I draw something in world on RenderWorldLastEvent, everything works fine except when player sneaks. And here is my code. @SubscribeEvent public static void onRenderWorldLast(RenderWorldLastEvent event) { BlockRenderer.renderBlockOutline(event.getPartialTicks()); // XXX render one block at 1, 1, 1 for testing } public static void renderBlockOutline(float partialTicks) { ClientPlayerEntity playerEntity = Minecraft.getInstance().player; double x = playerEntity.lastTickPosX + (playerEntity.posX - playerEntity.lastTickPosX) * partialTicks; double y = playerEntity.lastTickPosY + (playerEntity.posY - playerEntity.lastTickPosY) * partialTicks; double z = playerEntity.lastTickPosZ + (playerEntity.posZ - playerEntity.lastTickPosZ) * partialTicks; //LogManager.getLogger().info(playerEntity.getEyePosition(partialTicks)); //Vec3d eyePos = playerEntity.getEyePosition(partialTicks); //Vec3d eyePos = Minecraft.getInstance().getRenderViewEntity().getEyePosition(partialTicks); GlStateManager.pushMatrix(); //GlStateManager.translated(-eyePos.x, -eyePos.y, -eyePos.z); GlStateManager.translated(-x, -y - playerEntity.getEyeHeight(), -z); GlStateManager.translated(-9, 63, 6); GlStateManager.disableCull(); GlStateManager.disableDepthTest(); GlStateManager.disableTexture(); GlStateManager.color4f(1, 1, 1, 1); //GlStateManager.lineWidth(1); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION); bufferBuilder.pos(0, 0, 0).endVertex(); bufferBuilder.pos(1, 0, 0).endVertex(); bufferBuilder.pos(1, 0, 1).endVertex(); bufferBuilder.pos(0, 0, 1).endVertex(); bufferBuilder.pos(0, 1, 0).endVertex(); bufferBuilder.pos(1, 1, 0).endVertex(); bufferBuilder.pos(1, 1, 1).endVertex(); bufferBuilder.pos(0, 1, 1).endVertex(); tessellator.draw(); GlStateManager.enableDepthTest(); GlStateManager.enableTexture(); GlStateManager.popMatrix(); }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.