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.

Featured Replies

Posted

I am trying to get the location of where the mouse clicked on my the players model when the mouse has clicked. I know i need to use the mouseRelease method but i how no idea other than that. Any ideas on how to proceed about this would be helpful.



    int xPos = (this.width) / 2;
    int yPos = (this.height) / 2;

    GL11.glPushMatrix();
    GL11.glColor3f(1F, 1F, 1F);
    GL11.glEnable(32826);
    GL11.glEnable(2903);
    GL11.glPushMatrix();
    GL11.glTranslatef(xPos + 40, yPos + 98, 50F);
    // Makes the scaling easier gui
    GL11.glScalef(-75, 75, 75);
    GL11.glRotatef(180F, 0.0F, 0.0F, 1F);
    GL11.glRotatef(135F, 0.0F, 1F, 0.0F);
    RenderHelper.enableStandardItemLighting();
    GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(0.0F, 1.0F, 0.0F, 0.0F);
    playerSP.renderYawOffset = playerSP.rotationYaw = playerSP.prevRotationYaw = playerSP.prevRotationYawHead = playerSP.rotationYawHead;
    playerSP.rotationPitch = 0.0F;
    GL11.glTranslatef(0.0F, playerSP.renderOffsetY, 0.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    // scale by default is 1f
    GlStateManager.scale(scale, scale, scale);
    GL11.glRotatef(yaw, 0, 1, 0);
    // Used to render the player to the gui along with rotations
    Minecraft.getMinecraft().getRenderManager().doRenderEntity(playerSP, 0.0D, 0.0D, 0.0D, yaw, 1f, false);
    GL11.glRotatef(pitch, 0, 0, 1);
    GL11.glPopMatrix();
    RenderHelper.disableStandardItemLighting();
    GL11.glDisable(32826);
    GL11.glTranslatef(0F, 0F, 0.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glEnable(32826);
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240 / 1.0F, 240 / 1.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(32826);
    RenderHelper.disableStandardItemLighting();
    GL11.glDisable(2896);
    GL11.glDisable(2929);
    GL11.glPopMatrix();
[/Code]

 

 

Full Source: [font=verdana][size=78%]https://gist.github.com/Wurmatron/9c66c89489b4d5204f91c76e5dbb7fae[/size][/font]

- Wurmatron

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.