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.

DocRedstone

Members
  • Joined

  • Last visited

Everything posted by DocRedstone

  1. I am attempting to modify the Beacon render code. The code itself works, but I cannot manage to get it to rotate. When it "rotates" it does so by following the players camera. Can anyone tell me what I am doing wrong? Tessellator tessellator = Tessellator.instance; this.bindTexture(beamIcon); GL11.glPushMatrix(); GL11.glRotatef(90f, 0f, 1.0f, 0f); GL11.glPushMatrix(); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); float f2 = (float) tileentity.getWorldObj().getTotalWorldTime() + f; float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F); byte b0 = 1; double d3 = (double)f2 * 0.025D * (1.0D - (double)(b0 & 1) * 2.5D); tessellator.startDrawingQuads(); tessellator.setColorRGBA(108, 248, 115, 32); double d4 = 0.05; //size of beam double d5 = 0.5D + Math.cos(d3 + 2.356194490192345D) * d4; double d6 = 0.5D + Math.sin(d3 + 2.356194490192345D) * d4; double d7 = 0.5D + Math.cos(d3 + (Math.PI / 4D)) * d4; double d8 = 0.5D + Math.sin(d3 + (Math.PI / 4D)) * d4; double d9 = 0.5D + Math.cos(d3 + 3.9269908169872414D) * d4; double d10 = 0.5D + Math.sin(d3 + 3.9269908169872414D) * d4; double d11 = 0.5D + Math.cos(d3 + 5.497787143782138D) * d4; double d12 = 0.5D + Math.sin(d3 + 5.497787143782138D) * d4; double d13 = 15; //height double d14 = 0.0D; double d15 = 1.0D; double d16 = (double)(-1.0F + f3); double d17 = (double)(256.0F * f1) * (0.5D / d4) + d16; tessellator.addVertexWithUV(d0 + d5, d1 + d13, d2 + d6, d15, d17); tessellator.addVertexWithUV(d0 + d5, d1, d2 + d6, d15, d16); tessellator.addVertexWithUV(d0 + d7, d1, d2 + d8, d14, d16); tessellator.addVertexWithUV(d0 + d7, d1 + d13, d2 + d8, d14, d17); tessellator.addVertexWithUV(d0 + d11, d1 + d13, d2 + d12, d15, d17); tessellator.addVertexWithUV(d0 + d11, d1, d2 + d12, d15, d16); tessellator.addVertexWithUV(d0 + d9, d1, d2 + d10, d14, d16); tessellator.addVertexWithUV(d0 + d9, d1 + d13, d2 + d10, d14, d17); tessellator.addVertexWithUV(d0 + d7, d1 + d13, d2 + d8, d15, d17); tessellator.addVertexWithUV(d0 + d7, d1, d2 + d8, d15, d16); tessellator.addVertexWithUV(d0 + d11, d1, d2 + d12, d14, d16); tessellator.addVertexWithUV(d0 + d11, d1 + d13, d2 + d12, d14, d17); tessellator.addVertexWithUV(d0 + d9, d1 + d13, d2 + d10, d15, d17); tessellator.addVertexWithUV(d0 + d9, d1, d2 + d10, d15, d16); tessellator.addVertexWithUV(d0 + d5, d1, d2 + d6, d14, d16); tessellator.addVertexWithUV(d0 + d5, d1 + d13, d2 + d6, d14, d17); tessellator.draw(); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(true); GL11.glPopMatrix(); GL11.glPopMatrix();

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.