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.

OmegaRogue

Members
  • Joined

  • Last visited

Everything posted by OmegaRogue

  1. So it does the same thing Tessellator.setNormal(x, y, z); Did
  2. and what does buff.putNormal(x,y,z); do?
  3. Thanks, the problem with the second method is this:
  4. I am porting LanteaCraft to 1.12, and i cant figure out how to change everything that uses Tesselate to using BufferBuilder here is one method (it contains most of the stuff i dont know how to port): private void renderItemIn2D(Tessellator t, float u1, float v0, float u0, float v1, int w, int h, float p_78439_7_) { t.startDrawingQuads(); t.setNormal(0.0F, 0.0F, 1.0F); t.addVertexWithUV(0.0D, 0.0D, 0.0D, (double) u1, (double) v1); t.addVertexWithUV(1.0D, 0.0D, 0.0D, (double) u0, (double) v1); t.addVertexWithUV(1.0D, 1.0D, 0.0D, (double) u0, (double) v0); t.addVertexWithUV(0.0D, 1.0D, 0.0D, (double) u1, (double) v0); t.draw(); t.startDrawingQuads(); t.setNormal(0.0F, 0.0F, -1.0F); t.addVertexWithUV(0.0D, 1.0D, (double) (0.0F - p_78439_7_), (double) u1, (double) v0); t.addVertexWithUV(1.0D, 1.0D, (double) (0.0F - p_78439_7_), (double) u0, (double) v0); t.addVertexWithUV(1.0D, 0.0D, (double) (0.0F - p_78439_7_), (double) u0, (double) v1); t.addVertexWithUV(0.0D, 0.0D, (double) (0.0F - p_78439_7_), (double) u1, (double) v1); t.draw(); float f5 = 0.5F * (u1 - u0) / (float) w; float f6 = 0.5F * (v1 - v0) / (float) h; t.startDrawingQuads(); t.setNormal(-1.0F, 0.0F, 0.0F); int k; float f7; float f8; for (k = 0; k < w; ++k) { f7 = (float) k / (float) w; f8 = u1 + (u0 - u1) * f7 - f5; t.addVertexWithUV((double) f7, 0.0D, (double) (0.0F - p_78439_7_), (double) f8, (double) v1); t.addVertexWithUV((double) f7, 0.0D, 0.0D, (double) f8, (double) v1); t.addVertexWithUV((double) f7, 1.0D, 0.0D, (double) f8, (double) v0); t.addVertexWithUV((double) f7, 1.0D, (double) (0.0F - p_78439_7_), (double) f8, (double) v0); } t.draw(); t.startDrawingQuads(); t.setNormal(1.0F, 0.0F, 0.0F); float f9; for (k = 0; k < w; ++k) { f7 = (float) k / (float) w; f8 = u1 + (u0 - u1) * f7 - f5; f9 = f7 + 1.0F / (float) w; t.addVertexWithUV((double) f9, 1.0D, (double) (0.0F - p_78439_7_), (double) f8, (double) v0); t.addVertexWithUV((double) f9, 1.0D, 0.0D, (double) f8, (double) v0); t.addVertexWithUV((double) f9, 0.0D, 0.0D, (double) f8, (double) v1); t.addVertexWithUV((double) f9, 0.0D, (double) (0.0F - p_78439_7_), (double) f8, (double) v1); } t.draw(); t.startDrawingQuads(); t.setNormal(0.0F, 1.0F, 0.0F); for (k = 0; k < h; ++k) { f7 = (float) k / (float) h; f8 = v1 + (v0 - v1) * f7 - f6; f9 = f7 + 1.0F / (float) h; t.addVertexWithUV(0.0D, (double) f9, 0.0D, (double) u1, (double) f8); t.addVertexWithUV(1.0D, (double) f9, 0.0D, (double) u0, (double) f8); t.addVertexWithUV(1.0D, (double) f9, (double) (0.0F - p_78439_7_), (double) u0, (double) f8); t.addVertexWithUV(0.0D, (double) f9, (double) (0.0F - p_78439_7_), (double) u1, (double) f8); } t.draw(); t.startDrawingQuads(); t.setNormal(0.0F, -1.0F, 0.0F); for (k = 0; k < h; ++k) { f7 = (float) k / (float) h; f8 = v1 + (v0 - v1) * f7 - f6; t.addVertexWithUV(1.0D, (double) f7, 0.0D, (double) u0, (double) f8); t.addVertexWithUV(0.0D, (double) f7, 0.0D, (double) u1, (double) f8); t.addVertexWithUV(0.0D, (double) f7, (double) (0.0F - p_78439_7_), (double) u1, (double) f8); t.addVertexWithUV(1.0D, (double) f7, (double) (0.0F - p_78439_7_), (double) u0, (double) f8); } t.draw(); } and here is another one: public void renderDefaultInventoryBlock(Block block, int metadata, Trans3 trans, BlockModelRenderer rb) { setUpTextureOverride(rb); setColorMultiplier(0xffffff); Tessellator tess = Tessellator.getInstance(); BufferBuilder buff = tess.getBuffer(); buff.setColorOpaque_F(1, 1, 1); buff.begin(7, DefaultVertexFormats.BLOCK); GL11.glTranslatef(0.0f, -0.1f, 0.0f); renderCube(buff, trans, null, block, 0, 0, 0, metadata, 0xf000f0); tess.draw(); } im thanking anyone in advance for helping me

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.