Résolu Poisson pêchable
-
Bonjour à tous,
Voilà aujourd’hui je voulais savoir comment ajouter un poisson à la liste des items pêchables sans créer de canne à pêche supplémentaire si possible et sinon, comment faudrait-il faire pour créer cette dernière et logiquement l’hameçon.
Merci d’avance à toutes les personnes qui pourront m’aider !
Réponse de Robin :
FishingHooks.addFish(new WeightedRandomFishable(new ItemStack(<l'items>, <le nombre="">, <le metadata="">), 60));
60 étant la fréquence du drop et tout ça à ajouter dans la classe principale.</le></le></l’items>
-
En 1.7.2 ce n’était pas possible :
http://www.minecraftforgefrance.fr/showthread.php?tid=817&highlight=poisson
Mais depuis Forge a mit un access transformer pour ces variables, elles sont maintenant public et non private.
Donc avec EntityFishHook.FISH.add(new WeightedRandomFishable(new ItemStack(tonItem, 1, metadata), 60));
(60 étant la chance)
dans la classe principale ça devrait fonctionner
Tu peux aussi utiliser EntityFishHook.TREASURE.add(… pour les trésors (livre, arc, selle, name tag, etc …) et EntityFishHook.JUNK.add(… pour les trucs inutiles (genre baton, os, viande de zombie, cuire, etc …)Jette un coup d’œil à EntityFishHook.java (package net.minecraft.entity.projectile), les listes sont juste au début de la classe tu pourra facilement voir ce qu’elles contiennent déjà et les probabilités.
-
Merci Robin, une vraie mine de savoir. J’aimerais bien connaitre toutes ces petites lignes subtiles que personne n’est sensé connaitre si il ne fais pas le tour de toutes les classes, t’a une astuce ?
Par contre juste un petit problème ça ne marche n’y en le mettant dans le post init, pre init, ou init, une solution ? ça m’affiche que le compilateur ne peu plus passer de pre init à init.
Ma classe principale :
package mods.emotion.main; import mods.emotion.achievement.EmotionAchievement; import mods.emotion.biome.BiomeRegistry; import mods.emotion.blocks.EmotionBlocks; import mods.emotion.creativeTabs.EmotionTab; import mods.emotion.entity.EmotionEntity; import mods.emotion.items.EmotionItems; import mods.emotion.lib.Infos; import mods.emotion.world.EmotionWorld; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomFishable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.Metadata; import net.minecraftforge.fml.common.ModMetadata; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Infos.MODID, version = Infos.version, name = Infos.name) public class MainRegistry { @SidedProxy(clientSide = "mods.emotion.main.ClientProxy", serverSide = "mods.emotion.main.ServerProxy") public static ServerProxy proxy; @Metadata public static ModMetadata meta; @Instance(Infos.MODID) public static MainRegistry instance; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { EmotionTab.mainRegistry(); EmotionBlocks.mainRegistry(); EmotionItems.mainRegistry(); EmotionWorld.mainRegistry(); EmotionEntity.mainRegistry(); EmotionAchievement.mainRegistry(); EnchantManager.mainRegistry(); CraftingManager.mainRegistry(); BiomeRegistry.mainRegistry(); } @Mod.EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(new EmotionOnMineEvent()); FMLCommonHandler.instance().bus().register(new EmotionOnCraftEvent()); MinecraftForge.EVENT_BUS.register(new EmotionOnDeathEvent()); proxy.registerRenderThings(); proxy.registerBlockTexture(); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } }
-
Ah bon ? C’est étrange ça ?
Tu as mit comment le code ?Et pour répondre à ta question, la seule solution pour savoir tout ce petit truc est bien de chercher dans les classes de Minecraft. Après suivre le github de Forge aide aussi beaucoup pour être au courant des changements.
-
Alors pour infos j’ai essayé déjà comme ça :
package mods.emotion.main; import mods.emotion.achievement.EmotionAchievement; import mods.emotion.biome.BiomeRegistry; import mods.emotion.blocks.EmotionBlocks; import mods.emotion.creativeTabs.EmotionTab; import mods.emotion.entity.EmotionEntity; import mods.emotion.items.EmotionItems; import mods.emotion.lib.Infos; import mods.emotion.world.EmotionWorld; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomFishable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.Metadata; import net.minecraftforge.fml.common.ModMetadata; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Infos.MODID, version = Infos.version, name = Infos.name) public class MainRegistry { @SidedProxy(clientSide = "mods.emotion.main.ClientProxy", serverSide = "mods.emotion.main.ServerProxy") public static ServerProxy proxy; @Metadata public static ModMetadata meta; @Instance(Infos.MODID) public static MainRegistry instance; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { EntityFishHook.FISH.add(new WeightedRandomFishable(new ItemStack(EmotionItems.pearFruit, 1), 60)); EmotionTab.mainRegistry(); EmotionBlocks.mainRegistry(); EmotionItems.mainRegistry(); EmotionWorld.mainRegistry(); EmotionEntity.mainRegistry(); EmotionAchievement.mainRegistry(); EnchantManager.mainRegistry(); CraftingManager.mainRegistry(); BiomeRegistry.mainRegistry(); } @Mod.EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(new EmotionOnMineEvent()); FMLCommonHandler.instance().bus().register(new EmotionOnCraftEvent()); MinecraftForge.EVENT_BUS.register(new EmotionOnDeathEvent()); proxy.registerRenderThings(); proxy.registerBlockTexture(); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } }
Que ce soit avant, après, dans le post init, pre init, init mais rien ne marche mais j’ai aucune erreur sur la ligne de code.
Les logs au cas où :
[18:27:50] [main/INFO] [GradleStart]: Extra: [] [18:27:50] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.8, --assetsDir, D:/Base/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker] [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [FML]: Forge Mod Loader version 8.0.26.1299 for Minecraft 1.8 loading [18:27:50] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_75, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jdk1.7.0_75\jre [18:27:50] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [18:27:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [18:27:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:27:50] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [18:27:51] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [18:27:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:27:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [18:27:52] [Client thread/INFO]: Setting user: Player343 [18:27:54] [Client thread/INFO]: LWJGL Version: 2.9.1 [18:27:55] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [18:27:55] [Client thread/INFO] [FML]: MinecraftForge v11.14.0.1299 Initialized [18:27:55] [Client thread/INFO] [FML]: Replaced 204 ore recipies [18:27:55] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [18:27:55] [Client thread/INFO] [FML]: Searching D:\Base\Downloads\Minecraft Moding\Forge Mod\eclipse\mods for mods [18:27:57] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [18:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, emoMod] at CLIENT [18:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, emoMod] at SERVER [18:27:58] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Emotion [18:27:58] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [18:27:58] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [18:27:58] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [18:27:58] [Client thread/INFO] [FML]: Applying holder lookups [18:27:58] [Client thread/INFO] [FML]: Holder lookups applied [18:27:58] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue [18:27:58] [Client thread/ERROR] [FML]: mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized emoMod{2.0} [Mod Emotion] (bin) Unloaded->Constructed->Errored [18:27:58] [Client thread/ERROR] [FML]: The following problems were captured during this phase [18:27:58] [Client thread/ERROR] [FML]: Caught exception from emoMod java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) ~[?:1.7.0_75] at java.util.AbstractList.add(AbstractList.java:108) ~[?:1.7.0_75] at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) ~[bin/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:325) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [18:27:58] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: –-- Minecraft Crash Report ---- // Why did you do that? Time: 02/04/15 18:27 Description: Initializing game java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_75, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 847600424 bytes (808 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.26.1299 Minecraft Forge 11.14.0.1299 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized emoMod{2.0} [Mod Emotion] (bin) Unloaded->Constructed->Errored Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GTX 680/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.88, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes 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) [18:27:58] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: #@!@# Game crashed! Crash report saved to: #@!@# D:\Base\Downloads\Minecraft Moding\Forge Mod\eclipse\.\crash-reports\crash-2015-04-02_18.27.58-client.txt
-
Alors pour infos j’ai essayé déjà comme ça :
package mods.emotion.main; import mods.emotion.achievement.EmotionAchievement; import mods.emotion.biome.BiomeRegistry; import mods.emotion.blocks.EmotionBlocks; import mods.emotion.creativeTabs.EmotionTab; import mods.emotion.entity.EmotionEntity; import mods.emotion.items.EmotionItems; import mods.emotion.lib.Infos; import mods.emotion.world.EmotionWorld; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomFishable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.Metadata; import net.minecraftforge.fml.common.ModMetadata; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Infos.MODID, version = Infos.version, name = Infos.name) public class MainRegistry { @SidedProxy(clientSide = "mods.emotion.main.ClientProxy", serverSide = "mods.emotion.main.ServerProxy") public static ServerProxy proxy; @Metadata public static ModMetadata meta; @Instance(Infos.MODID) public static MainRegistry instance; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { EntityFishHook.FISH.add(new WeightedRandomFishable(new ItemStack(EmotionItems.pearFruit, 1), 60)); EmotionTab.mainRegistry(); EmotionBlocks.mainRegistry(); EmotionItems.mainRegistry(); EmotionWorld.mainRegistry(); EmotionEntity.mainRegistry(); EmotionAchievement.mainRegistry(); EnchantManager.mainRegistry(); CraftingManager.mainRegistry(); BiomeRegistry.mainRegistry(); } @Mod.EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(new EmotionOnMineEvent()); FMLCommonHandler.instance().bus().register(new EmotionOnCraftEvent()); MinecraftForge.EVENT_BUS.register(new EmotionOnDeathEvent()); proxy.registerRenderThings(); proxy.registerBlockTexture(); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } }
Que ce soit avant, après, dans le post init, pre init, init mais rien ne marche mais j’ai aucune erreur sur la ligne de code.
Les logs au cas où :
[18:27:50] [main/INFO] [GradleStart]: Extra: [] [18:27:50] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.8, --assetsDir, D:/Base/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker] [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [18:27:50] [main/INFO] [FML]: Forge Mod Loader version 8.0.26.1299 for Minecraft 1.8 loading [18:27:50] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_75, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jdk1.7.0_75\jre [18:27:50] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [18:27:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [18:27:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [18:27:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:27:50] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [18:27:51] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [18:27:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [18:27:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [18:27:52] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [18:27:52] [Client thread/INFO]: Setting user: Player343 [18:27:54] [Client thread/INFO]: LWJGL Version: 2.9.1 [18:27:55] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [18:27:55] [Client thread/INFO] [FML]: MinecraftForge v11.14.0.1299 Initialized [18:27:55] [Client thread/INFO] [FML]: Replaced 204 ore recipies [18:27:55] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [18:27:55] [Client thread/INFO] [FML]: Searching D:\Base\Downloads\Minecraft Moding\Forge Mod\eclipse\mods for mods [18:27:57] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [18:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, emoMod] at CLIENT [18:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, emoMod] at SERVER [18:27:58] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Emotion [18:27:58] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [18:27:58] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [18:27:58] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [18:27:58] [Client thread/INFO] [FML]: Applying holder lookups [18:27:58] [Client thread/INFO] [FML]: Holder lookups applied [18:27:58] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue [18:27:58] [Client thread/ERROR] [FML]: mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized emoMod{2.0} [Mod Emotion] (bin) Unloaded->Constructed->Errored [18:27:58] [Client thread/ERROR] [FML]: The following problems were captured during this phase [18:27:58] [Client thread/ERROR] [FML]: Caught exception from emoMod java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) ~[?:1.7.0_75] at java.util.AbstractList.add(AbstractList.java:108) ~[?:1.7.0_75] at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) ~[bin/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.8-11.14.0.1299.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:325) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [18:27:58] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: –-- Minecraft Crash Report ---- // Why did you do that? Time: 02/04/15 18:27 Description: Initializing game java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at mods.emotion.main.MainRegistry.preInit(MainRegistry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:412) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_75, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 847600424 bytes (808 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.26.1299 Minecraft Forge 11.14.0.1299 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.26.1299} [Forge Mod Loader] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized Forge{11.14.0.1299} [Minecraft Forge] (forgeSrc-1.8-11.14.0.1299.jar) Unloaded->Constructed->Pre-initialized emoMod{2.0} [Mod Emotion] (bin) Unloaded->Constructed->Errored Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GTX 680/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.88, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes 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) [18:27:58] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: #@!@# Game crashed! Crash report saved to: #@!@# D:\Base\Downloads\Minecraft Moding\Forge Mod\eclipse\.\crash-reports\crash-2015-04-02_18.27.58-client.txt
-
Ah oui en effet, comme Minecraft utilise Arrays.asList la liste a une taille fixe.
Je viens de jeter un coup d’œil à Forge du-coup.
C’est ce pull request qui a ajouté l’Access transformer :
https://github.com/MinecraftForge/MinecraftForge/pull/1288
Et ce commit est lié à celui-là :
https://github.com/MinecraftForge/MinecraftForge/pull/1128
Donc apparemment il faut passer par la classe net.minecraftforge.common.FishingHooks
FishingHooks.addFish(new WeightedRandomFishable(new ItemStack(tonItem, 1, metadata), 60));
ou addJunk ou addTreasure -
Merci bien t’es un chef ! Ça marche du tonnerre, je swap en résolue. Vraiment une bonne communauté sur ce site, très vif, très mature et très au point.