CreativeTabs -> Crash



  • Salut, j'ai un soucis avec mon CreativeTabs custom. En effet, des que je change de page (sur un serveur vps etc.) mon jeu crash alors qu'il ne le faisait pas sous eclipse.
    Bref..

    –-- Minecraft Crash Report ----
    // Don't do that.
    
    Time: 07/12/16 20:53
    Description: Rendering screen
    
    java.lang.AbstractMethodError
    at net.minecraft.creativetab.CreativeTabs.func_151244_d(CreativeTabs.java:191)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:928)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_146976_a(GuiContainerCreative.java:760)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78)
    at net.minecraft.client.renderer.InventoryEffectRenderer.func_73863_a(InventoryEffectRenderer.java:38)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:638)
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1357)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1001)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at net.minecraft.creativetab.CreativeTabs.func_151244_d(CreativeTabs.java:191)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:928)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_146976_a(GuiContainerCreative.java:760)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78)
    at net.minecraft.client.renderer.InventoryEffectRenderer.func_73863_a(InventoryEffectRenderer.java:38)
    at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:638)
    
    -- Screen render details --
    Details:
    Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative
    Mouse location: Scaled: (559, 139). Absolute: (1119, 707)
    Screen size: Scaled: (960, 493). Absolute: (1920, 986). Scale factor of 2
    
    -- Affected level --
    Details:
    Level name: MpServer
    All players: 2 total; [EntityClientPlayerMP['Gaulois_YT'/366, l='MpServer', x=-1613,74, y=72,62, z=-164,00], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09]]
    Chunk stats: MultiplayerChunkCache: 441, 441
    Level seed: 0
    Level generator: ID 00 - default, ver 1\. Features enabled: false
    Level generator options:
    Level spawn location: World: (-1865,73,-179), Chunk: (at 7,4,13 in -117,-12; contains blocks -1872,0,-192 to -1857,255,-177), Region: (-4,-1; contains chunks -128,-32 to -97,-1, blocks -2048,0,-512 to -1537,255,-1)
    Level time: 13095284 game time, 13771322 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: 36 total; [EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1649,69, y=70,00, z=-276,75], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,13], EntityCustomNpc['Bandit'/200, l='MpServer', x=-1623,50, y=73,00, z=-224,50], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1657,00, y=72,88, z=-267,16], EntityCustomNpc['Bandit'/201, l='MpServer', x=-1618,50, y=70,00, z=-225,50], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,13], EntityCustomNpc['Bandit'/202, l='MpServer', x=-1622,50, y=70,00, z=-219,50], EntitySkeleton['Squelette'/1002757, l='MpServer', x=-1570,50, y=70,00, z=-203,50], EntityCustomNpc['Pêcheur du dimanche '/204, l='MpServer', x=-1624,50, y=70,50, z=-171,50], EntitySkeleton['Squelette'/987521, l='MpServer', x=-1650,50, y=69,00, z=-169,50], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1649,69, y=70,00, z=-276,75], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1649,69, y=70,00, z=-276,75], EntityTrail['inconnu'/276, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityHat['inconnu'/277, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityCustomNpc['Ecolo'/218, l='MpServer', x=-1600,50, y=70,00, z=-219,50], EntitySkeleton['Squelette'/999572, l='MpServer', x=-1627,50, y=70,00, z=-192,50], EntityCreeper['Creeper'/982547, l='MpServer', x=-1652,50, y=69,00, z=-144,50], EntityCustomNpc['type louche'/222, l='MpServer', x=-1610,50, y=70,00, z=-161,50], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityCreeper['Creeper'/979694, l='MpServer', x=-1611,63, y=71,00, z=-110,97], EntityCustomNpc['zombie'/228, l='MpServer', x=-1607,50, y=70,00, z=-111,50], EntityClientPlayerMP['Gaulois_YT'/366, l='MpServer', x=-1613,74, y=72,62, z=-164,00], EntityCustomNpc['zombie'/229, l='MpServer', x=-1609,50, y=70,00, z=-111,50], EntityCustomNpc['zombie'/230, l='MpServer', x=-1609,50, y=70,00, z=-110,50], EntityCustomNpc['Survivant'/231, l='MpServer', x=-1609,50, y=70,00, z=-108,50], EntityOtherPlayerMP['OrionPix'/625075, l='MpServer', x=-1666,00, y=70,66, z=-113,31], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1649,69, y=70,00, z=-276,75], EntityOtherPlayerMP['Loko_LivehYT'/697337, l='MpServer', x=-1649,69, y=70,00, z=-276,75], EntityHat['inconnu'/112, l='MpServer', x=-1613,74, y=72,62, z=-164,00], EntityTrail['inconnu'/114, l='MpServer', x=-1613,74, y=72,62, z=-164,00], EntityCreeper['Creeper'/959996, l='MpServer', x=-1628,75, y=70,00, z=-224,78], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09], EntityOtherPlayerMP['Boekow'/620635, l='MpServer', x=-1642,50, y=89,09, z=-195,09]]
    Retry entities: 0 total; []
    Server brand: BungeeCord (git:BungeeCord-Bootstrap:1.8-SNAPSHOT:"083cf84":unknown) <- thermos,cauldron,craftbukkit,mcpc,kcauldron,fml,forge
    Server type: Non-integrated multiplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:373)
    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2444)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:919)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    – System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 89538296 bytes (85 MB) / 485056512 bytes (462 MB) up to 3207856128 bytes (3059 MB)
    JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx3G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 Optifine OptiFine_1.7.10_HD_C1 19 mods loaded, 19 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHIJA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
    UCHIJA FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1558-1.7.10.jar)
    UCHIJA Forge{10.13.4.1558} [Minecraft Forge] (forge-1.7.10-10.13.4.1558-1.7.10.jar)
    UCHIJA CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar)
    UCHIJA NotEnoughItems{1.0.3.74} [Not Enough Items] (NotEnoughItems-1.7.10.jar)
    UCHIJA securitycraft{v1.7.4.1} [SecurityCraft] ([1.7.10] SecurityCraft v1.7.4.1.jar)
    UCHIJA bspkrsCore{6.15} [bspkrsCore] ([1.7.10]bspkrsCore-universal-6.15.jar)
    UCHIJA ArmorStatusHUD{1.28} [ArmorStatusHUD] ([1.7.10]ArmorStatusHUD-client-1.28.jar)
    UCHIJA customnpcs{1.7.10d} [CustomNpcs] (CustomNPCs_1.7.10d(21feb16).jar)
    UCHIJA ExtraUtilities{1.1.0k} [Extra Utilities] (Extra-Utilities-Mod-1.7.10.jar)
    UCHIJA iChunUtil{4.0.0} [iChunUtil] (iChunUtil-4.0.0.jar)
    UCHIJA Hats{4.0.1} [Hats] (Hats-4.0.1.jar)
    UCHIJA IronChest{6.0.62.742} [Iron Chest] (ironchest-1.7.10-6.0.62.742-universal.jar)
    UCHIJA Mantle{1.7.10-165.4bc3343} [Mantle] (Mantle_mc1.7.10_0.3.0.jar)
    UCHIJA opalitemod{0.0.1} [Opalite] (OpaliteStaff.jar)
    UCHIJA RandomThings{2.2.4} [Random Things] (RandomThings-2.2.4.jar)
    UCHIJA StorageDrawers{1.7.10-1.10.2} [Storage Drawers] (StorageDrawers-1.7.10-1.10.2.jar)
    UCHIJA TConstruct{1.7.10-1.6.0.build611} [Tinkers' Construct] (TConstruct_mc1.7.10_1.6.0d40.1.jar)
    UCHIJA SpecialArmor{1.7.10} [TeeLuk's SpecialArmor] (TLSpecialArmor-1.7.10.jar)
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 373.06' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2'
    Mantle Environment: DO NOT REPORT THIS CRASH! Unsupported mods in environment: optifine
    TConstruct Environment: Environment healthy.
    Launched Version: 1.7.10-Forge10.13.4.1558-1.7.10
    LWJGL: 2.9.1
    OpenGL: GeForce GTX 750 Ti/PCIe/SSE2 GL version 4.5.0 NVIDIA 373.06, 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: Français (France)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
    
     public static CreativeTabs OpaTab = new CreativeTabs(CreativeTabs.getNextID(), "Opalite")
     {
    
       @SideOnly(Side.CLIENT)
       public Item getTabIconItem()
       {
         ItemStack iStack = new ItemStack(Opalite);
         return iStack.getItem();
       }
    
       @SideOnly(Side.CLIENT)
    
       public int func_151243_f()
       {
         return 7;
       }
     };
    
    


  • Salut, qu'es-ce qui y a dans ta variable "Opalite" ?
    Ici, passer par un itemStack est inutile :

    public Item getTabIconItem(
      {
         //ItemStack iStack = new ItemStack(Opalite); Inutile
         return Opalite           //iStack.getItem();
      }
    
    

    EDIT :
    As-tu vérifié le nom de la fonction "getTabIconItem" car "AbstractMethodError" arrive quand tu n'override pas les fonctions abstraites or "getTabIconItem" est la seul méthode abstraite de la class CreativeTabs.



  • Salut, je teste ca dès que je peut (je code avec teamviewer sur le pote d'un admin de mon server car mon pc fait des siennes)
    Et la variable est de type Item et est égale à :
    Opalite = new Minerais().setUnlocalizedName("Opalite").setTextureName(MODID + ":Opalite").setCreativeTab(OpaTab);


  • Administrateurs

    Salut,
    Tu as compilé comment ton mod ?



  • @'robin4002':

    Salut,
    Tu as compilé comment ton mod ?

    Avec ton tuto ici :
    https://www.minecraftforgefrance.fr/showthread.php?tid=2568


  • Administrateurs

    Compilation normal ou offusqué ?



  • Je l'ai obfusqué


  • Administrateurs

    à mon avis le problème vient de là, proguard n'a pas gardé la fonction.
    Il faudrait modifier la config de proguard (aucune idée de ce qu'il faut mettre) ou créer une classe extends CreativeTabs dans laquelle tu mets la fonction.