Posted June 17, 20169 yr So I'm trying to rotate my player (like dinnerbone) and it's working ok (the rotation part) But when a player looks at a rotated player and jump, they jump as well, if a person flys, the roated person flys up, like the floor is reversed. I've tried using GL to rotate translate etc, but nothing seems to work. The Steve model is the only one moving, the alex model is stationary. package RenderPlayer; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; import org.lwjgl.opengl.GL11; import Config.getOS; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class UpsideDown { @SubscribeEvent public void doRender(RenderPlayerEvent.Pre event) { PreRotateCorpse(event.getEntityPlayer()); } public void PreRotateCorpse(EntityPlayer bat) { if (System.getProperty("java.version").startsWith("1.8")) { try{ String s = TextFormatting.getTextWithoutFormattingCodes(bat.getName()); List<String> users = Files.readAllLines(Paths.get(getOS.OS + "/capes/Dinnerbone.txt")); if (users.contains(s)|| s.equals("f") || s.equals("Grumm") && (!(bat instanceof EntityPlayer) || ((EntityPlayer)bat).isWearing(EnumPlayerModelParts.CAPE))) { GL11.glPushMatrix(); GlStateManager.translate(0.0F, 2, 0.0F); GlStateManager.rotate(180.0F, 0.0F, 0.0F, 0.0F); GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); } } catch (IOException e) {} } } @SubscribeEvent public void doRender(RenderPlayerEvent.Post event) { PostRotateCorpse(event.getEntityPlayer()); } public void PostRotateCorpse(EntityPlayer bat) { if (System.getProperty("java.version").startsWith("1.8")) { try{ String s = TextFormatting.getTextWithoutFormattingCodes(bat.getName()); List<String> users = Files.readAllLines(Paths.get(getOS.OS + "/capes/Dinnerbone.txt")); if (users.contains(s)|| s.equals("f") || s.equals("Grumm") && (!(bat instanceof EntityPlayer) || ((EntityPlayer)bat).isWearing(EnumPlayerModelParts.CAPE))) { GL11.glPopMatrix(); } } catch (IOException e) {} } } }
June 17, 20169 yr I will give you a hint - why are you using translate? #revertChanges 1.7.10 is no longer supported by forge, you are on your own.
June 17, 20169 yr Author I'm using translate as other wise the character is turned upside down, but 2 blocks above. -- edit -- Removed translate still got the issue.....
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.