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

    Résolu Pioche spéciale

    1.7.x
    1.7.10
    5
    18
    2558
    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.
    • Gabs
      Gabs dernière édition par

      Bonjour,
      J’essaye de créer une pioche spéciale en gros qui peu miné que la redstone pas autre chose.

      Code:

      public class PickaxeRed extends ItemPickaxe {
      
          protected PickaxeRed(ToolMaterial p_i45347_1_) {
      super(p_i45347_1_);
      // TODO Auto-generated constructor stub
      }
      
      private Block[] blocksEffective = new Block[]
                  {
                      Blocks.redstone_ore, 
              };
      
              int harvest = 1;
      
      protected float efficiencyOnProperMaterial;
      
      public float func_150893_a(ItemStack par1ItemStack, Block par2Block)
      {
      for (int i = 0; i < blocksEffective.length; i++)
      {
          if (blocksEffective* == par2Block)
          {
              return efficiencyOnProperMaterial;
          }
      }
      
      return 0.0F;
      }
      

      Merci

      Ps: Mon problème: je peux rien cassé .

      1 réponse Dernière réponse Répondre Citer 0
      • DiabolicaTrix
        DiabolicaTrix Correcteurs Moddeurs confirmés dernière édition par

        C’est pas pour faire chier mais ton code est mal organisé et tu pourrais renommer le p_ et les func_. Aussi la variable au milieu, c’est la première fois que je vois ça. ^^

        Sinon 2 sec je vais édit le message, je vais juste aller voir sur Éclipse.

        1 réponse Dernière réponse Répondre Citer 0
        • Gabs
          Gabs dernière édition par

          D’acc ^^

          1 réponse Dernière réponse Répondre Citer 0
          • robin4002
            robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

            public float func_150893_a(ItemStack stack, Block block)
            {
            return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ? this.efficiencyOnProperMaterial : 1.0F;
            }
            
            @Override
               public float getDigSpeed(ItemStack stack, Block block, int meta)
            {
            return func_150893_a(stack, block);
            }
            
               public boolean func_150897_b(Block block)
               {
                   return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore;
               }
            
            1 réponse Dernière réponse Répondre Citer 0
            • Gabs
              Gabs dernière édition par

              Alors avec se code:

              public class PickaxeRed extends ItemPickaxe {
              
                  protected PickaxeRed(ToolMaterial p_i45347_1_) {
              super(p_i45347_1_);
              // TODO Auto-generated constructor stub
              }
              
              private Block[] blocksEffectiveAgainst = new Block[]
                          {
                              Blocks.redstone_ore, 
                      };
              
                      int harvest = 1;
              
              protected float efficiencyOnProperMaterial;
              
              public float func_150893_a(ItemStack stack, Block block)
              {
                 return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ? this.efficiencyOnProperMaterial : 1.0F;
              }
              
              @Override
              public float getDigSpeed(ItemStack stack, Block block, int meta)
              {
                 return func_150893_a(stack, block);
              }
              
              public boolean func_150897_b(Block block)
              {
                  return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore;
              }
              
              }
              
              

              La je peu casser tout sauf le minerais de redstone.

              1 réponse Dernière réponse Répondre Citer 0
              • robin4002
                robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                private Block[] blocksEffectiveAgainst = new Block[]
                {
                Blocks.redstone_ore,
                };
                
                int harvest = 1;
                
                protected float efficiencyOnProperMaterial;
                

                Ne devrait pas être là.

                1 réponse Dernière réponse Répondre Citer 0
                • Gabs
                  Gabs dernière édition par

                  La je peu tous casser ( Terre et redstone )

                  1 réponse Dernière réponse Répondre Citer 0
                  • robin4002
                    robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                    Tu as bien gardé les 3 autres fonctions ?

                    1 réponse Dernière réponse Répondre Citer 0
                    • Gabs
                      Gabs dernière édition par

                      Nan je les est viré ^^ je dois les mettre ??

                      1 réponse Dernière réponse Répondre Citer 0
                      • robin4002
                        robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                        Bha oui …

                        1 réponse Dernière réponse Répondre Citer 0
                        • Gabs
                          Gabs dernière édition par

                          je les met ou ??

                          code:

                          public class PickaxeRed extends ItemPickaxe {
                          
                          protected PickaxeRed(ToolMaterial pioche) {
                          super(pioche);
                          }
                          
                          public float func_150893_a(ItemStack stack, Block block)
                          {
                             return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ? this.efficiencyOnProperMaterial : 1.0F;
                          
                          }
                          
                          private Block[] blocksEffectiveAgainst = new Block[]
                                  {
                                      Blocks.redstone_ore, 
                              };
                          
                              int harvest = 1;
                          
                          protected float efficiencyOnProperMaterial;
                          
                          @Override
                          public float getDigSpeed(ItemStack stack, Block block, int meta)
                          {
                             return func_150893_a(stack, block);
                          
                          }
                          
                          public boolean func_150897_b(Block block)
                          {
                              return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore;
                          
                          }
                          
                          }
                          
                          
                          1 réponse Dernière réponse Répondre Citer 0
                          • robin4002
                            robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                            Ta classe devrait être comme ça :

                            public class PickaxeRed extends ItemPickaxe
                            {
                            protected PickaxeRed(ToolMaterial p_i45347_1_)
                            {
                            super(p_i45347_1_);
                            }
                            
                            public float func_150893_a(ItemStack stack, Block block)
                            {
                            return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore ? this.efficiencyOnProperMaterial : 1.0F;
                            }
                            
                            @Override
                            public float getDigSpeed(ItemStack stack, Block block, int meta)
                            {
                            return func_150893_a(stack, block);
                            }
                            
                            public boolean func_150897_b(Block block)
                            {
                            return block == Blocks.redstone_ore || block == Blocks.lit_redstone_ore;
                            }
                            }
                            
                            1 réponse Dernière réponse Répondre Citer 0
                            • Gabs
                              Gabs dernière édition par

                              Avec ton code je peux tout cassé la redstone et la grass .

                              1 réponse Dernière réponse Répondre Citer 0
                              • robin4002
                                robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                                J’ai testé ce code, seule la redstone se casse à une vitesse normal. Le reste c’est plus lent. Si tu veux complètement empêcher de casser les autres blocs remplace le 1.0F par -1.0F ou 0.0F dans func_150893_a

                                1 réponse Dernière réponse Répondre Citer 0
                                • Gabs
                                  Gabs dernière édition par

                                  Ouaip merci c’est bon

                                  1 réponse Dernière réponse Répondre Citer 0
                                  • M
                                    MidacoYT dernière édition par

                                    quand je fais une pioche j’ai cette erreur

                                    [20:41:53] [main/INFO] [GradleStart]: Extra: []
                                    [20:41:53] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Dell/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                                    [20:41:53] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                    [20:41:53] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                    [20:41:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                                    [20:41:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                                    [20:41:54] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
                                    [20:41:54] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_221, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_221
                                    [20:41:54] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                                    [20:41:54] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                                    [20:41:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [20:41:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                    [20:41:54] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                                    [20:41:58] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                                    [20:41:58] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                                    [20:42:00] [main/INFO]: Setting user: Player48
                                    [20:42:01] [Client thread/INFO]: LWJGL Version: 2.9.1
                                    [20:42:03] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----
                                    // Hey, that tickles! Hehehe!
                                    
                                    Time: 27/02/20 20:42
                                    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 10 (amd64) version 10.0
                                    	Java Version: 1.8.0_221, Oracle Corporation
                                    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                    	Memory: 788446064 bytes (751 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: '4.6.0 NVIDIA 432.00' Renderer: 'GeForce GTX 1050/PCIe/SSE2'
                                    [20:42:03] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                                    [20:42:03] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized
                                    [20:42:03] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                                    [20:42:03] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                                    [20:42:03] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
                                    [20:42:03] [Client thread/INFO] [FML]: Searching C:\Users\Dell\Downloads\forge-1.7.10-10.13.4.1614-1.7.10-src (1)\eclipse\mods for mods
                                    [20:42:10] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                                    [20:42:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, valerium] at CLIENT
                                    [20:42:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, valerium] at SERVER
                                    [20:42:11] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:ValeriumMod
                                    [20:42:11] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                                    [20:42:11] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                                    [20:42:11] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
                                    [20:42:11] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
                                    [20:42:11] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                                    [20:42:11] [Client thread/INFO] [FML]: Applying holder lookups
                                    [20:42:11] [Client thread/INFO] [FML]: Holder lookups applied
                                    [20:42:11] [Client thread/INFO] [FML]: Injecting itemstacks
                                    [20:42:11] [Client thread/INFO] [FML]: Itemstack injection complete
                                    [20:42:11] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
                                    [20:42:11] [Client thread/ERROR] [FML]: 
                                    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                                    	UCH	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
                                    	UCH	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                    	UCH	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                    	UCE	valerium{1.0.0} [ValeriumMod] (bin) 
                                    [20:42:11] [Client thread/ERROR] [FML]: The following problems were captured during this phase
                                    [20:42:11] [Client thread/ERROR] [FML]: Caught exception from valerium
                                    java.lang.NullPointerException
                                    	at net.minecraft.item.ItemTool.<init>(ItemTool.java:31) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                    	at net.minecraft.item.ItemPickaxe.<init>(ItemPickaxe.java:16) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                    	at com.mod.valerium.items.ItemValeriumPickaxe.<init>(ItemValeriumPickaxe.java:14) ~[bin/:?]
                                    	at com.mod.valerium.init.ItemMod.init(ItemMod.java:125) ~[bin/:?]
                                    	at com.mod.valerium.ModVale.preInit(ModVale.java:60) ~[bin/:?]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                                    	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                    	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                                    	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
                                    	at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) [Loader.class:?]
                                    	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?]
                                    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
                                    	at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
                                    	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
                                    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
                                    	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/:?]
                                    [20:42:11] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
                                    // Why did you do that?
                                    
                                    Time: 27/02/20 20:42
                                    Description: Initializing game
                                    
                                    java.lang.NullPointerException: Initializing game
                                    	at net.minecraft.item.ItemTool.<init>(ItemTool.java:31)
                                    	at net.minecraft.item.ItemPickaxe.<init>(ItemPickaxe.java:16)
                                    	at com.mod.valerium.items.ItemValeriumPickaxe.<init>(ItemValeriumPickaxe.java:14)
                                    	at com.mod.valerium.init.ItemMod.init(ItemMod.java:125)
                                    	at com.mod.valerium.ModVale.preInit(ModVale.java:60)
                                    	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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                                    	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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                    	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                    	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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                    	at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
                                    	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
                                    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
                                    	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                                    	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.item.ItemTool.<init>(ItemTool.java:31)
                                    	at net.minecraft.item.ItemPickaxe.<init>(ItemPickaxe.java:16)
                                    	at com.mod.valerium.items.ItemValeriumPickaxe.<init>(ItemValeriumPickaxe.java:14)
                                    	at com.mod.valerium.init.ItemMod.init(ItemMod.java:125)
                                    	at com.mod.valerium.ModVale.preInit(ModVale.java:60)
                                    	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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                                    	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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                    	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                    	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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                    	at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
                                    	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
                                    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
                                    
                                    -- Initialization --
                                    Details:
                                    Stacktrace:
                                    	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                                    	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_221, Oracle Corporation
                                    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                    	Memory: 814157344 bytes (776 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: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 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
                                    	UCH	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
                                    	UCH	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                    	UCH	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                    	UCE	valerium{1.0.0} [ValeriumMod] (bin) 
                                    	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 432.00' 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 432.00, 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)
                                    [20:42:11] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Dell\Downloads\forge-1.7.10-10.13.4.1614-1.7.10-src (1)\eclipse\.\crash-reports\crash-2020-02-27_20.42.11-client.txt
                                    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
                                    
                                    

                                    je pense ce c’est a cause de la class ItemValeriumPickaxe donc voila la class

                                             package com.mod.valerium.items;
                                    import com.mod.valerium.ModVale;
                                    import com.mod.valerium.init.ItemMod;
                                    import com.mod.valerium.init.ToolMaterialValerium;
                                    
                                       
                                                import net.minecraft.item.ItemPickaxe;
                                                import net.minecraft.item.ItemStack;
                                               
                                                public class ItemValeriumPickaxe
                                                extends ItemPickaxe
                                                   {
                                                  public ItemValeriumPickaxe() {
                                                      super(ToolMaterialValerium.toolTypeValerium);
                                                       setUnlocalizedName("valerium_pickaxe");
                                                       setTextureName("valerium:valerium_pickaxe");
                                                  setCreativeTab(ModVale.valerium);
                                               }
                                               
                                               public boolean getIsRepairable(ItemStack input, ItemStack repair) {
                                                 if (repair.getItem() == ItemMod.valerium_ingot) {
                                                   return true;
                                                }
                                                 return false;
                                               }
                                             }
                                    
                                    1 réponse Dernière réponse Répondre Citer 0
                                    • Epharos
                                      Epharos dernière édition par

                                      Bonsoir,

                                      je pense que le mieux aurait été de créer ton propre topic plutôt que d’en faire remonter un datant de presque 5 ans …

                                      M’enfin soit, ton problème vient d’un NPE à cette ligne

                                      super(ToolMaterialValerium.toolTypeValerium);
                                      

                                      vérifie que ta variable toolTypeValerium dans ta class ToolMaterialValerium est bien initialisée (et surtout initialisée avant ton item !).

                                      Les petits mods d'Epharos : [Trading Players] -> https://www.minecraftforgefrance.fr/topic/6023/trading-players-les-petits-mods-d-epharos

                                      M 1 réponse Dernière réponse Répondre Citer 0
                                      • M
                                        MidacoYT @Epharos dernière édition par

                                        @Epharos merci c’est ce que je me suis dit

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • 1 / 1
                                        • Premier message
                                          Dernier message
                                        Design by Woryk
                                        Contact / Mentions Légales

                                        MINECRAFT FORGE FRANCE © 2018

                                        Powered by NodeBB