Register Block et Item



  • Bonjour à tous,

    Comme d'habitude j'essaye d'update mon mod à chaque nouvelle version de Minecraft, mais à chaque fois quelque chose me bloque. J'ai pu update mes crafts au nouveau système, mais pour ce qui est de register mes blocks et mes items, malgré le tuto que j'ai pu regarder, je n'arrive pas à l'appliquer à la syntaxe que j'ai utilisé pour développé mon mod. Je vous donne tout les différents éléments qui causent mon problème, si quelqu'un pourrait m'aider ça serait très gentil de sa part.

    Le crash log déjà:

    2017-07-14 01:46:54,633 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 01:46:54,636 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [01:46:54] [main/INFO] [GradleStart]: Extra: []
    [01:46:54] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Zules perrin/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [01:46:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [01:46:54] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2387 for Minecraft 1.12 loading
    [01:46:54] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_121
    [01:46:54] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [01:46:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [01:46:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [01:46:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [01:46:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [01:46:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    2017-07-14 01:46:55,184 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 01:46:55,466 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 01:46:55,467 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [01:46:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [01:46:56] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [01:46:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [01:46:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [01:46:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [01:46:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [01:46:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [01:46:57] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [01:46:58] [main/INFO]: Setting user: Player502
    [01:47:01] [main/INFO]: LWJGL Version: 2.9.4
    [01:47:03] [main/INFO] [FML]: – System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 689437536 bytes (657 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    [01:47:03] [main/INFO] [FML]: MinecraftForge v14.21.1.2387 Initialized
    [01:47:03] [main/INFO] [FML]: Replaced 921 ore ingredients
    [01:47:03] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [01:47:03] [main/INFO] [FML]: Searching C:\Users\Zules perrin\Desktop\Forge 1.12\run\mods for mods
    [01:47:04] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [01:47:04] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at CLIENT
    [01:47:04] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at SERVER
    [01:47:05] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamantium
    [01:47:05] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 84556067 nanos
    [01:47:05] [main/INFO] [FML]: Processing ObjectHolder annotations
    [01:47:05] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
    [01:47:05] [main/INFO] [FML]: Identifying ItemStackHolder annotations
    [01:47:05] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
    [01:47:05] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
    [01:47:05] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [01:47:05] [main/INFO] [FML]: Applying holder lookups
    [01:47:05] [main/INFO] [FML]: Holder lookups applied
    [01:47:05] [main/INFO] [FML]: Applying holder lookups
    [01:47:05] [main/INFO] [FML]: Holder lookups applied
    [01:47:05] [main/INFO] [FML]: Applying holder lookups
    [01:47:05] [main/INFO] [FML]: Holder lookups applied
    [01:47:05] [main/INFO] [FML]: Applying holder lookups
    [01:47:05] [main/INFO] [FML]: Holder lookups applied
    [01:47:05] [main/INFO] [FML]: Injecting itemstacks
    [01:47:05] [main/INFO] [FML]: Itemstack injection complete
    [01:47:05] [main/FATAL] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
    [01:47:05] [main/FATAL] [FML]:
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH minecraft{1.12} [Minecraft] (minecraft.jar)
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2387.jar)
    UCH forge{14.21.1.2387} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2387.jar)
    UCE adamantium{1.0.0} [Adamantium] (bin)
    [01:47:05] [main/FATAL] [FML]: The following problems were captured during this phase
    [01:47:05] [main/ERROR] [FML]: Caught exception from adamantium (java.lang.NullPointerException)
    [01:47:05] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: –-- Minecraft Crash Report ----
    // But it works on my machine.
    
    Time: 7/14/17 1:47 AM
    Description: There was a severe problem during mod loading that has caused the game to fail
    
    net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Adamantium (adamantium)
    Caused by: java.lang.NullPointerException
    at net.minecraft.client.renderer.block.model.ModelResourceLocation.<init>(ModelResourceLocation.java:24)
    at fr.jules552.mod.init.ItemsMod.registerRender(ItemsMod.java:197)
    at fr.jules552.mod.init.ItemsMod.registerRenders(ItemsMod.java:161)
    at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:18)
    at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:630)
    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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:252)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:230)
    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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:147)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 661920328 bytes (631 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.40 Powered by Forge 14.21.1.2387 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH minecraft{1.12} [Minecraft] (minecraft.jar)
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2387.jar)
    UCH forge{14.21.1.2387} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2387.jar)
    UCE adamantium{1.0.0} [Adamantium] (bin)
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    [01:47:05] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
    [01:47:05] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Zules perrin\Desktop\Forge 1.12\run\.\crash-reports\crash-2017-07-14_01.47.05-client.txt
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    
    

    Les différentes class qui concernent le crash log:

    package fr.jules552.mod.init;
    
    import com.jcraft.jorbis.Block;
    
    import fr.jules552.mod.Reference;
    import fr.jules552.mod.init.Adamantium.ArmorAdamantium;
    import fr.jules552.mod.init.Adamantium.AxeAdamantium;
    import fr.jules552.mod.init.Adamantium.PickaxeAdamantium;
    import fr.jules552.mod.init.Adamantium.ShovelAdamantium;
    import fr.jules552.mod.init.Adamantium.ItemSword2;
    import fr.jules552.mod.init.Adamantium.SwordAdamantium;
    import fr.jules552.mod.init.Aluminium.ArmorAluminium;
    import fr.jules552.mod.init.Aluminium.AxeAluminium;
    import fr.jules552.mod.init.Aluminium.PickaxeAluminium;
    import fr.jules552.mod.init.Aluminium.ShovelAluminium;
    import fr.jules552.mod.init.Aluminium.SwordAluminium;
    import fr.jules552.mod.init.CreativesTabs.AdamantiumCreativeTabs;
    import fr.jules552.mod.init.Silver.ArmorSilver;
    import fr.jules552.mod.init.Silver.AxeSilver;
    import fr.jules552.mod.init.Silver.PickaxeSilver;
    import fr.jules552.mod.init.Silver.ShovelSilver;
    import fr.jules552.mod.init.Silver.SwordSilver;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.init.SoundEvents;
    import net.minecraft.inventory.EntityEquipmentSlot;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemArmor.ArmorMaterial;
    import net.minecraft.item.ItemRecord;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.util.SoundEvent;
    import net.minecraft.item.Item.ToolMaterial;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.common.util.EnumHelper;
    import net.minecraftforge.fml.common.registry.ForgeRegistries;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    
    public class ItemsMod
    {
    //Nouveaux Matériaux
    
    public static ToolMaterial AdamantiumPick = EnumHelper.addToolMaterial("AdamantiumPick", 3, 2002, 15.0F, 3.0F, 11);
    public static ToolMaterial AdamantiumSwo = EnumHelper.addToolMaterial("AdamantiumSwo", 3, 2002, 15.0F, 5.0F, 11);
    public static ToolMaterial AdamantiumSho = EnumHelper.addToolMaterial("AdamantiumSho", 3, 2002, 15.0F, 2.0F, 11);
    public static ToolMaterial AdamantiumAx = EnumHelper.addToolMaterial("AdamantiumAx", 3, 2002, 15.0F, 7.0F, 11);
    public static ArmorMaterial AdamantiumArmor = EnumHelper.addArmorMaterial("AdamantiumArmor", "AdamantiumArmor", 50, new int[]{4, 7, 10, 5}, 10, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0);
    public static ArmorMaterial SilverArmor = EnumHelper.addArmorMaterial("SilverArmor", "SilverArmor", 15, new int[]{2, 4, 5, 3}, 18, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0);
    public static ToolMaterial SilverPick = EnumHelper.addToolMaterial("SilverPick", 3, 196, 7.0F, 1.0F, 18);
    public static ToolMaterial SilverSwo = EnumHelper.addToolMaterial("SilverSwo", 3, 196, 15.0F, 1.5F, 18);
    public static ToolMaterial SilverSho = EnumHelper.addToolMaterial("SilverSho", 3, 196, 7.0F, 1.0F, 18);
    public static ToolMaterial SilverAx = EnumHelper.addToolMaterial("SilverAx", 3, 196, 5.0F, 1.0F, 18);
    public static ToolMaterial AluminiumPick = EnumHelper.addToolMaterial("AluminiumPick", 3, 225, 8.0F, 0.5F, 16);
    public static ToolMaterial AluminiumSwo = EnumHelper.addToolMaterial("AluminiumSwo", 3, 225, 15.0F, 1.0F, 16);
    public static ToolMaterial AluminiumSho = EnumHelper.addToolMaterial("AluminiumSho", 3, 225, 8.0F, 0.5F, 16);
    public static ToolMaterial AluminiumAx = EnumHelper.addToolMaterial("AluminiumAx", 3, 225, 6.0F, 0.5F, 16);
    public static ArmorMaterial AluminiumArmor = EnumHelper.addArmorMaterial("AluminiumArmor", "AluminiumArmor", 15, new int[]{2, 4, 4, 3}, 18, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0);
    
    //CreativeTabs
    public static CreativeTabs tabCustomTab = new AdamantiumCreativeTabs();
    
    //Les Items
    
    public static Item adamantium_ingot, adamantium_pickaxe, adamantium_sword, adamantium_shovel, adamantium_axe, adamantium_helmet, adamantium_chestplate, adamantium_leggings, adamantium_boots;
    public static Item silver_ingot, silver_helmet,silver_chestplate,silver_leggings,silver_boots, silver_pickaxe, silver_sword, silver_shovel, silver_axe;
    public static Item aluminium_ingot, aluminium_pickaxe, aluminium_sword, aluminium_shovel, aluminium_axe, aluminium_helmet, aluminium_chestplate, aluminium_leggings, aluminium_boots;
    
    static
    {
    
    //Adamantium
    adamantium_ingot = new Item().setUnlocalizedName("adamantium_ingot").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_pickaxe = new PickaxeAdamantium(AdamantiumPick).setUnlocalizedName("adamantium_pickaxe").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_sword = new SwordAdamantium(AdamantiumSwo, 0).setUnlocalizedName("adamantium_sword").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_shovel = new ShovelAdamantium(AdamantiumSho).setUnlocalizedName("adamantium_shovel").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_axe = new AxeAdamantium(AdamantiumAx).setUnlocalizedName("adamantium_axe").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_helmet = new ArmorAdamantium(AdamantiumArmor, EntityEquipmentSlot.HEAD, "adamantium_helmet").setUnlocalizedName("adamantium_helmet").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_chestplate = new ArmorAdamantium(AdamantiumArmor, EntityEquipmentSlot.CHEST, "adamantium_chestplate").setUnlocalizedName("adamantium_chestplate").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_leggings = new ArmorAdamantium(AdamantiumArmor, EntityEquipmentSlot.LEGS, "adamantium_leggings").setUnlocalizedName("adamantium_leggings").setCreativeTab(ItemsMod.tabCustomTab);
    adamantium_boots = new ArmorAdamantium(AdamantiumArmor, EntityEquipmentSlot.FEET, "adamantium_boots").setUnlocalizedName("adamantium_boots").setCreativeTab(ItemsMod.tabCustomTab);
    
    //Silver
    silver_ingot = new Item().setUnlocalizedName("silver_ingot").setCreativeTab(ItemsMod.tabCustomTab);
    silver_helmet = new ArmorSilver(SilverArmor, EntityEquipmentSlot.HEAD).setUnlocalizedName("silver_helmet").setCreativeTab(ItemsMod.tabCustomTab);
    silver_chestplate = new ArmorSilver(SilverArmor, EntityEquipmentSlot.CHEST).setUnlocalizedName("silver_chestplate").setCreativeTab(ItemsMod.tabCustomTab);
    silver_leggings = new ArmorSilver(SilverArmor, EntityEquipmentSlot.LEGS).setUnlocalizedName("silver_leggings").setCreativeTab(ItemsMod.tabCustomTab);
    silver_boots = new ArmorSilver(SilverArmor, EntityEquipmentSlot.FEET).setUnlocalizedName("silver_boots").setCreativeTab(ItemsMod.tabCustomTab);
    silver_pickaxe = new PickaxeSilver(SilverPick).setUnlocalizedName("silver_pickaxe").setCreativeTab(ItemsMod.tabCustomTab);
    silver_sword = new SwordSilver(SilverSwo, 0).setUnlocalizedName("silver_sword").setCreativeTab(ItemsMod.tabCustomTab);
    silver_shovel = new ShovelSilver(SilverSho).setUnlocalizedName("silver_shovel").setCreativeTab(ItemsMod.tabCustomTab);
    silver_axe = new AxeSilver(SilverAx).setUnlocalizedName("silver_axe").setCreativeTab(ItemsMod.tabCustomTab);
    
    //Aluminium
    aluminium_ingot = new Item().setUnlocalizedName("aluminium_ingot").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_pickaxe = new PickaxeAluminium(AluminiumPick).setUnlocalizedName("aluminium_pickaxe").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_sword = new SwordAluminium(AluminiumSwo, 0).setUnlocalizedName("aluminium_sword").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_shovel = new ShovelAluminium(AluminiumSho).setUnlocalizedName("aluminium_shovel").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_axe = new AxeAluminium(AluminiumAx).setUnlocalizedName("aluminium_axe").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_helmet = new ArmorAluminium(AluminiumArmor, EntityEquipmentSlot.HEAD).setUnlocalizedName("aluminium_helmet").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_chestplate = new ArmorAluminium(AluminiumArmor, EntityEquipmentSlot.CHEST).setUnlocalizedName("aluminium_chestplate").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_leggings = new ArmorAluminium(AluminiumArmor, EntityEquipmentSlot.LEGS).setUnlocalizedName("aluminium_leggings").setCreativeTab(ItemsMod.tabCustomTab);
    aluminium_boots = new ArmorAluminium(AluminiumArmor, EntityEquipmentSlot.FEET).setUnlocalizedName("aluminium_boots").setCreativeTab(ItemsMod.tabCustomTab);
    }
    
    public static void register()
    {
    //Items
    
    //GameRegistry pour Adamantium
    ForgeRegistries.ITEMS.register(adamantium_ingot.setRegistryName("adamantium_ingot"));
    ForgeRegistries.ITEMS.register(adamantium_pickaxe.setRegistryName("adamantium_pickaxe"));
    ForgeRegistries.ITEMS.register(adamantium_sword.setRegistryName("adamantium_sword"));
    ForgeRegistries.ITEMS.register(adamantium_shovel.setRegistryName("adamantium_shovel"));
    ForgeRegistries.ITEMS.register(adamantium_axe.setRegistryName("adamantium_axe"));
    ForgeRegistries.ITEMS.register(adamantium_helmet.setRegistryName("adamantium_helmet"));
    ForgeRegistries.ITEMS.register(adamantium_chestplate.setRegistryName("adamantium_chestplate"));
    ForgeRegistries.ITEMS.register(adamantium_leggings.setRegistryName("adamantium_leggings"));
    ForgeRegistries.ITEMS.register(adamantium_boots.setRegistryName("adamantium_boots"));
    
    //GameRegistry pour Silver
    ForgeRegistries.ITEMS.register(silver_ingot.setRegistryName("silver_ingot"));
    ForgeRegistries.ITEMS.register(silver_helmet.setRegistryName("silver_helmet"));
    ForgeRegistries.ITEMS.register(silver_chestplate.setRegistryName("silver_chestplate"));
    ForgeRegistries.ITEMS.register(silver_leggings.setRegistryName("silver_leggings"));
    ForgeRegistries.ITEMS.register(silver_boots.setRegistryName("silver_boots"));
    ForgeRegistries.ITEMS.register(silver_pickaxe.setRegistryName("silver_pickaxe"));
    ForgeRegistries.ITEMS.register(silver_sword.setRegistryName("silver_sword"));
    ForgeRegistries.ITEMS.register(silver_shovel.setRegistryName("silver_shovel"));
    ForgeRegistries.ITEMS.register(silver_axe.setRegistryName("silver_axe"));
    
    //Gameregistry Aluminium
    ForgeRegistries.ITEMS.register(aluminium_ingot.setRegistryName("aluminium_ingot"));
    ForgeRegistries.ITEMS.register(aluminium_pickaxe.setRegistryName("aluminium_pickaxe"));
    ForgeRegistries.ITEMS.register(aluminium_sword.setRegistryName("aluminium_sword"));
    ForgeRegistries.ITEMS.register(aluminium_shovel.setRegistryName("aluminium_shovel"));
    ForgeRegistries.ITEMS.register(aluminium_axe.setRegistryName("aluminium_axe"));
    ForgeRegistries.ITEMS.register(aluminium_helmet.setRegistryName("aluminium_helmet"));
    ForgeRegistries.ITEMS.register(aluminium_chestplate.setRegistryName("aluminium_chestplate"));
    ForgeRegistries.ITEMS.register(aluminium_leggings.setRegistryName("aluminium_leggings"));
    ForgeRegistries.ITEMS.register(aluminium_boots.setRegistryName("aluminium_boots"));
    
    }
    
    public static void registerRenders()
    {
    
    //Renders Adamantium
    registerRender(adamantium_ingot);
    registerRender(adamantium_pickaxe);
    registerRender(adamantium_sword);
    registerRender(adamantium_shovel);
    registerRender(adamantium_axe);
    registerRender(adamantium_helmet);
    registerRender(adamantium_chestplate);
    registerRender(adamantium_leggings);
    registerRender(adamantium_boots);
    
    //Renders Silver
    registerRender(silver_ingot);
    registerRender(silver_helmet);
    registerRender(silver_chestplate);
    registerRender(silver_leggings);
    registerRender(silver_boots);
    registerRender(silver_pickaxe);
    registerRender(silver_sword);
    registerRender(silver_shovel);
    registerRender(silver_axe);
    
    //Renders Aluminium
    registerRender(aluminium_ingot);
    registerRender(aluminium_pickaxe);
    registerRender(aluminium_sword);
    registerRender(aluminium_shovel);
    registerRender(aluminium_axe);
    registerRender(aluminium_helmet);
    registerRender(aluminium_chestplate);
    registerRender(aluminium_leggings);
    registerRender(aluminium_boots);
    
    }
    
    public static void registerRender(Item item)
    {
    ModelLoader.setCustomModelResourceLocation (item, 0, new ModelResourceLocation (item.getRegistryName(), "inventory"));
    }
    
    }
    
    package fr.jules552.mod.init;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.MapColor;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemPickaxe;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.crafting.ShapelessRecipes;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.fml.common.registry.ForgeRegistries;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    import Blocks.AdamantiumMinerai;
    import Blocks.AluminiumMinerai;
    import Blocks.BlockAdamantium;
    import Blocks.BlockAluminium;
    import Blocks.BlockSilver;
    import Blocks.BlockXray;
    import Blocks.LumineuxBlock;
    import Blocks.PadBounceBlue;
    import Blocks.PadBounceGreen;
    import Blocks.PadBounceRed;
    import Blocks.SilverMinerai;
    import Blocks.SpikeBlock;
    import fr.jules552.mod.Reference;
    
    public class BlocksMod
    {
    
    public static final Block ADAMANTIUM_BLOCK = new BlockAdamantium(Material.IRON).setRegistryName("adamantium_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("adamantium_block");
    public static final Block ADAMANTIUM_ORE = new AdamantiumMinerai(Material.ROCK).setRegistryName("adamantium_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("adamantium_ore");
    public static final Block SILVER_BLOCK = new BlockSilver(Material.IRON).setRegistryName("silver_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("silver_block");
    public static final Block SILVER_ORE = new SilverMinerai(Material.ROCK).setRegistryName("silver_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("silver_ore");
    public static final Block ALUMINIUM_BLOCK = new BlockAluminium(Material.ROCK).setRegistryName("aluminium_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("aluminium_block");
    public static final Block ALUMINIUM_ORE = new AluminiumMinerai(Material.ROCK).setRegistryName("aluminium_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("aluminium_ore");
    public static final Block LIGHT_BLOCK = new LumineuxBlock(Material.WEB).setRegistryName("light_block").setCreativeTab(ItemsMod.tabCustomTab).setBlockUnbreakable().setLightLevel(1.0F).setUnlocalizedName("light_block");
    public static final Block XRAY_BLOCK = new BlockXray(Material.GLASS).setRegistryName("xray_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("xray_block");
    public static final Block BOUNCE_PAD_RED = new PadBounceRed().setRegistryName("bounce_pad_red").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_red");
    public static final Block BOUNCE_PAD_BLUE = new PadBounceBlue().setRegistryName("bounce_pad_blue").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_blue");
    public static final Block BOUNCE_PAD_GREEN = new PadBounceGreen().setRegistryName("bounce_pad_green").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_green");
    public static final Block SPIKE_BLOCK = new SpikeBlock(Material.CLAY).setRegistryName("spike_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("spike_block");
    
    public static void registerBlocks (){
    ForgeRegistries.BLOCKS.register(ADAMANTIUM_BLOCK);
    ForgeRegistries.BLOCKS.register(ADAMANTIUM_ORE);
    ForgeRegistries.BLOCKS.register(SILVER_BLOCK);
    ForgeRegistries.BLOCKS.register(SILVER_ORE);
    ForgeRegistries.BLOCKS.register(ALUMINIUM_BLOCK);
    ForgeRegistries.BLOCKS.register(ALUMINIUM_ORE);
    ForgeRegistries.BLOCKS.register(LIGHT_BLOCK);
    ForgeRegistries.BLOCKS.register(XRAY_BLOCK);
    ForgeRegistries.BLOCKS.register(BOUNCE_PAD_RED);
    ForgeRegistries.BLOCKS.register(BOUNCE_PAD_BLUE);
    ForgeRegistries.BLOCKS.register(BOUNCE_PAD_GREEN);
    ForgeRegistries.BLOCKS.register(SPIKE_BLOCK);
    }
    
    public static void registerTextRecipies()
    {
    //Les Crafts
    
    //Crafts pour Adamantium
    GameRegistry.addSmelting(BlocksMod.ADAMANTIUM_ORE, new ItemStack(ItemsMod.adamantium_ingot), 1.8F);
    
    //Crafts pour Silver
    GameRegistry.addSmelting(BlocksMod.SILVER_ORE, new ItemStack(ItemsMod.silver_ingot), 0.8F);
    
    //Crafts pour Aluminium
    GameRegistry.addSmelting(BlocksMod.ALUMINIUM_ORE, new ItemStack(ItemsMod.aluminium_ingot), 0.7F);
    
    }
    
    @SideOnly (Side.CLIENT)
    public static void registerItemBlockModels (){
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ADAMANTIUM_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":adamantium_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ADAMANTIUM_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":adamantium_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SILVER_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":silver_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SILVER_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":silver_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ALUMINIUM_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":aluminium_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ALUMINIUM_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":aluminium_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (LIGHT_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":light_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (XRAY_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":xray_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_RED), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_red", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_BLUE), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_blue", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_GREEN), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_green", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SPIKE_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":spike_block", "inventory"));
    }
    
    public static void registerItemBlock (){
    
     ForgeRegistries.ITEMS.register(new ItemBlock(ADAMANTIUM_BLOCK.setRegistryName(ADAMANTIUM_BLOCK.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(ADAMANTIUM_ORE.setRegistryName(ADAMANTIUM_ORE.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(SILVER_BLOCK.setRegistryName(SILVER_BLOCK.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(SILVER_ORE.setRegistryName(SILVER_ORE.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(ALUMINIUM_BLOCK.setRegistryName(ALUMINIUM_BLOCK.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(ALUMINIUM_ORE.setRegistryName(ALUMINIUM_ORE.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(LIGHT_BLOCK.setRegistryName(LIGHT_BLOCK.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(XRAY_BLOCK.setRegistryName(XRAY_BLOCK.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(BOUNCE_PAD_RED.setRegistryName(BOUNCE_PAD_RED.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(BOUNCE_PAD_BLUE.setRegistryName(BOUNCE_PAD_BLUE.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(BOUNCE_PAD_GREEN.setRegistryName(BOUNCE_PAD_GREEN.getRegistryName())));
    
     ForgeRegistries.ITEMS.register(new ItemBlock(SPIKE_BLOCK.setRegistryName(SPIKE_BLOCK.getRegistryName())));
    }
    
    }
    
    package fr.jules552.mod.proxy;
    
    import fr.jules552.mod.init.ItemsMod;
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import fr.jules552.mod.init.BlocksMod;
    
    public class ClientProxy extends CommonProxy {
    
    @Override
    public void preInit(FMLPreInitializationEvent event) {
    super.preInit(event);
    BlocksMod.registerItemBlockModels();
    ItemsMod.registerRenders();
    
    }
    
    @Override
    public void init(FMLInitializationEvent event) {
    super.init(event);
    }
    }
    
    package fr.jules552.mod.proxy;
    
    import fr.jules552.mod.WorldGeneration.GenerationHelper;
    import fr.jules552.mod.init.BlocksMod;
    import fr.jules552.mod.init.ItemsMod;
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.oredict.OreDictionary;
    
    public abstract class  CommonProxy {
    public void preInit(FMLPreInitializationEvent event) {
    
    BlocksMod.registerBlocks();
    BlocksMod.registerItemBlock();
    
    ItemsMod.register();
    
    // Système de Générération
    OreDictionary.registerOre("AdamantiumOre", new ItemStack(BlocksMod.ADAMANTIUM_ORE));
    OreDictionary.registerOre("SilverOre", new ItemStack(BlocksMod.SILVER_ORE));
    OreDictionary.registerOre("AluminiumOre", new ItemStack(BlocksMod.ALUMINIUM_ORE));
    GameRegistry.registerWorldGenerator(new GenerationHelper(), 2);
    
    }
    
    public void init(FMLInitializationEvent event) {
    
    BlocksMod.registerTextRecipies();
    
    }
    
    }
    

    Merci d'avance aux gens qui voudront m'aider!</init>


  • Rédacteurs

    NPE at fr.jules552.mod.init.ItemsMod.registerRender(ItemsMod.java:197)


  • Administrateurs

    Salut,
    Il faut maintenant passer par l'event ModelRegistryEvent pour les setCustomModelResourceLocation.
    Exemple ici : https://github.com/kevin68/The-Spotlight-Mod/blob/6f4a31bb440f93e51ae01aac52110dc7e24dfd4b/src/fr/mcnanotech/kevin_68/thespotlightmod/TSMEvents.java#L53



  • @'robin4002':

    Salut,
    Il faut maintenant passer par l'event ModelRegistryEvent pour les setCustomModelResourceLocation.
    Exemple ici : https://github.com/kevin68/The-Spotlight-Mod/blob/6f4a31bb440f93e51ae01aac52110dc7e24dfd4b/src/fr/mcnanotech/kevin_68/thespotlightmod/TSMEvents.java#L53

    Merci, ça à l'air de régler mon problème au niveau des items mais il me reste des problèmes pour mes proxy du coup et surtout pour mes blocks

    Voilà la class des blocks modifié, j'ai peut-être oublier de faire un truc alors n'hésite pas à me dire.

    package fr.jules552.mod.init;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.MapColor;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemPickaxe;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.crafting.ShapelessRecipes;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.event.RegistryEvent;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.common.registry.ForgeRegistries;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    import Blocks.AdamantiumMinerai;
    import Blocks.AluminiumMinerai;
    import Blocks.BlockAdamantium;
    import Blocks.BlockAluminium;
    import Blocks.BlockSilver;
    import Blocks.BlockXray;
    import Blocks.LumineuxBlock;
    import Blocks.PadBounceBlue;
    import Blocks.PadBounceGreen;
    import Blocks.PadBounceRed;
    import Blocks.SilverMinerai;
    import Blocks.SpikeBlock;
    import fr.jules552.mod.Reference;
    
    public class BlocksMod
    {
    
    public static final Block ADAMANTIUM_BLOCK = new BlockAdamantium(Material.IRON).setRegistryName("adamantium_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("adamantium_block");
    public static final Block ADAMANTIUM_ORE = new AdamantiumMinerai(Material.ROCK).setRegistryName("adamantium_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("adamantium_ore");
    public static final Block SILVER_BLOCK = new BlockSilver(Material.IRON).setRegistryName("silver_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("silver_block");
    public static final Block SILVER_ORE = new SilverMinerai(Material.ROCK).setRegistryName("silver_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("silver_ore");
    public static final Block ALUMINIUM_BLOCK = new BlockAluminium(Material.ROCK).setRegistryName("aluminium_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("aluminium_block");
    public static final Block ALUMINIUM_ORE = new AluminiumMinerai(Material.ROCK).setRegistryName("aluminium_ore").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("aluminium_ore");
    public static final Block LIGHT_BLOCK = new LumineuxBlock(Material.WEB).setRegistryName("light_block").setCreativeTab(ItemsMod.tabCustomTab).setBlockUnbreakable().setLightLevel(1.0F).setUnlocalizedName("light_block");
    public static final Block XRAY_BLOCK = new BlockXray(Material.GLASS).setRegistryName("xray_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(5.0F).setUnlocalizedName("xray_block");
    public static final Block BOUNCE_PAD_RED = new PadBounceRed().setRegistryName("bounce_pad_red").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_red");
    public static final Block BOUNCE_PAD_BLUE = new PadBounceBlue().setRegistryName("bounce_pad_blue").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_blue");
    public static final Block BOUNCE_PAD_GREEN = new PadBounceGreen().setRegistryName("bounce_pad_green").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("bounce_pad_green");
    public static final Block SPIKE_BLOCK = new SpikeBlock(Material.CLAY).setRegistryName("spike_block").setCreativeTab(ItemsMod.tabCustomTab).setHardness(0.0F).setUnlocalizedName("spike_block");
    
       @SubscribeEvent
       public static void registerBlocks(RegistryEvent.Register <block>event)
       {
           event.getRegistry().register(BlocksMod.ADAMANTIUM_BLOCK);
           event.getRegistry().register(BlocksMod.ADAMANTIUM_ORE);
           event.getRegistry().register(BlocksMod.SILVER_BLOCK);
           event.getRegistry().register(BlocksMod.SILVER_ORE);
           event.getRegistry().register(BlocksMod.ALUMINIUM_BLOCK);
           event.getRegistry().register(BlocksMod.ALUMINIUM_ORE);
           event.getRegistry().register(BlocksMod.LIGHT_BLOCK);
           event.getRegistry().register(BlocksMod.XRAY_BLOCK);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_GREEN);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_BLUE);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_RED);
           event.getRegistry().register(BlocksMod.SPIKE_BLOCK);
       }
    
    public static void registerTextRecipies()
    {
    //Les Crafts
    
    //Crafts pour Adamantium
    GameRegistry.addSmelting(BlocksMod.ADAMANTIUM_ORE, new ItemStack(ItemsMod.adamantium_ingot), 1.8F);
    
    //Crafts pour Silver
    GameRegistry.addSmelting(BlocksMod.SILVER_ORE, new ItemStack(ItemsMod.silver_ingot), 0.8F);
    
    //Crafts pour Aluminium
    GameRegistry.addSmelting(BlocksMod.ALUMINIUM_ORE, new ItemStack(ItemsMod.aluminium_ingot), 0.7F);
    
    }
    
    @SideOnly (Side.CLIENT)
    public static void registerItemBlockModels (){
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ADAMANTIUM_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":adamantium_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ADAMANTIUM_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":adamantium_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SILVER_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":silver_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SILVER_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":silver_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ALUMINIUM_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":aluminium_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (ALUMINIUM_ORE), 0, new ModelResourceLocation (Reference.MOD_ID+":aluminium_ore", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (LIGHT_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":light_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (XRAY_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":xray_block", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_RED), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_red", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_BLUE), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_blue", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (BOUNCE_PAD_GREEN), 0, new ModelResourceLocation (Reference.MOD_ID+":bounce_pad_green", "inventory"));
     ModelLoader.setCustomModelResourceLocation (Item.getItemFromBlock (SPIKE_BLOCK), 0, new ModelResourceLocation (Reference.MOD_ID+":spike_block", "inventory"));
    }
    
     @SubscribeEvent
       public static void registerItemBlock(RegistryEvent.Register event)
       {
        event.getRegistry().register(new ItemBlock(BlocksMod.ADAMANTIUM_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.ADAMANTIUM_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.SILVER_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.SILVER_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.ALUMINIUM_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.ALUMINIUM_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.LIGHT_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.XRAY_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_GREEN));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_BLUE));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_RED));
        event.getRegistry().register(new ItemBlock(BlocksMod.SPIKE_BLOCK));
    
       }
    
    }
    
    

    Sinon du coup j'ai des problèmes dans les proxy, j'arrive jamais à fixer ça seul à chaque fois que j'ai ce type de problème, voilà déjà les erreurs du crash log:

    at fr.jules552.mod.init.BlocksMod.registerBlocks(BlocksMod.java:58)
    at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:15)
    at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    

    et du coup tout les proxy à nouveaux:

    package fr.jules552.mod.proxy;
    
    import fr.jules552.mod.init.ItemsMod;
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import fr.jules552.mod.init.BlocksMod;
    
    public class ClientProxy extends CommonProxy {
    
    @Override
    public void preInit(FMLPreInitializationEvent event) {
    super.preInit(event);
    BlocksMod.registerItemBlockModels();
    ItemsMod.registerRenders();
    
    }
    
    @Override
    public void init(FMLInitializationEvent event) {
    super.init(event);
    
    }
    
    }
    
    
    package fr.jules552.mod.proxy;
    
    import fr.jules552.mod.WorldGeneration.GenerationHelper;
    import fr.jules552.mod.init.BlocksMod;
    import fr.jules552.mod.init.ItemsMod;
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.oredict.OreDictionary;
    
    public abstract class  CommonProxy {
    public void preInit(FMLPreInitializationEvent event) {
    
    BlocksMod.registerBlocks(null);
    BlocksMod.registerItemBlock(null);
    
    ItemsMod.registerItem(null);
    
    // Système de Générération
    OreDictionary.registerOre("AdamantiumOre", new ItemStack(BlocksMod.ADAMANTIUM_ORE));
    OreDictionary.registerOre("SilverOre", new ItemStack(BlocksMod.SILVER_ORE));
    OreDictionary.registerOre("AluminiumOre", new ItemStack(BlocksMod.ALUMINIUM_ORE));
    GameRegistry.registerWorldGenerator(new GenerationHelper(), 2);
    
    }
    
    public void init(FMLInitializationEvent event) {
    
    BlocksMod.registerTextRecipies();
    
    }
    
    }
    
    

    dans Blocksmod.registerBlocks(null), j'ai mis le null car je ne sais pas quoi mettre du coup 😕 donc si quelqu'un peut me dire, c'est surement la source de mes erreurs aussi.

    puis la class adamantium qui est du coup aussi cité dans ce crash log :

    package fr.jules552.mod;
    
    import fr.jules552.mod.WorldGeneration.GenerationHelper;
    import fr.jules552.mod.init.BlocksMod;
    import fr.jules552.mod.init.ItemsMod;
    import fr.jules552.mod.proxy.CommonProxy;
    import net.minecraft.init.Blocks;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.fml.client.registry.ClientRegistry;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    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;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.oredict.OreDictionary;
    
    @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION)
    
    public class Adamantium {
    
    @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
    public static CommonProxy proxy;
    
    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
    proxy.preInit(event);
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event) {
    proxy.init(event);
    }
    
    @EventHandler
    public void postInit(FMLPostInitializationEvent event) {
    
    }
    }
    

    Désolé encore de déranger et ce sont surement des erreurs stupides de ma part, que ce soit des incompréhensions ou je ne sais pas, mais je coince là :/</block>


  • Administrateurs

    Ajoutes : @EventBusSubscriber(modid = ClassePrincipal.MODID)
    au dessus de public class BlocksMod et vires les fonctions BlocksMod.registerBlocks(null);
    BlocksMod.registerItemBlock(null); dans la classe CommonProxy.
    Même chose pour les items.



  • @'robin4002':

    Ajoutes : @EventBusSubscriber(modid = ClassePrincipal.MODID)
    au dessus de  public class BlocksMod  et vires les fonctions BlocksMod.registerBlocks(null);
           BlocksMod.registerItemBlock(null); dans la classe CommonProxy.
    Même chose pour les items.

    J'ai fait tout ce que tu m'as dis, ça a apparemment réglé pas mal d'erreur sauf qu'il me reste ça comme erreurs:

    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at fr.jules552.mod.init.BlocksMod.registerItemBlock(BlocksMod.java:111)
    

    qui concerne surement donc:

     @SubscribeEvent
       public static void registerItemBlock(RegistryEvent.Register event)
       {
        event.getRegistry().register(new ItemBlock(BlocksMod.ADAMANTIUM_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.ADAMANTIUM_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.SILVER_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.SILVER_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.ALUMINIUM_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.ALUMINIUM_ORE));
        event.getRegistry().register(new ItemBlock(BlocksMod.LIGHT_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.XRAY_BLOCK));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_GREEN));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_BLUE));
        event.getRegistry().register(new ItemBlock(BlocksMod.BOUNCE_PAD_RED));
        event.getRegistry().register(new ItemBlock(BlocksMod.SPIKE_BLOCK));
    
       }
    

    Une erreur surement de ma part dans la méthode pour faire des ItemBlock mais je ne fais que supposer, tu as une idée de où ça viendrait ?


  • Administrateurs

    Le bloc sont surement null lorsque tu cherches à les enregistrer.



  • @'robin4002':

    Le bloc sont surement null lorsque tu cherches à les enregistrer.

    c'est à dire ? J'ai du mal à comprendre sur ce point là, tu pourrais m'expliquer un peu ? car déjà j'arrive pas à comprendre comment tu peux enregistrer les blocs si tu les mets pas dans le commonproxy.
    Et du coup, quel serait la solution pour régler ça ?


  • Administrateurs

    Tu peux envoyer le crash complet ? Car en fait les blocs ne peuvent pas être null comme ce sont des constantes.

    Le bloc est enregistré car la fonction est appelé par forge grâce au @SubscribeEvent. Je te conseil d'aller voir le tutoriel sur les événements.



  • @'robin4002':

    Tu peux envoyer le crash complet ? Car en fait les blocs ne peuvent pas être null comme ce sont des constantes.

    Le bloc est enregistré car la fonction est appelé par forge grâce au  @SubscribeEvent. Je te conseil d'aller voir le tutoriel sur les événements.

    J'irai checker ce tutoriel, j'ai jamais trop touché aux events donc pour ça que c'est assez perturbent pour moi.

    tient voilà le crash log entier:

    2017-07-14 16:44:19,075 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 16:44:19,079 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [16:44:19] [main/INFO] [GradleStart]: Extra: []
    [16:44:19] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Zules perrin/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [16:44:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [16:44:19] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2387 for Minecraft 1.12 loading
    [16:44:19] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_121
    [16:44:19] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [16:44:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [16:44:19] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [16:44:19] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [16:44:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [16:44:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    2017-07-14 16:44:19,574 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 16:44:19,840 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 16:44:19,841 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [16:44:19] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [16:44:21] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [16:44:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [16:44:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [16:44:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [16:44:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [16:44:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [16:44:21] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [16:44:22] [main/INFO]: Setting user: Player995
    [16:44:25] [main/WARN]: Skipping bad option: lastServer:
    [16:44:25] [main/INFO]: LWJGL Version: 2.9.4
    [16:44:28] [main/INFO] [FML]: – System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 675144312 bytes (643 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    [16:44:28] [main/INFO] [FML]: MinecraftForge v14.21.1.2387 Initialized
    [16:44:28] [main/INFO] [FML]: Replaced 921 ore ingredients
    [16:44:28] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [16:44:28] [main/INFO] [FML]: Searching C:\Users\Zules perrin\Desktop\Forge 1.12\run\mods for mods
    [16:44:29] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [16:44:29] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at CLIENT
    [16:44:29] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at SERVER
    [16:44:30] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 76981243 nanos
    [16:44:30] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamantium
    [16:44:30] [main/INFO] [FML]: Processing ObjectHolder annotations
    [16:44:30] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
    [16:44:30] [main/INFO] [FML]: Identifying ItemStackHolder annotations
    [16:44:30] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
    [16:44:30] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
    [16:44:30] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AdamantiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:16)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [16:44:30] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name SilverOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:17)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [16:44:30] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AluminiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [16:44:30] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:18)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [16:44:30] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [16:44:30] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [16:44:30] [main/WARN] [FML]: ****************************************
    [16:44:30] [main/INFO] [FML]: Applying holder lookups
    [16:44:30] [main/INFO] [FML]: Holder lookups applied
    [16:44:30] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@4d829889:
    java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@4b0393ee.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864) ~[guava-21.0.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110) ~[ForgeRegistry.class:?]
    at fr.jules552.mod.init.BlocksMod.registerItemBlock(BlocksMod.java:111) ~[BlocksMod.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerItemBlock_Register.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:693) [GameData.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673) [GameData.class:?]
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:508) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:416) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?: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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
    [16:44:30] [main/ERROR] [FML]: Index: 3 Listeners:
    [16:44:30] [main/ERROR] [FML]: 0: NORMAL
    [16:44:30] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@5a42bb6
    [16:44:30] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@47f74d8f
    [16:44:30] [main/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@7dd6aa3e
    [16:44:30] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: –-- Minecraft Crash Report ----
    // This doesn't make any sense!
    
    Time: 7/14/17 4:44 PM
    Description: Initializing game
    
    java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@4b0393ee.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at fr.jules552.mod.init.BlocksMod.registerItemBlock(BlocksMod.java:111)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerItemBlock_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:693)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at fr.jules552.mod.init.BlocksMod.registerItemBlock(BlocksMod.java:111)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerItemBlock_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:693)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
    
    -- System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 655084816 bytes (624 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.40 Powered by Forge 14.21.1.2387 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH minecraft{1.12} [Minecraft] (minecraft.jar)
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2387.jar)
    UCH forge{14.21.1.2387} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2387.jar)
    UCH adamantium{1.0.0} [Adamantium] (bin)
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    Launched Version: 1.12
    LWJGL: 2.9.4
    OpenGL: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.5.0 NVIDIA 384.76, 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)
    CPU: 8x Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    [16:44:30] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Zules perrin\Desktop\Forge 1.12\run\.\crash-reports\crash-2017-07-14_16.44.30-client.txt
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    
    

  • Administrateurs

    Ah c'est mieux avec l'erreur complète :
    java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@4b0393ee.
    Il faut donner un nom de registre au itembloc (le même que le bloc).

    Exemple :
    event.getRegistry().register(new ItemBlock(TheSpotLightMod.SPOTLIGHT).setRegistryName("tsm_spotlight"));



  • @'robin4002':

    Ah c'est mieux avec l'erreur complète :
    java.lang.NullPointerException: Can't use a null-name for the registry, object net.minecraft.item.ItemBlock@4b0393ee.
    Il faut donner un nom de registre au itembloc (le même que le bloc).

    Exemple :
    event.getRegistry().register(new ItemBlock(TheSpotLightMod.SPOTLIGHT).setRegistryName("tsm_spotlight"));

    ça crash toujours, voici le crash log:

    2017-07-14 17:04:59,579 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:04:59,582 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [17:04:59] [main/INFO] [GradleStart]: Extra: []
    [17:04:59] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Zules perrin/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [17:04:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:04:59] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2387 for Minecraft 1.12 loading
    [17:04:59] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_121
    [17:04:59] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [17:04:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:04:59] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [17:04:59] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [17:04:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:04:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    2017-07-14 17:05:00,108 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:05:00,382 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:05:00,383 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [17:05:00] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [17:05:01] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [17:05:01] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [17:05:01] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:05:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:05:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:05:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:05:02] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [17:05:03] [main/INFO]: Setting user: Player482
    [17:05:06] [main/WARN]: Skipping bad option: lastServer:
    [17:05:06] [main/INFO]: LWJGL Version: 2.9.4
    [17:05:08] [main/INFO] [FML]: – System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 677492816 bytes (646 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    [17:05:08] [main/INFO] [FML]: MinecraftForge v14.21.1.2387 Initialized
    [17:05:08] [main/INFO] [FML]: Replaced 921 ore ingredients
    [17:05:08] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [17:05:08] [main/INFO] [FML]: Searching C:\Users\Zules perrin\Desktop\Forge 1.12\run\mods for mods
    [17:05:09] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [17:05:09] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at CLIENT
    [17:05:09] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at SERVER
    [17:05:10] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamantium
    [17:05:10] [main/INFO] [FML]: Processing ObjectHolder annotations
    [17:05:10] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
    [17:05:10] [main/INFO] [FML]: Identifying ItemStackHolder annotations
    [17:05:10] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
    [17:05:10] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
    [17:05:10] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AdamantiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:16)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:05:10] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name SilverOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:17)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:05:10] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AluminiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:05:10] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:18)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:05:10] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:05:10] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:05:10] [main/WARN] [FML]: ****************************************
    [17:05:10] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 61206888 nanos
    [17:05:10] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@298f8835:
    java.lang.NullPointerException: Can't use a null-name for the registry, object Block{null}.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864) ~[guava-21.0.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110) ~[ForgeRegistry.class:?]
    at fr.jules552.mod.init.BlocksMod.registerBlocks(BlocksMod.java:61) ~[BlocksMod.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerBlocks_Register.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:688) [GameData.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673) [GameData.class:?]
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:508) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:416) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?: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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
    [17:05:10] [main/ERROR] [FML]: Index: 3 Listeners:
    [17:05:10] [main/ERROR] [FML]: 0: NORMAL
    [17:05:10] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@5eab0592
    [17:05:10] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@ed8a7ab
    [17:05:10] [main/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@5afefa87
    [17:05:10] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: –-- Minecraft Crash Report ----
    // Don't be sad, have a hug! <3
    
    Time: 7/14/17 5:05 PM
    Description: Initializing game
    
    java.lang.NullPointerException: Can't use a null-name for the registry, object Block{null}.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at fr.jules552.mod.init.BlocksMod.registerBlocks(BlocksMod.java:61)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:688)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:272)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:266)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:110)
    at fr.jules552.mod.init.BlocksMod.registerBlocks(BlocksMod.java:61)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_BlocksMod_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:688)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:673)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:605)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:266)
    at net.minecraft.client.Minecraft.init(Minecraft.java:508)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:416)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
    
    -- System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 656221808 bytes (625 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.40 Powered by Forge 14.21.1.2387 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH minecraft{1.12} [Minecraft] (minecraft.jar) 
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2387.jar) 
    UCH forge{14.21.1.2387} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2387.jar) 
    UCH adamantium{1.0.0} [Adamantium] (bin) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    Launched Version: 1.12
    LWJGL: 2.9.4
    OpenGL: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.5.0 NVIDIA 384.76, 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)
    CPU: 8x Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    [17:05:10] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Zules perrin\Desktop\Forge 1.12\run\.\crash-reports\crash-2017-07-14_17.05.10-client.txt
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    

    mais la raison a apparemment changer et concerne cette partie:

      @SubscribeEvent
       public static void registerBlocks(RegistryEvent.Register <block>event)
       {
           event.getRegistry().register(BlocksMod.ADAMANTIUM_BLOCK);
           event.getRegistry().register(BlocksMod.ADAMANTIUM_ORE);
           event.getRegistry().register(BlocksMod.SILVER_BLOCK);
           event.getRegistry().register(BlocksMod.SILVER_ORE);
           event.getRegistry().register(BlocksMod.ALUMINIUM_BLOCK);
           event.getRegistry().register(BlocksMod.ALUMINIUM_ORE);
           event.getRegistry().register(BlocksMod.LIGHT_BLOCK);
           event.getRegistry().register(BlocksMod.XRAY_BLOCK);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_GREEN);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_BLUE);
           event.getRegistry().register(BlocksMod.BOUNCE_PAD_RED);
           event.getRegistry().register(BlocksMod.SPIKE_BLOCK);
       }
    ```</block>

  • Administrateurs

    La raison est la même, tes blocs n'ont pas de nom de registre.
    Il faut leur en donner un.



  • @'robin4002':

    La raison est la même, tes blocs n'ont pas de nom de registre.
    Il faut leur en donner un.

    Bon ça s'arrête enfin de crash, par contre j'ai 2 problèmes, le premier c'est que du coup les textures sur les blocks ne s'appliquent pas (uniquement l'item du block) , et le second c'est que les items n'apparaissent carrément pas. Tu aurais une idée d'où ça vient ?

    je poste toujours la log au cas où:

    2017-07-14 17:56:18,186 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:56:18,190 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [17:56:18] [main/INFO] [GradleStart]: Extra: []
    [17:56:18] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Zules perrin/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [17:56:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:56:18] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2387 for Minecraft 1.12 loading
    [17:56:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_121
    [17:56:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [17:56:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:56:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [17:56:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [17:56:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:56:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    2017-07-14 17:56:18,720 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:56:18,993 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-07-14 17:56:18,994 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [17:56:19] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [17:56:20] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [17:56:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [17:56:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:56:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:56:20] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:56:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:56:20] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [17:56:21] [main/INFO]: Setting user: Player986
    [17:56:24] [main/WARN]: Skipping bad option: lastServer:
    [17:56:24] [main/INFO]: LWJGL Version: 2.9.4
    [17:56:27] [main/INFO] [FML]: – System Details --
    Details:
    Minecraft Version: 1.12
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 676803680 bytes (645 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 384.76' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    [17:56:27] [main/INFO] [FML]: MinecraftForge v14.21.1.2387 Initialized
    [17:56:27] [main/INFO] [FML]: Replaced 921 ore ingredients
    [17:56:27] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [17:56:27] [main/INFO] [FML]: Searching C:\Users\Zules perrin\Desktop\Forge 1.12\run\mods for mods
    [17:56:28] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [17:56:28] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at CLIENT
    [17:56:28] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, adamantium] at SERVER
    [17:56:29] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Adamantium
    [17:56:29] [main/INFO] [FML]: Processing ObjectHolder annotations
    [17:56:29] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 67835850 nanos
    [17:56:29] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
    [17:56:29] [main/INFO] [FML]: Identifying ItemStackHolder annotations
    [17:56:29] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
    [17:56:29] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
    [17:56:29] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AdamantiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:16)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:56:29] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name SilverOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:17)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:56:29] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/WARN] [FML]: * Invalid registration attempt for an Ore Dictionary item with name AluminiumOre has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:619)
    [17:56:29] [main/WARN] [FML]: *  at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:605)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.CommonProxy.preInit(CommonProxy.java:18)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.proxy.ClientProxy.preInit(ClientProxy.java:16)
    [17:56:29] [main/WARN] [FML]: *  at fr.jules552.mod.Adamantium.preInit(Adamantium.java:31)
    [17:56:29] [main/WARN] [FML]: *  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
    [17:56:29] [main/WARN] [FML]: ****************************************
    [17:56:29] [main/INFO] [FML]: Applying holder lookups
    [17:56:29] [main/INFO] [FML]: Holder lookups applied
    [17:56:29] [main/INFO] [FML]: Applying holder lookups
    [17:56:29] [main/INFO] [FML]: Holder lookups applied
    [17:56:29] [main/INFO] [FML]: Applying holder lookups
    [17:56:29] [main/INFO] [FML]: Holder lookups applied
    [17:56:29] [main/INFO] [FML]: Applying holder lookups
    [17:56:29] [main/INFO] [FML]: Holder lookups applied
    [17:56:29] [main/INFO] [FML]: Injecting itemstacks
    [17:56:29] [main/INFO] [FML]: Itemstack injection complete
    [17:56:30] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
    [17:56:33] [main/WARN]: File adamantium:sounds/records/adamantiumdisk.ogg does not exist, cannot add it to event adamantium:records.adamantiumdisk
    [17:56:33] [main/WARN]: File adamantium:sounds/records/cartekiwi.ogg does not exist, cannot add it to event adamantium:records.cartekiwi
    [17:56:33] [Sound Library Loader/INFO]: Starting up SoundSystem…
    [17:56:33] [Thread-5/INFO]: Initializing LWJGL OpenAL
    [17:56:33] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [17:56:33] [Thread-5/INFO]: OpenAL initialized.
    [17:56:33] [Sound Library Loader/INFO]: Sound engine started
    [17:56:38] [main/INFO] [FML]: Max texture size: 16384
    [17:56:38] [main/INFO]: Created: 512x512 textures-atlas
    [17:56:39] [main/ERROR] [FML]: Parsing error loading recipe adamantium:adamantium_axe
    com.google.gson.JsonSyntaxException: Unknown recipe type: adamantium:crafting_shaped
    at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:400) ~[CraftingHelper.class:?]
    at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$21(CraftingHelper.java:702) ~[CraftingHelper.class:?]
    at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:790) ~[CraftingHelper.class:?]
    at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:659) ~[CraftingHelper.class:?]
    at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_121]
    at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:614) [CraftingHelper.class:?]
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:779) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:343) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:576) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:416) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?: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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
    [17:56:39] [main/INFO] [FML]: Injecting itemstacks
    [17:56:39] [main/INFO] [FML]: Itemstack injection complete
    [17:56:39] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
    [17:56:39] [main/WARN]: Skipping bad option: lastServer:
    [17:56:39] [main/INFO]: Narrator library for x64 successfully loaded
    [17:56:43] [Server thread/INFO]: Starting integrated minecraft server version 1.12
    [17:56:43] [Server thread/INFO]: Generating keypair
    [17:56:43] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
    [17:56:43] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
    [17:56:43] [Server thread/INFO] [FML]: Applying holder lookups
    [17:56:43] [Server thread/INFO] [FML]: Holder lookups applied
    [17:56:43] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1f79699c)
    [17:56:44] [Server thread/INFO]: Loaded 488 advancements
    [17:56:44] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1f79699c)
    [17:56:44] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1f79699c)
    [17:56:44] [Server thread/INFO]: Preparing start region for level 0
    [17:56:45] [Server thread/INFO]: Preparing spawn area: 72%
    [17:56:45] [Server thread/INFO]: Changing view distance to 16, from 10
    [17:56:55] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
    [17:56:55] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
    [17:56:55] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : minecraft@1.12,FML@8.0.99.99,forge@14.21.1.2387,mcp@9.19,adamantium@1.0.0
    [17:56:55] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
    [17:56:55] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
    [17:56:55] [Server thread/INFO]: Player986[local:E:b1513204] logged in with entity id 207 at (158.473201625284, 79.6080113930134, 257.22580979584893)
    [17:56:55] [Server thread/INFO]: Player986 joined the game
    [17:56:55] [Server thread/INFO]: Saving and pausing game…
    [17:56:55] [Server thread/INFO]: Saving chunks for level 'New World'/overworld
    [17:56:56] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
    [17:56:56] [Server thread/INFO]: Saving chunks for level 'New World'/the_end
    [17:56:56] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@566838a9[id=ad740e1c-84c3-3b16-9064-6e382083a878,name=Player986,properties={},legacy=false]
    com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
    at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3156) [Minecraft.class:?]
    at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_121]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_121]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
    [17:57:30] [main/INFO]: Loaded 5 advancements
    [17:57:34] [main/INFO]: Loaded 24 advancements
    [17:57:42] [main/INFO]: Loaded 27 advancements
    [17:58:40] [main/INFO]: Stopping!
    [17:58:41] [Server thread/INFO]: Stopping server
    [17:58:41] [Server thread/INFO]: Saving players
    [17:58:41] [Server thread/INFO]: Saving worlds
    [17:58:41] [Server thread/INFO]: Saving chunks for level 'New World'/overworld
    [17:58:41] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
    [17:58:41] [Server thread/INFO]: Saving chunks for level 'New World'/the_end
    [17:58:41] [Server thread/INFO] [FML]: Unloading dimension 0
    [17:58:41] [Server thread/INFO] [FML]: Unloading dimension -1
    [17:58:41] [Server thread/INFO] [FML]: Unloading dimension 1
    [17:58:41] [main/INFO]: SoundSystem shutting down…
    [17:58:41] [Server thread/INFO] [FML]: Applying holder lookups
    [17:58:41] [Server thread/INFO] [FML]: Holder lookups applied
    [17:58:41] [main/WARN]: Author: Paul Lamb, www.paulscode.com
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    
    

  • Administrateurs

    Pour les blocs, est-ce que tu as bien les fichiers json dans le dossier assets/modid/blockstates ?
    Pour les items, est-ce que tu as bien mis la ligne @EventBusSubscriber(modid = ClassePrincipal.MODID) au dessus de la classe des items ?



  • @'robin4002':

    Pour les blocs, est-ce que tu as bien les fichiers json dans le dossier assets/modid/blockstates ?
    Pour les items, est-ce que tu as bien mis la ligne  @EventBusSubscriber(modid = ClassePrincipal.MODID) au dessus de la classe des items ?

    J'avais effectivement oublié le @EventBusSubscriber(modid = ClassePrincipal.MODID) pour les items, mais par contre j'ai bien les blockstats etc.. et j'ai vérifié, leur synthaxe est bonne. J'ai le même problème avec les items, d'ailleurs choses étonnante, "adamantium_ingot" est le seul item a avoir une texture, mais qui n'est la bonne et qui est celle des "silver_boots". J'ai bien vérifié, il n'y a aucune erreur dans les noms qui aurait pu inverser les deux donc j'ai du mal à voir le problème.



  • Si possible, mets tout sur github (ça prend 5 minutes), qu'on puisse voir l'erreur rapidement.



  • https://github.com/jules552/Adamantium

    Normalement ça devrait être bon



  • @'Dylem':

    Si possible, mets tout sur github (ça prend 5 minutes), qu'on puisse voir l'erreur rapidement.

    https://github.com/jules552/Adamantium

    Voilà



  • Tu devrais utiliser les events pour tes modèles aussi. En attendant de faire un tutoriel, je te mets ma classe d'items pour que tu puisses t'en inspirer :

    
    package net.dylem.test_mod.init;
    
    import java.util.HashSet;
    
    import net.dylem.test_mod.client.renderer.MeshDefinitionFix;
    import net.dylem.test_mod.item.ItemBasic;
    import net.dylem.test_mod.item.ItemTestMod;
    import net.minecraft.client.renderer.ItemMeshDefinition;
    import net.minecraft.client.renderer.block.model.ModelBakery;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.item.Item;
    import net.minecraftforge.client.event.ModelRegistryEvent;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.event.RegistryEvent;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.registries.IForgeRegistry;
    
    /*
    * Déclare et instancie les items du mod
    */
    public class ModItems {
    
    public static final ItemBasic ITEM_BASIC = new ItemBasic("item_basic");
    
    /*
    * Contient tous les items enregistrés
    * HashSet -> pas de doublons
    */
    public static final HashSet <itemtestmod>REGISTERED_ITEMS = new HashSet();
    
    /*
    * Enregistre les items
    * Classe automatiquement abonnée à MinecraftForge.EVENT_BUS
    */
    @Mod.EventBusSubscriber
    public static class RegistrationHandler {
    
    /*
    * Enregistre les items
    * @param event L'évènement
    */
    @SubscribeEvent
    public static void registerItems(final RegistryEvent.Register event) {
    
    // Contient tous les items du mod, pas encore enregistrés
    final ItemTestMod[] items = {
    ITEM_BASIC,
    };
    
    final IForgeRegistry registry = event.getRegistry();
    
    /*
    * Pour chaque item, on l'enregistre à l'aide de l'évènement
    * Puis on l'ajoute au set d'item enregistrés, pour plus tard enregistrer son modèle
    */
    for(final ItemTestMod item : items) {
    registry.register(item);
    REGISTERED_ITEMS.add(item);
    }
    }
    }
    
    /*
    * Enregistre les modèles des items
    * Classe automatiquement abonnée à MinecraftForge.EVENT_BUS côté CLIENT
    */
    @Mod.EventBusSubscriber(Side.CLIENT)
    public static class ModelHandler {
    
    private static final ModelHandler INSTANCE = new ModelHandler();
    
    /*
    * Enregistre les modèles des items
    * @Param event L'évènement
    */
    @SubscribeEvent
    public static void registerItemModels(final ModelRegistryEvent event) {
    
    REGISTERED_ITEMS.forEach(item -> INSTANCE.registerItemModel(item, item.getStringRegistryName()));
    }
    
    /*
    * Enregistre le modèle d'un item
    * Etape 1 : Transforme le paramètre modelLocation en localisation complète de l'item
    * @Param item L'item
    * @Param modelLocation Le nom de l'item dans le registre
    */
    private void registerItemModel(final ItemTestMod item, final String modelLocation) {
    
    final ModelResourceLocation fullModelLocation = new ModelResourceLocation(modelLocation, "inventory");
    registerItemModel(item, fullModelLocation);
    }
    
    /*
    * Enregistre le modèle d'un item
    * Permet de récupérer la meshDefinition de l'item
    * @Param item L'item
    * @Param modelLocation la localisation complète de l'item
    */
    private void registerItemModel(final ItemTestMod item, final ModelResourceLocation fullModelLocation) {
    
    ModelBakery.registerItemVariants(item, fullModelLocation);
    registerItemModel(item, MeshDefinitionFix.create(stack -> fullModelLocation));
    }
    
    /*
    * Enregistre le modèle d'un item
    * @Param item L'item
    * @Param meshDefinition la meshDefinition de l'item
    */
    private void registerItemModel(final ItemTestMod item, final ItemMeshDefinition meshDefinition) {
    
    ModelLoader.setCustomMeshDefinition(item, meshDefinition);
    }
    }
    }
    
    ```</itemtestmod>