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.

MysticalBilly

Members
  • Joined

  • Last visited

Everything posted by MysticalBilly

  1. I looked at your link, but it seemed to be for rendering images. Could you send me some code for just drawing a plain rectangle (by knowing the vertices)? You are correct about me trying to draw an overlay.
  2. Could you send some example code, and which imports to use?
  3. Could anyone send me a function that would draw a rectangle on the user's screen, given (x1, x2, y1, y2), every frame? (I am new to forge) I have tried asking this for 1.8.9, but that is old, so I updated to a more recent version of the game.
  4. All I want to do is draw a red rectangle on the user's screen. How would I do this? I tried public void drawFilledRectangle(int x1, int y1, int x2, int y2) { if (x1 < x2) { int tempX = x1; x1 = x2; x2 = tempX; } if (y1 < y2) { int tempY = y1; y1 = y2; y2 = tempY; } double x1a = x1; double x2a = x2; double y1a = y1; double y2a = y2; Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); GlStateManager.enableColorLogic(); GlStateManager.enableNormalize();; GlStateManager.viewport(770, 771, 1, 0); GlStateManager.color(1, 0, 0, 1); worldrenderer.begin(7, DefaultVertexFormats.POSITION_NORMAL); worldrenderer.setTranslation((double)x1a, (double)y2a, 0.0D); worldrenderer.setTranslation(x2a, y2a, 0.0D); worldrenderer.setTranslation(x2a, y1a, 0.0D); worldrenderer.setTranslation(x1a, y1a, 0.0D); tessellator.draw(); GlStateManager.disableColorLogic(); GlStateManager.disableNormalize(); } but then Minecraft crashes: The game crashed whilst unexpected errorError: java.lang.NoSuchMethodError: net.minecraft.client.renderer.Tessellator.getInstance()Lnet/minecraft/client/renderer/Tessellator; Can anyone send me a draw filled rectangle method that works in 1.8.9?

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.