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 wrote this cord, but it is worked only when player hold items.

Moreover blocks render on player.

  @SubscribeEvent
  public static void onRenderPlayerPre(RenderPlayerEvent.Pre event) {
    GlStateManager.pushMatrix();
    GlStateManager.scalef(2.0f, 1.0f, 1.0f);
  }

  @SubscribeEvent
  public static void onRenderPlayerPost(RenderPlayerEvent.Post event) {
    GlStateManager.popMatrix();
  }

Then, how does GlStateManager.scalef work?

I want to change Player's scaleX(depth) to 1.2X and scaleZ(width) to 2.0Z.

GlStateManager.scalef(2.0f, 1.0f, 1.0f) makes a player fat, but depth doesn't change.

GlStateManager.scalef(1.0f, 1.0f, 2.0f) shrinks a player's height.

2020-01-24_16.00.28.png

Edited by kyazuki

5 hours ago, kyazuki said:

I wrote this cord, but it is worked only when player hold items.

Moreover blocks render on player.


  @SubscribeEvent
  public static void onRenderPlayerPre(RenderPlayerEvent.Pre event) {
    GlStateManager.pushMatrix();
    GlStateManager.scalef(2.0f, 1.0f, 1.0f);
  }

  @SubscribeEvent
  public static void onRenderPlayerPost(RenderPlayerEvent.Post event) {
    GlStateManager.popMatrix();
  }

Then, how does GlStateManager.scalef work?

I want to change Player's scaleX(depth) to 1.2X and scaleZ(width) to 2.0Z.

GlStateManager.scalef(2.0f, 1.0f, 1.0f) makes a player fat, but depth doesn't change.

GlStateManager.scalef(1.0f, 1.0f, 2.0f) shrinks a player's height.

2020-01-24_16.00.28.png

It's 1.15.2, you should use scale methods using given in the event MatrixStack. If it is not given, you have to wait for Forge fix

  • Author

I tried using scale method of MatrixStack.

@SubscribeEvent
  public static void onRenderPlayerPre(RenderPlayerEvent.Pre event) {
    event.getMatrixStack().push();
    event.getMatrixStack().scale(2.0f, 1.0f, 2.0f);
    //GlStateManager.pushMatrix();
    //GlStateManager.scalef(2.0f, 1.0f, 1.0f);
  }

  @SubscribeEvent
  public static void onRenderPlayerPost(RenderPlayerEvent.Post event) {
    event.getMatrixStack().pop();
    //GlStateManager.popMatrix();
  }

I want to make player fat from any direction.

But I look normal when seen from above.

2020-01-25_03.43.59.png

2020-01-25_03.44.05.png

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.