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

Hello there I have been trying to rotate player upside down but can`t for some reason I tried many events and codes but still not able and the latest code I used is this 

package net.skatric.tutorialmod.event;


import com.mojang.math.Axis;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.skatric.tutorialmod.TutorialMod;
import org.lwjgl.opengl.GL11;


@Mod.EventBusSubscriber(modid = TutorialMod.MOD_ID,bus = Mod.EventBusSubscriber.Bus.FORGE)
public class bodyrotation {
    static boolean checking = false;
    @SubscribeEvent
    public static void event(RenderPlayerEvent.Pre event) {
        if (checking == false) {
            checking = true;
        PlayerModel<AbstractClientPlayer> model = event.getRenderer().getModel();
        event.getPoseStack().mulPose(Axis.XN.rotationDegrees(0f));
        event.getPoseStack().mulPose(Axis.YN.rotationDegrees(0f));
        event.getPoseStack().mulPose(Axis.ZN.rotationDegrees(180f));

        }

    }
}

 

5 hours ago, skatric said:

Hello there I have been trying to rotate player upside down but can`t for some reason I tried many events and codes but still not able and the latest code I used is this 

Strange that it does not work, the code looks OK to me. This works when I try it:

	@SubscribeEvent
	public static void event(RenderPlayerEvent.Pre event) {
		event.getPoseStack().scale(1, -1, 1);
	}

 

  • Author

Thx for replying I fixed it with some help 

 @SubscribeEvent
    public static void renderPlayer(RenderPlayerEvent.Pre event) {
        PoseStack poseStack = event.getPoseStack();
        poseStack.mulPose(Axis.XN.rotationDegrees(180));
        poseStack.mulPose(Axis.YP.rotationDegrees(180));
        poseStack.translate(0, - event.getEntity().getBbHeight(), 0);
    }

 

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.