Résolu [1.7.10] Comment centrer un gui ?
-
Ah non, en faites ça recrash.
-
Rapport?
-
J’ai l’impression que c’est drawDefaultBackground qui fais crash mais je suis pas sur.
---- Minecraft Crash Report ---- // Why did you do that? Time: 10/06/19 17:20 Description: Rendering screen java.lang.NullPointerException: Rendering screen at net.minecraft.client.gui.GuiScreen.drawWorldBackground(GuiScreen.java:396) at net.minecraft.client.gui.GuiScreen.drawDefaultBackground(GuiScreen.java:391) at fr.kraniax.moreutilities.gui.CalculatorGui.drawScreen(CalculatorGui.java:25) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.gui.GuiScreen.drawWorldBackground(GuiScreen.java:396) at net.minecraft.client.gui.GuiScreen.drawDefaultBackground(GuiScreen.java:391) at fr.kraniax.moreutilities.gui.CalculatorGui.drawScreen(CalculatorGui.java:25) -- Screen render details -- Details: Screen name: fr.kraniax.moreutilities.gui.CalculatorGui Mouse location: Scaled: (213, 119). Absolute: (427, 240) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player98'/75, l='MpServer', x=-1120,92, y=5,62, z=1454,57]] Chunk stats: MultiplayerChunkCache: 25, 25 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-1125,4,1419), Chunk: (at 11,0,11 in -71,88; contains blocks -1136,0,1408 to -1121,255,1423), Region: (-3,2; contains chunks -96,64 to -65,95, blocks -1536,0,1024 to -1025,255,1535) Level time: 207400 game time, 60474 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 1 total; [EntityClientPlayerMP['Player98'/75, l='MpServer', x=-1120,92, y=5,62, z=1454,57]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:984) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_191, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 833964944 bytes (795 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA moreutilities{1.0.0} [More Utilities] (bin) GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 398.11' Renderer: 'GeForce GTX 1050/PCIe/SSE2' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 1050/PCIe/SSE2 GL version 4.6.0 NVIDIA 398.11, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Ouais c’est lui.Retires ce que je t’ai dit la dessus
-
Je suis sur que c’est drawDefaultBackground() qui fait crash lorsque je le met pas ça ne crash pas mais lorsque je le met ça crash. Mais pourquoi je peux pas le mettre car j’aimerais bien le mettre.
-
Si ca crash pas ca affiche la GUI?+ une image
-
Oui, ça affiche mon gui + une image.
-
ok alors laisse suppr
-
C’est bon, j’ai réussi à réglé le problème, j’ai été dans la classe de l’item et j’ai modifié : if(!world.isRemote) en if(world.isRemote).
Merci.