GuiInGameMenu
-
Bonjour j’ai besoin d’aide car mon code pour mon fichier GuiInGameMenu ne fonctionne pas le voici :
public static void func_147046_a(int p_147046_0_, int p_147046_1_, int p_147046_2_, float p_147046_3_, float p_147046_4_, EntityLivingBase p_147046_5_) { GL11.glEnable(GL11.GL_COLOR_MATERIAL); GL11.glPushMatrix(); GL11.glTranslatef((float)p_147046_0_, (float)p_147046_1_, 50.0F); GL11.glScalef((float)(-p_147046_2_), (float)p_147046_2_, (float)p_147046_2_); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); float var6 = p_147046_5_.renderYawOffset; float var7 = p_147046_5_.rotationYaw; float var8 = p_147046_5_.rotationPitch; float var9 = p_147046_5_.prevRotationYawHead; float var10 = p_147046_5_.rotationYawHead; GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); p_147046_5_.renderYawOffset = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 20.0F; p_147046_5_.rotationYaw = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 40.0F; p_147046_5_.rotationPitch = -((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F; p_147046_5_.rotationYawHead = p_147046_5_.rotationYaw; p_147046_5_.prevRotationYawHead = p_147046_5_.rotationYaw; GL11.glTranslatef(0.0F, p_147046_5_.yOffset, 0.0F); RenderManager.instance.playerViewY = 180.0F; RenderManager.instance.func_147940_a(p_147046_5_, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); p_147046_5_.renderYawOffset = var6; p_147046_5_.rotationYaw = var7; p_147046_5_.rotationPitch = var8; p_147046_5_.prevRotationYawHead = var9; p_147046_5_.rotationYawHead = var10; GL11.glPopMatrix(); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
et voila comment je charge le fichier dans mon main
@SubscribeEvent @SideOnly(Side.CLIENT) public void onTickClient(TickEvent.ClientTickEvent event) { if (event.phase == Phase.START) { Minecraft mc = Minecraft.getMinecraft(); GuiScreen currentScreen = mc.currentScreen; GuiCustomInGameMenu customMenu1 = new GuiCustomInGameMenu(); if (currentScreen instanceof GuiIngameMenu && !currentScreen.equals(customMenu1)) { mc.displayGuiScreen(customMenu1); } }
Eclipse me dit The method func_147940_a(EntityLivingBase, double, double, double, float, float) is undefined for the type RenderManager
donc je ne sait pas comment m’y prendre.Cordialement
-
Salut, code copié collé?
-
Oui sur ce pastebin https://pastebin.com/sQseKLUs
-
“fichier” xD tes vraiment perdu !! Ce machun que tappelle fichier en java se nomme une class et aussi le copy/paste cest pas le meilleur moyen de reussir qiand tu debute et aussi lachez cette 1.7 =====> go 1.12.2
-
Serte la 1.7.10 est vieille comme version mais ça reste une version très accessible !
-
et aussi totalement obsolète et mal optimiser mais toutefois elle etait une bonne version fut un temps
et aussi pour ton probleme de gui ta method machun-truc ELLE EXISTE PAS !! voila pourquoi faut pas copier coller
et si tu veut d’avantage d’aide je te conseille d’expliquer ce que tu veut faire car ta method on sait pas a quoi elle sert et pourquoi t’en na besoin“et” Combo x3 !