• Récent
  • Mots-clés
  • Populaire
  • Utilisateurs
  • Groupes
  • S'inscrire
  • Se connecter
  • S'inscrire
  • Se connecter
  • Recherche
  • Récent
  • Mots-clés
  • Populaire
  • Utilisateurs
  • Groupes

Créer un kit d'outils

Les items
1.7.x
19
114
35.4k
Charger plus de messages
  • Du plus ancien au plus récent
  • Du plus récent au plus ancien
  • Les plus votés
Répondre
  • Répondre à l'aide d'un nouveau sujet
Se connecter pour répondre
Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
  • Deleted
    Deleted dernière édition par 14 mai 2016, 12:28

    @Superloup, ton code ne fait que lui rajouter un timer, c’est bien, ça résout la moitié du problème. Ce sur quoi il bloque (moi également), c’est modifier le timer. Mais à mon avis c’est géré dans la classe Minecraft, et malheureusement il devra sûrement se servir de la reflexion, si il veut modifier le left click timer 😕

    1 réponse Dernière réponse Répondre Citer 0
    • Yeyvo
      Yeyvo dernière édition par 14 mai 2016, 12:31

      Non les gens on avait tout faux 
      voila la fonction magique

      public void onUpdate(ItemStack stack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_)
        {
          if ((entity instanceof EntityPlayer))
          {
            EntityPlayer player = (EntityPlayer)entity;
            if ((player.getHeldItem() != null) && 
              ((player.getHeldItem().getItem() instanceof Broadsword))) {
              ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 4));
            }
          }
          super.onUpdate(stack, world, entity, p_77663_4_, p_77663_5_);
        }

      1 réponse Dernière réponse Répondre Citer 0
      • Deleted
        Deleted dernière édition par 14 mai 2016, 12:39

        ???
        Je croyais que tu souhaitais augmenter la vitesse de frappe d’une épée ?! Là tu ne fais qu’ajouter l’effet de potion fatigue, qui RALENTIT AU CONTRAIRE l’animation de frappe, et la vitesse de cassage des blocks ….
        Donc soit on n’avait pas compris ton problème depuis le début, soit tu t’es mal exprimé, hein ^^’

        1 réponse Dernière réponse Répondre Citer 0
        • Yeyvo
          Yeyvo dernière édition par 14 mai 2016, 12:55

          on peut utilisé ```java

          public void onUpdate(ItemStack stack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_)
            {
              if ((entity instanceof EntityPlayer))
              {
                EntityPlayer player = (EntityPlayer)entity;
                if ((player.getHeldItem() != null) && 
                  ((player.getHeldItem().getItem() instanceof Broadsword))) {
                  ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 4)); //je ne rapelle pas bien mais je crois que que c’est digSpeed
                }
              }
              super.onUpdate(stack, world, entity, p_77663_4_, p_77663_5_);
            }

          d'aprés mes test au contraire sa marche super bien sa permet de ralentir ou d'accélérer la vitesse de frappe

          1 réponse Dernière réponse Répondre Citer 0
          • Deleted
            Deleted dernière édition par 14 mai 2016, 17:09

            Ouais mais après tu te sers d’un effet de potion, c’est peut-être pas très “pro”, nan ? Et après si tu te balades sur le wiki de mc, il est dit qu’aucun de ces 2 effets n’influencent la vitesse de frappe. D’ailleurs, dig signifie “cresuer”, donc ça n’influence que la vitesse de casse des blocks.

            1 réponse Dernière réponse Répondre Citer 0
            • Yeyvo
              Yeyvo dernière édition par 14 mai 2016, 17:11

              tu sais quoi dans une heure ou deux je t’enverais une partie du mod build et l’adresse ip de mon serv test (qui est mon Pc) et on testeras enssemble

              1 réponse Dernière réponse Répondre Citer 0
              • Deleted
                Deleted dernière édition par 16 mai 2016, 10:31

                Hey ! J’attends toujours 😃

                1 réponse Dernière réponse Répondre Citer 0
                • S
                  sventus dernière édition par 17 févr. 2017, 17:00

                  Bonjour j’ai reprit le tuto par rapport à l’effet sur la hache pour casser l’arbre, mais j’aimerais changer un peu la condition.

                  En gros j’aimerais que, s’il y a un bloc dans un rayon de X qui soit un bloc de bois, alors il se casse également. pour le moment le code casse les blocs situés au-dessus (j’ai un gros arbre donc ça serait long de faire comme ça).

                  Et autre point, j’aimerais avoir un délai entre chaque blocs car, si la grosse structure se détruit d’un coup, ça risque de faire lagg (je ense) donc genre même si c’est 0.2sec entre chaque bloc c’est toujours ça ^^

                  1 réponse Dernière réponse Répondre Citer 0
                  • A
                    aypristyle dernière édition par 22 juin 2017, 09:54

                    Bonjour j’ai suivi le tutoriel en essayant de l’adapter en 1.11 ma classe objet ne contient pas d’erreur par contre j’ai une erreur dans ma classe item sur le type de matériel chez moi qui se nomme “coppertool” et j’aimerais savoir ou faut-il que je mette ma déclaration de matériel pour ne plus avoir cette erreur.

                    **Je suis un membre apprécié et joueur, j'ai déjà obtenu 1[ point de réputation./…

                    1 réponse Dernière réponse Répondre Citer 0
                    • MrCupCakeMonster
                      MrCupCakeMonster dernière édition par 22 juin 2017, 10:01

                      Tu peux la mettre dans ta classe d’item ou ta classe principale. En faite peu importe la classe, il faut juste qu’elle soit déclarée au même endroits que les item (Item machin = new ItemMachin()…), donc aux endroits où on met des variables en java.

                      Mes tutos :

                      >! Un item mangeable
                      [url=http://www.minecraftforgefranc…

                      1 réponse Dernière réponse Répondre Citer 0
                      • A
                        aypristyle dernière édition par 22 juin 2017, 10:28

                        Merci c’est ce que je cherchais !

                        **Je suis un membre apprécié et joueur, j'ai déjà obtenu 1[ point de réputation./…

                        1 réponse Dernière réponse Répondre Citer 0
                        • themoney158
                          themoney158 dernière édition par 21 janv. 2018, 13:02

                          Help !

                          J’ai un problème :
                          Quand je suis en jeu, je veux prendre un des outils(n’importe lequel) et 1. La texture ne s’affiche pas et 2. Dès que j’essaye de le prendre, le jeu crash ! 😢

                          Voilà mon rapport de crash :

                          [13:51:47] [main/INFO] [GradleStart]: username: boulery123@gmail.com
                          [13:51:47] [main/INFO] [GradleStart]: Extra: []
                          [13:51:47] [main/INFO] [GradleStart]: Password found, attempting login
                          [13:51:47] [main/INFO]: Logging in with username & password
                          [13:51:48] [main/INFO] [GradleStart]: Login Succesful!
                          [13:51:48] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {"preferredLanguage":["en-us"]}, –assetsDir, C:/Users/nathan/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --userType, mojang, --accessToken, {REDACTED}, --version, 1.7.10, --uuid, 6521104fa24d4e16b4cc9e4215422704, --username, themoney158, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                          [13:51:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                          [13:51:48] [main/INFO] [FML]: Forge Mod Loader version 7.99.36.1558 for Minecraft 1.7.10 loading
                          [13:51:48] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.8.0_121\jre
                          [13:51:48] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                          [13:51:48] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                          [13:51:48] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                          [13:51:48] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                          [13:51:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                          [13:51:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                          [13:51:49] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                          [13:51:51] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                          [13:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                          [13:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                          [13:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                          [13:51:52] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                          [13:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                          [13:51:52] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                          [13:51:53] [main/INFO]: Setting user: themoney158
                          [13:51:55] [Client thread/INFO]: LWJGL Version: 2.9.1
                          [13:51:56] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
                          // Quite honestly, I wouldn't worry myself about that.
                          Time: 21/01/18 13:51
                          Description: Loading screen debug info
                          This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
                          A detailed walkthrough of the error, its code path and all known details is as follows:
                          ---------------------------------------------------------------------------------------
                          -- System Details --
                          Details:
                          Minecraft Version: 1.7.10
                          Operating System: Windows 7 (amd64) version 6.1
                          Java Version: 1.8.0_121, Oracle Corporation
                          Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                          Memory: 769254784 bytes (733 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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:
                          GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.0.0' Renderer: 'GeForce G210/PCI/SSE2'
                          [13:51:56] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                          [13:51:56] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1558 Initialized
                          [13:51:56] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                          [13:51:56] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                          [13:51:57] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
                          [13:51:57] [Client thread/INFO] [FML]: Searching C:\Users\nathan\Desktop\MODDING MINECRAFT\MoreGems 1.7.10 - by themoney158\eclipse\mods for mods
                          [13:52:05] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                          [13:52:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, moregems] at CLIENT
                          [13:52:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, moregems] at SERVER
                          [13:52:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Moregems mod
                          [13:52:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                          [13:52:06] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                          [13:52:06] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
                          [13:52:06] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
                          [13:52:06] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                          [13:52:07] [Client thread/INFO] [FML]: Applying holder lookups
                          [13:52:07] [Client thread/INFO] [FML]: Holder lookups applied
                          [13:52:07] [Client thread/INFO] [FML]: Injecting itemstacks
                          [13:52:07] [Client thread/INFO] [FML]: Itemstack injection complete
                          [13:52:07] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:07] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                          [13:52:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                          [13:52:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                          [13:52:07] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                          [13:52:07] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:07] [Sound Library Loader/INFO]: Sound engine started
                          [13:52:10] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas
                          [13:52:10] [Client thread/INFO]: Created: 16x16 textures/items-atlas
                          [13:52:10] [Client thread/INFO] [STDOUT]: [themoney158.moregems.proxy.ClientProxy:registerRender:9]: méthode côté client
                          [13:52:10] [Client thread/INFO] [FML]: Injecting itemstacks
                          [13:52:10] [Client thread/INFO] [FML]: Itemstack injection complete
                          [13:52:10] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
                          [13:52:10] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Moregems mod
                          [13:52:11] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
                          [13:52:11] [Client thread/INFO]: Created: 256x256 textures/items-atlas
                          [13:52:11] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:11] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
                          [13:52:11] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
                          [13:52:11] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:11] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:11] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                          [13:52:12] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                          [13:52:12] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                          [13:52:12] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                          [13:52:12] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                          [13:52:12] [Sound Library Loader/INFO]: Sound engine started
                          [13:52:29] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
                          [13:52:29] [Server thread/INFO]: Generating keypair
                          [13:52:29] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
                          [13:52:29] [Server thread/INFO] [FML]: Applying holder lookups
                          [13:52:29] [Server thread/INFO] [FML]: Holder lookups applied
                          [13:52:29] [Server thread/INFO] [FML]: Loading dimension 0 (TEST) (net.minecraft.server.integrated.IntegratedServer@83dd28a)
                          [13:52:29] [Server thread/INFO] [FML]: Loading dimension 1 (TEST) (net.minecraft.server.integrated.IntegratedServer@83dd28a)
                          [13:52:29] [Server thread/INFO] [FML]: Loading dimension -1 (TEST) (net.minecraft.server.integrated.IntegratedServer@83dd28a)
                          [13:52:29] [Server thread/INFO]: Preparing start region for level 0
                          [13:52:30] [Server thread/INFO]: Preparing spawn area: 49%
                          [13:52:31] [Server thread/INFO]: Changing view distance to 12, from 10
                          [13:52:31] [Netty Client IO #0/INFO] [FML]: Server protocol version 2
                          [13:52:31] [Netty IO #1/INFO] [FML]: Client protocol version 2
                          [13:52:31] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : moregems@1.0.0,FML@7.10.99.99,Forge@10.13.4.1558,mcp@9.05
                          [13:52:31] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
                          [13:52:31] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
                          [13:52:31] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
                          [13:52:31] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
                          [13:52:31] [Server thread/INFO]: themoney158[local:E:4e25e65d] logged in with entity id 295 at (-107.55538332419827, 90.0, 209.73642423214798)
                          [13:52:31] [Server thread/INFO]: themoney158 joined the game
                          [13:53:01] [Server thread/INFO]: Stopping server
                          [13:53:01] [Server thread/INFO]: Saving players
                          [13:53:01] [Server thread/INFO]: Saving worlds
                          [13:53:01] [Server thread/INFO]: Saving chunks for level 'TEST'/Overworld
                          [13:53:01] [Server thread/INFO]: Saving chunks for level 'TEST'/Nether
                          [13:53:01] [Server thread/INFO]: Saving chunks for level 'TEST'/The End
                          [13:53:02] [Server thread/INFO] [FML]: Unloading dimension 0
                          [13:53:02] [Server thread/INFO] [FML]: Unloading dimension -1
                          [13:53:02] [Server thread/INFO] [FML]: Unloading dimension 1
                          [13:53:02] [Server thread/INFO] [FML]: Applying holder lookups
                          [13:53:02] [Server thread/INFO] [FML]: Holder lookups applied
                          [13:53:03] [Client thread/FATAL]: Reported exception thrown!
                          net.minecraft.util.ReportedException: Updating screen events
                          at net.minecraft.client.Minecraft.runTick(Minecraft.java:1745) ~[Minecraft.class:?]
                          at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]
                          at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
                          at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
                          at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
                          at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
                          at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
                          at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                          at GradleStart.main(Unknown Source) [start/:?]
                          Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
                          at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:481) ~[ItemStack.class:?]
                          at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:70) ~[SlotCrafting.class:?]
                          at net.minecraft.inventory.SlotCrafting.onPickupFromSlot(SlotCrafting.java:127) ~[SlotCrafting.class:?]
                          at net.minecraft.inventory.Container.slotClick(Container.java:347) ~[Container.class:?]
                          at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:478) ~[PlayerControllerMP.class:?]
                          at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:676) ~[GuiContainer.class:?]
                          at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:418) ~[GuiContainer.class:?]
                          at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344) ~[GuiScreen.class:?]
                          at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313) ~[GuiScreen.class:?]
                          at net.minecraft.client.Minecraft.runTick(Minecraft.java:1731) ~[Minecraft.class:?]
                          … 11 more
                          [13:53:03] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
                          // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]
                          Time: 21/01/18 13:53
                          Description: Updating screen events
                          java.lang.ArrayIndexOutOfBoundsException: -1
                          at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:481)
                          at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:70)
                          at net.minecraft.inventory.SlotCrafting.onPickupFromSlot(SlotCrafting.java:127)
                          at net.minecraft.inventory.Container.slotClick(Container.java:347)
                          at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:478)
                          at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:676)
                          at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:418)
                          at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344)
                          at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313)
                          at net.minecraft.client.Minecraft.runTick(Minecraft.java:1731)
                          at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)
                          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(NativeMethodAccessorImpl.java:62)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          at java.lang.reflect.Method.invoke(Method.java:498)
                          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.item.ItemStack.onCrafting(ItemStack.java:481)
                          at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:70)
                          at net.minecraft.inventory.SlotCrafting.onPickupFromSlot(SlotCrafting.java:127)
                          at net.minecraft.inventory.Container.slotClick(Container.java:347)
                          at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:478)
                          at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:676)
                          at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:418)
                          at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344)
                          at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313)
                          -- Affected screen --
                          Details:
                          Screen name: net.minecraft.client.gui.inventory.GuiCrafting
                          -- Affected level --
                          Details:
                          Level name: MpServer
                          All players: 1 total; [EntityClientPlayerMP['themoney158'/295, l='MpServer', x=-107,56, y=91,62, z=209,74]]
                          Chunk stats: MultiplayerChunkCache: 589, 589
                          Level seed: 0
                          Level generator: ID 00 - default, ver 1\. Features enabled: false
                          Level generator options:
                          Level spawn location: World: (-172,64,188), Chunk: (at 4,4,12 in -11,11; contains blocks -176,0,176 to -161,255,191), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
                          Level time: 15830 game time, 2041 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: survival (ID 0). Hardcore: false. Cheats: false
                          Forced entities: 57 total; [EntityPig['Pig'/146, l='MpServer', x=-183,22, y=74,00, z=157,50], EntityPig['Pig'/148, l='MpServer', x=-182,31, y=72,00, z=163,22], EntityPig['Pig'/150, l='MpServer', x=-178,88, y=75,00, z=216,03], EntityPig['Pig'/151, l='MpServer', x=-185,75, y=76,00, z=224,13], EntityPig['Pig'/160, l='MpServer', x=-170,31, y=83,00, z=191,50], EntityPig['Pig'/161, l='MpServer', x=-173,03, y=75,00, z=213,06], EntityPig['Pig'/162, l='MpServer', x=-176,97, y=75,00, z=214,09], EntityPig['Pig'/163, l='MpServer', x=-160,47, y=75,00, z=219,03], EntityCow['Cow'/164, l='MpServer', x=-175,84, y=79,00, z=253,06], EntityBat['Bat'/165, l='MpServer', x=-163,80, y=26,88, z=275,19], EntityCow['Cow'/166, l='MpServer', x=-162,81, y=79,00, z=266,13], EntityCow['Cow'/167, l='MpServer', x=-171,28, y=78,00, z=268,72], EntityBat['Bat'/168, l='MpServer', x=-161,44, y=51,10, z=276,25], EntityPig['Pig'/171, l='MpServer', x=-146,28, y=85,00, z=201,53], EntityBat['Bat'/172, l='MpServer', x=-165,71, y=52,04, z=282,48], EntityBat['Bat'/175, l='MpServer', x=-124,44, y=47,02, z=138,45], EntityChicken['Chicken'/176, l='MpServer', x=-139,41, y=68,00, z=136,63], EntityChicken['Chicken'/177, l='MpServer', x=-134,75, y=67,00, z=144,41], EntityClientPlayerMP['themoney158'/295, l='MpServer', x=-107,56, y=91,62, z=209,74], EntityChicken['Chicken'/178, l='MpServer', x=-149,41, y=73,00, z=138,38], EntityChicken['Chicken'/179, l='MpServer', x=-122,44, y=70,00, z=152,53], EntityChicken['Chicken'/180, l='MpServer', x=-125,63, y=70,00, z=151,59], EntityChicken['Chicken'/181, l='MpServer', x=-124,56, y=68,00, z=145,56], EntityChicken['Chicken'/182, l='MpServer', x=-110,56, y=73,00, z=153,59], EntityBat['Bat'/183, l='MpServer', x=-115,49, y=55,35, z=253,99], EntityChicken['Chicken'/188, l='MpServer', x=-105,31, y=72,00, z=141,75], EntityChicken['Chicken'/189, l='MpServer', x=-106,47, y=72,00, z=142,38], EntityChicken['Chicken'/190, l='MpServer', x=-101,50, y=77,00, z=155,38], EntityChicken['Chicken'/191, l='MpServer', x=-108,41, y=72,00, z=147,25], EntityChicken['Chicken'/192, l='MpServer', x=-103,53, y=83,00, z=156,66], EntityBat['Bat'/193, l='MpServer', x=-94,63, y=54,43, z=182,52], EntityBat['Bat'/194, l='MpServer', x=-110,75, y=46,84, z=195,67], EntityBat['Bat'/195, l='MpServer', x=-67,96, y=48,24, z=250,58], EntityChicken['Chicken'/203, l='MpServer', x=-84,53, y=68,00, z=168,44], EntityChicken['Chicken'/204, l='MpServer', x=-91,44, y=91,00, z=173,59], EntityChicken['Chicken'/205, l='MpServer', x=-99,56, y=92,00, z=169,47], EntityChicken['Chicken'/207, l='MpServer', x=-101,84, y=89,48, z=185,19], EntityBat['Bat'/208, l='MpServer', x=-75,44, y=17,39, z=241,84], EntityBat['Bat'/209, l='MpServer', x=-80,75, y=50,10, z=245,47], EntityChicken['Chicken'/210, l='MpServer', x=-93,44, y=88,00, z=277,56], EntityChicken['Chicken'/211, l='MpServer', x=-83,16, y=91,00, z=283,22], EntityChicken['Chicken'/212, l='MpServer', x=-86,03, y=92,00, z=283,56], EntityChicken['Chicken'/213, l='MpServer', x=-85,28, y=92,00, z=283,19], EntityBat['Bat'/221, l='MpServer', x=-73,56, y=15,10, z=155,75], EntityBat['Bat'/222, l='MpServer', x=-48,43, y=54,85, z=178,28], EntityBat['Bat'/223, l='MpServer', x=-74,11, y=31,10, z=185,19], EntityChicken['Chicken'/224, l='MpServer', x=-77,44, y=92,00, z=269,47], EntityBat['Bat'/225, l='MpServer', x=-77,58, y=17,00, z=285,57], EntityBat['Bat'/226, l='MpServer', x=-79,99, y=16,02, z=282,50], EntityChicken['Chicken'/227, l='MpServer', x=-68,38, y=97,00, z=279,63], EntityChicken['Chicken'/235, l='MpServer', x=-52,56, y=90,00, z=264,53], EntityChicken['Chicken'/236, l='MpServer', x=-45,53, y=90,00, z=280,31], EntityChicken['Chicken'/244, l='MpServer', x=-36,66, y=87,00, z=238,66], EntityChicken['Chicken'/245, l='MpServer', x=-45,41, y=92,00, z=225,34], EntityChicken['Chicken'/246, l='MpServer', x=-41,84, y=87,00, z=238,16], EntityChicken['Chicken'/247, l='MpServer', x=-45,59, y=92,00, z=285,44], EntityChicken['Chicken'/248, l='MpServer', x=-44,41, y=91,00, z=276,63]]
                          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(NativeMethodAccessorImpl.java:62)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          at java.lang.reflect.Method.invoke(Method.java:498)
                          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 7 (amd64) version 6.1
                          Java Version: 1.8.0_121, Oracle Corporation
                          Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                          Memory: 783031880 bytes (746 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 13, tallocated: 95
                          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 moregems{1.0.0} [Moregems mod] (bin)
                          GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.0.0' Renderer: 'GeForce G210/PCI/SSE2'
                          Launched Version: 1.7.10
                          LWJGL: 2.9.1
                          OpenGL: GeForce G210/PCI/SSE2 GL version 3.0.0, 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)
                          [13:53:03] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\nathan\Desktop\MODDING MINECRAFT\MoreGems 1.7.10 - by themoney158\eclipse\.\crash-reports\crash-2018-01-21_13.53.03-client.txt
                          AL lib: (EE) alc_cleanup: 1 device not closed
                          Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

                          Ma classe principale :

                          package themoney158.moregems.common;
                          import net.minecraft.block.Block;
                          import net.minecraft.block.material.Material;
                          import net.minecraft.creativetab.CreativeTabs;
                          import net.minecraft.init.Items;
                          import net.minecraft.item.Item;
                          import net.minecraft.item.Item.ToolMaterial;
                          import net.minecraft.item.ItemStack;
                          import net.minecraftforge.common.util.EnumHelper;
                          import themoney158.moregems.proxy.CommonProxy;
                          import cpw.mods.fml.common.Mod;
                          import cpw.mods.fml.common.Mod.EventHandler;
                          import cpw.mods.fml.common.Mod.Instance;
                          import cpw.mods.fml.common.SidedProxy;
                          import cpw.mods.fml.common.event.FMLInitializationEvent;
                          import cpw.mods.fml.common.event.FMLPostInitializationEvent;
                          import cpw.mods.fml.common.event.FMLPreInitializationEvent;
                          import cpw.mods.fml.common.registry.GameRegistry;
                          @Mod(modid = "moregems", name = "Moregems Mod", version = "1.0.0")
                          public class ModMoreGems
                          {
                              public static final String MODID = "moregems";
                              @Instance(MODID)
                              public static ModMoreGems instance;
                              @SidedProxy(clientSide = "themoney158.moregems.proxy.ClientProxy", serverSide = "themoney158.moregems.proxy.CommonProxy")
                              public static CommonProxy proxy;
                              public static Item itemRuby, itemSapphire, itemMalachite, itemAmethyst, itemRubySword, itemRubyPickaxe, itemRubyAxe, itemRubyShovel, itemRubyHoe;
                              public static Block blockRubyOre, blockSapphireOre, blockMalachiteOre, blockAmethystOre;
                              public static ToolMaterial toolRuby = EnumHelper.addToolMaterial("toolRuby", 3, 999, 10.0F, 3.0F, 12);
                              WorldGeneration worldgeneration = new WorldGeneration();
                              @EventHandler
                              public void preInit(FMLPreInitializationEvent event)
                              {
                                  blockRubyOre = new BlockRubyOre(Material.rock).setBlockName("ruby_ore").setBlockTextureName(MODID + ":ruby_ore").setCreativeTab(CreativeTabs.tabBlock);
                                  blockSapphireOre = new BlockSapphireOre(Material.rock).setBlockName("sapphire_ore").setBlockTextureName(MODID + ":sapphire_ore").setCreativeTab(CreativeTabs.tabBlock);
                                  blockMalachiteOre = new BlockMalachiteOre(Material.rock).setBlockName("malachite_ore").setBlockTextureName(MODID + ":malachite_ore").setCreativeTab(CreativeTabs.tabBlock);
                                  blockAmethystOre = new BlockAmethystOre(Material.rock).setBlockName("amethyst_ore").setBlockTextureName(MODID + ":amethyst_ore").setCreativeTab(CreativeTabs.tabBlock);
                                  itemRuby = new Item().setUnlocalizedName("ruby").setTextureName(MODID + ":ruby").setCreativeTab(CreativeTabs.tabMaterials);
                                  itemSapphire = new Item().setUnlocalizedName("sapphire").setTextureName(MODID + ":sapphire").setCreativeTab(CreativeTabs.tabMaterials);
                                  itemMalachite = new Item().setUnlocalizedName("malachite").setTextureName(MODID + ":malachite").setCreativeTab(CreativeTabs.tabMaterials);
                                  itemAmethyst = new Item().setUnlocalizedName("amethyst").setTextureName(MODID + ":amethyst").setCreativeTab(CreativeTabs.tabMaterials);
                                  itemRubySword = new ItemRubySword(toolRuby).setUnlocalizedName("ruby_sword").setTextureName(MODID + ":ruby_sword").setCreativeTab(CreativeTabs.tabCombat);
                                  itemRubyPickaxe = new ItemRubyPickaxe(toolRuby).setUnlocalizedName("ruby_pickaxe").setTextureName(MODID + ":ruby_pickaxe").setCreativeTab(CreativeTabs.tabTools);
                                  itemRubyAxe = new ItemRubyAxe(toolRuby).setUnlocalizedName("ruby_axe").setTextureName(MODID + ":ruby_axe").setCreativeTab(CreativeTabs.tabTools);
                                  itemRubyShovel = new ItemRubyShovel(toolRuby).setUnlocalizedName("ruby_shovel").setTextureName(MODID + ":ruby_shovel").setCreativeTab(CreativeTabs.tabTools);
                                  itemRubyHoe = new ItemRubyHoe(toolRuby).setUnlocalizedName("ruby_hoe").setTextureName(MODID + ":ruby_hoe").setCreativeTab(CreativeTabs.tabTools);
                                  GameRegistry.registerBlock(blockRubyOre, "ruby_ore");
                                  GameRegistry.registerBlock(blockSapphireOre, "sapphire_ore");
                                  GameRegistry.registerBlock(blockMalachiteOre, "malachite_ore");
                                  GameRegistry.registerBlock(blockAmethystOre, "amethyst_ore");
                                  GameRegistry.registerItem(itemRuby, "ruby");
                                  GameRegistry.registerItem(itemSapphire, "sapphire");
                                  GameRegistry.registerItem(itemMalachite, "malachite");
                                  GameRegistry.registerItem(itemAmethyst, "amethyst");
                                  GameRegistry.registerWorldGenerator(worldgeneration, 0);
                              }
                              @EventHandler
                              public void init(FMLInitializationEvent event)
                              {
                                  proxy.registerRender();
                                  GameRegistry.addRecipe(new ItemStack(itemRubySword), new Object[]{"X", "X", "S", 'X', new ItemStack(itemRuby), 'S', new ItemStack(Items.stick)});
                                  GameRegistry.addRecipe(new ItemStack(itemRubyPickaxe), new Object[]{"XXX", "S", "S", 'X', new ItemStack(itemRuby), 'S', new ItemStack(Items.stick)});
                                  GameRegistry.addRecipe(new ItemStack(itemRubyAxe), new Object[]{"XX", "XS", " S", 'X', new ItemStack(itemRuby), 'S', new ItemStack(Items.stick)});
                                  GameRegistry.addRecipe(new ItemStack(itemRubyShovel), new Object[]{"X", "S", "S", 'X', new ItemStack(itemRuby), 'S', new ItemStack(Items.stick)});
                                  GameRegistry.addRecipe(new ItemStack(itemRubyHoe), new Object[]{"XX", " S", " S", 'X', new ItemStack(itemRuby), 'S', new ItemStack(Items.stick)});
                              }
                              @EventHandler
                              public void postInit(FMLPostInitializationEvent event)
                              {
                              }
                          }

                          Et la classe de l’épée (tous les autres outils ont le même modèle de classe, seuls le nom et la superClass changent) :

                          package themoney158.moregems.common;
                          import net.minecraft.item.ItemStack;
                          import net.minecraft.item.ItemSword;
                          public class ItemRubySword extends ItemSword
                          {
                              public ItemRubySword(ToolMaterial material)
                              {
                                  super(material);
                              }
                              public boolean getIsRepairable(ItemStack input, ItemStack repair)
                              {
                                  if(repair.getItem() == ModMoreGems.itemRuby)
                                  {
                                      return true;
                                  }
                                  return false;
                              }
                          }
                          1 réponse Dernière réponse Répondre Citer 0
                          • robin4002
                            robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par 21 janv. 2018, 18:06

                            Salut,
                            Tu as oublié d’enregistrer les items.

                            1 réponse Dernière réponse Répondre Citer 0
                            • themoney158
                              themoney158 dernière édition par 23 janv. 2018, 17:45

                              @‘robin4002’:

                              Salut,
                              Tu as oublié d’enregistrer les items.

                              Ah oui… merci !

                              C’est fou ce que je peut avoir la tête ailleurs… 😐

                              1 réponse Dernière réponse Répondre Citer 0
                              • Référencé par  A aypristyle 29 nov. 2021, 01:31
                              • Référencé par  robin4002 robin4002 29 nov. 2021, 01:52
                              • Référencé par  robin4002 robin4002 29 nov. 2021, 02:04
                              • Référencé par  robin4002 robin4002 29 nov. 2021, 02:07
                              • 1
                              • 2
                              • 3
                              • 4
                              • 5
                              • 6
                              • 6 / 6
                              102 sur 114
                              • Premier message
                                102/114
                                Dernier message
                              Design by Woryk
                              Contact / Mentions Légales

                              MINECRAFT FORGE FRANCE © 2018

                              Powered by NodeBB