Posted January 24, 20205 yr 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. Edited January 24, 20205 yr by kyazuki
January 24, 20205 yr 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. 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
January 24, 20205 yr 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.
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.