1.12.2 Plantation



  • Bonjour,
    Je suis en train de créer une plantation, je n'ai aucune erreur sauf que le jeu crash lors du lancement.
    J'ai l'erreur "java.lang.NullPointerException: Can't use a null-name for the registry, object Block{minecraft:air}." Pourtant je ne vois pas où j'ai pu faire d'erreur...
    Voici la class des blocs :

    public class BlocksMod {
    	
    	public static Block rubis_ore;
    	public static Block rubis_block;
    	public static Block cobalt_ore;
    	public static Block cobalt_block;
    	public static Block cave_block;
    	public static Block stonebrick_black_stairs;	
    	public static Block stonebrick_black;
    	public static BlockSlab stonebrick_black_slab_half;
    	public static BlockSlab stonebrick_black_slab_double;
    	public static Block fraisecrop;
    	//HARDENED BLOCS
    	public static Block hardened_obsidian;
    	public static void init() 
    	{
    		rubis_ore = new RubisOre("rubis_ore", Material.ROCK);
    		rubis_block = new RubisBlock("rubis_block", Material.ROCK);
    		
    		hardened_obsidian = new HardenedObsidian("hardened_obsidian", Material .ROCK);
    
    		fraisecrop = new BlockFraise("fraisecrop");
    
    		cobalt_ore = new CobaltOre("cobalt_ore", Material.ROCK);
    		cobalt_block = new CobaltBlock("cobalt_block", Material.ROCK);
    		
    		stonebrick_black = new StoneBrickBlack("stonebrick_black", Material.ROCK);
    		cave_block = new CaveBlock("cave_block", Material.GLASS);
    		stonebrick_black_stairs = new StoneBrickStairs("stonebrick_black_stairs", stonebrick_black.getDefaultState() );
    		stonebrick_black_slab_half = new BlockSlabHalfBase("stonebrick_black_slab_half", Material.ROCK, Drunly.drunlytab, BlocksMod.stonebrick_black_slab_half, BlocksMod.stonebrick_black_slab_double);
    		stonebrick_black_slab_double = new BlockSlabDoubleBase("stonebrick_black_slab_double", Material.ROCK, Drunly.drunlytab, BlocksMod.stonebrick_black_slab_double);
    
    	}
    	@SubscribeEvent
    	public static void registerBlocks(RegistryEvent.Register<Block> event)
    	{
    		event.getRegistry().registerAll(rubis_ore);
    		event.getRegistry().registerAll(fraisecrop);
    		event.getRegistry().registerAll(rubis_block);	
    		event.getRegistry().registerAll(cobalt_ore);
    		event.getRegistry().registerAll(hardened_obsidian);
    		event.getRegistry().registerAll(cobalt_block);
    		event.getRegistry().registerAll(stonebrick_black);
    		event.getRegistry().registerAll(cave_block);
    		event.getRegistry().registerAll(stonebrick_black_stairs);
    		event.getRegistry().registerAll(stonebrick_black_slab_half);
    		event.getRegistry().registerAll(stonebrick_black_slab_double);
    	}
    
    	@SubscribeEvent
    	public static void registerItemBlocks(RegistryEvent.Register<Item> event)
    	{
    		event.getRegistry().registerAll(
    				new ItemBlock(fraisecrop).setRegistryName(fraisecrop.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(rubis_ore).setRegistryName(rubis_ore.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(rubis_block).setRegistryName(rubis_block.getRegistryName())
    				);	
    		event.getRegistry().registerAll(
    				new ItemBlock(cobalt_ore).setRegistryName(cobalt_ore.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(cobalt_block).setRegistryName(cobalt_block.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(cave_block).setRegistryName(cave_block.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(stonebrick_black_stairs).setRegistryName(stonebrick_black_stairs.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(stonebrick_black).setRegistryName(stonebrick_black.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(stonebrick_black_slab_half).setRegistryName(stonebrick_black_slab_half.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(stonebrick_black_slab_double).setRegistryName(stonebrick_black_slab_double.getRegistryName())
    				);
    		event.getRegistry().registerAll(
    				new ItemBlock(hardened_obsidian).setRegistryName(hardened_obsidian.getRegistryName())
    				);
    
    		
    	}
    
    	@SubscribeEvent
    	public static void registerRenders(ModelRegistryEvent event)
    	{
    		registerRender(Item.getItemFromBlock(rubis_ore));
    		registerRender(Item.getItemFromBlock(fraisecrop));
    		registerRender(Item.getItemFromBlock(rubis_block));
    		registerRender(Item.getItemFromBlock(cobalt_block));
    		registerRender(Item.getItemFromBlock(cobalt_ore));
    		registerRender(Item.getItemFromBlock(cave_block));
    		registerRender(Item.getItemFromBlock(stonebrick_black));
    		registerRender(Item.getItemFromBlock(stonebrick_black_stairs));
    		registerRender(Item.getItemFromBlock(stonebrick_black_slab_half));
    		registerRender(Item.getItemFromBlock(stonebrick_black_slab_double));
    		registerRender(Item.getItemFromBlock(hardened_obsidian));
    	}
    
    	private static void registerRender(Item item)
    	{
    		ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "Inventory"));
    	}
    }
    

    Celle du BlockFraise :

    public class BlockFraise extends BlockCrops {
    	 public BlockFraise(String name)
    	    {
    	        this.setDefaultState(this.blockState.getBaseState().withProperty(this.getAgeProperty(), Integer.valueOf(0)));
    	        this.setCreativeTab(Drunly.drunlytab);
    	        this.setUnlocalizedName(name);
    	        this.setHardness(0.0F);
    	        this.setSoundType(SoundType.PLANT);
    	        this.disableStats();
    	    }
    
    
    	@Override
        protected Item getSeed() {
            return ItemMod.fraise_seed;
        }
     
        @Override
        protected Item getCrop() {
            return ItemMod.fraise;
        }
        
        protected PropertyInteger getAgeProperty()
        {
            return AGE;
        }
    
        public int getMaxAge()
        {
            return 7;
        }
    }
    
    

    Le crash report :

    [21:46:43] [main/INFO] [GradleStart]: Extra: []
    [21:46:43] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Mickael/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [21:46:43] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [21:46:43] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [21:46:43] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [21:46:43] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [21:46:43] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2847 for Minecraft 1.12.2 loading
    [21:46:43] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_241, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_241
    [21:46:43] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory.
    [21:46:43] [main/ERROR] [FML]: Full: C:\Users\Mickael\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar
    [21:46:43] [main/ERROR] [FML]: Trimmed: c:/users/mickael/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/
    [21:46:43] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [21:46:43] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs.
    2020-05-17 21:46:44,629 main WARN Disabling terminal, you're running in an unsupported environment.
    [21:46:44] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
    [21:46:44] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
    [21:46:44] [main/INFO] [FML]: Searching C:\Users\Mickael\Documents\WORKSPACE-ECLIPSE\DrunlyMod\run\.\mods for mods
    [21:46:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [21:46:44] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [21:46:44] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [21:46:44] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [21:46:44] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [21:46:44] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [21:46:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [21:46:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [21:46:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [21:46:46] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [21:46:46] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [21:46:46] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [21:46:46] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [21:46:46] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [21:46:46] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [21:46:46] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [21:46:47] [Client thread/INFO] [minecraft/Minecraft]: Setting user: Player366
    [21:46:50] [Client thread/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer:
    [21:46:50] [Client thread/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4
    [21:46:51] [Client thread/INFO] [FML]: -- System Details --
    Details:
    	Minecraft Version: 1.12.2
    	Operating System: Windows 10 (amd64) version 10.0
    	Java Version: 1.8.0_241, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 1230888136 bytes (1173 MB) / 1345847296 bytes (1283 MB) up to 3817865216 bytes (3641 MB)
    	JVM Flags: 2 total; -Xms512M -Xmx4096M
    	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    	FML: 
    	Loaded coremods (and transformers): 
    	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 445.87' Renderer: 'GeForce GTX 1060 3GB/PCIe/SSE2'
    [21:46:51] [Client thread/INFO] [FML]: MinecraftForge v14.23.5.2847 Initialized
    [21:46:51] [Client thread/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
    [21:46:51] [Client thread/INFO] [FML]: Invalid recipe found with multiple oredict ingredients in the same ingredient...
    [21:46:51] [Client thread/INFO] [FML]: Replaced 1227 ore ingredients
    [21:46:52] [Client thread/INFO] [FML]: Searching C:\Users\Mickael\Documents\WORKSPACE-ECLIPSE\DrunlyMod\run\.\mods for mods
    [21:46:53] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [21:46:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, drunly] at CLIENT
    [21:46:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, drunly] at SERVER
    [21:46:53] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 134648500 nanos
    [21:46:53] [Client thread/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:DrunlyMod
    [21:46:54] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [21:46:54] [Client thread/INFO] [FML]: Found 1168 ObjectHolder annotations
    [21:46:54] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
    [21:46:54] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
    [21:46:54] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [21:46:54] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [21:46:54] [Client thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@4d78dd9d:
    java.lang.NullPointerException: Can't use a null-name for the registry, object Block{minecraft:air}.
    	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864) ~[guava-21.0.jar:?]
    	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:294) ~[ForgeRegistry.class:?]
    	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:288) ~[ForgeRegistry.class:?]
    	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:120) ~[ForgeRegistry.class:?]
    	at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:161) ~[ForgeRegistry.class:?]
    	at fr.hybridetv.drunly.init.BlocksMod.registerBlocks(BlocksMod.java:66) ~[BlocksMod.class:?]
    	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_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:144) ~[EventBus$1.class:?]
    	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
    	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:847) [GameData.class:?]
    	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:630) [Loader.class:?]
    	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) [FMLClientHandler.class:?]
    	at net.minecraft.client.Minecraft.init(Minecraft.java:514) [Minecraft.class:?]
    	at net.minecraft.client.Minecraft.run(Minecraft.java:422) [Minecraft.class:?]
    	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	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_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    	at GradleStart.main(GradleStart.java:25) [start/:?]
    [21:46:54] [Client thread/ERROR] [FML]: Index: 3 Listeners:
    [21:46:54] [Client thread/ERROR] [FML]: 0: NORMAL
    [21:46:54] [Client thread/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@698df5e8
    [21:46:54] [Client thread/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@32317a37
    [21:46:54] [Client thread/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@1727d525
    [21:46:54] [Client thread/ERROR] [FML]: 4: net.minecraftforge.fml.common.eventhandler.EventBus$1@1f7b7ac4
    [21:46:54] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
    // I let you down. Sorry :(
    
    Time: 5/17/20 9:46 PM
    Description: Initializing game
    
    java.lang.NullPointerException: Can't use a null-name for the registry, object Block{minecraft:air}.
    	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:294)
    	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:288)
    	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:120)
    	at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:161)
    	at fr.hybridetv.drunly.init.BlocksMod.registerBlocks(BlocksMod.java:66)
    	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_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:144)
    	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:847)
    	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:630)
    	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
    	at net.minecraft.client.Minecraft.init(Minecraft.java:514)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:422)
    	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:25)
    
    
    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:294)
    	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:288)
    	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:120)
    	at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:161)
    	at fr.hybridetv.drunly.init.BlocksMod.registerBlocks(BlocksMod.java:66)
    	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_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:144)
    	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:847)
    	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:630)
    	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
    	at net.minecraft.client.Minecraft.init(Minecraft.java:514)
    
    -- Initialization --
    Details:
    Stacktrace:
    	at net.minecraft.client.Minecraft.run(Minecraft.java:422)
    	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:25)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.12.2
    	Operating System: Windows 10 (amd64) version 10.0
    	Java Version: 1.8.0_241, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 803741000 bytes (766 MB) / 1345847296 bytes (1283 MB) up to 3817865216 bytes (3641 MB)
    	JVM Flags: 2 total; -Xms512M -Xmx4096M
    	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    	FML: MCP 9.42 Powered by Forge 14.23.5.2847 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
    
    	| State | ID        | Version      | Source                           | Signature |
    	|:----- |:--------- |:------------ |:-------------------------------- |:--------- |
    	| LCH   | minecraft | 1.12.2       | minecraft.jar                    | None      |
    	| LCH   | mcp       | 9.42         | minecraft.jar                    | None      |
    	| LCH   | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.5.2847.jar | None      |
    	| LCH   | forge     | 14.23.5.2847 | forgeSrc-1.12.2-14.23.5.2847.jar | None      |
    	| LCH   | drunly    | 1.0          | bin                              | None      |
    
    	Loaded coremods (and transformers): 
    	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 445.87' Renderer: 'GeForce GTX 1060 3GB/PCIe/SSE2'
    	Launched Version: 1.12.2
    	LWJGL: 2.9.4
    	OpenGL: GeForce GTX 1060 3GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 445.87, 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: No
    	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: 4x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
    [21:46:54] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Mickael\Documents\WORKSPACE-ECLIPSE\DrunlyMod\run\.\crash-reports\crash-2020-05-17_21.46.54-client.txt
    Picked up _JAVA_OPTIONS: -Xms512M -Xmx4096M
    
    

    Je suis sûr que l'erreur est bête mais je trouve pas...


  • Moddeurs confirmés

    Salut
    Dans le constructeur de BlockFraise, tu n'aurais pas oublié un this.setRegistryName(name); ? Car la quand tu vas récupérér le registry name pour l'itemblock... tu vas avoir une erreur.

    Autre chose par rapport au register des blocks et items block : c'est inutile de faire event.getRegistryAll(unElement);, le but de cette fonction et de register d'un coup touts les blocks (et itemblocks). Donc au lieu de faire comme tu fais :

    		event.getRegistry().registerAll(
    
    				new ItemBlock(fraisecrop).setRegistryName(fraisecrop.getRegistryName())
    
    				);
    
    		event.getRegistry().registerAll(
    
    				new ItemBlock(rubis_ore).setRegistryName(rubis_ore.getRegistryName())
    
    				);
    
    		event.getRegistry().registerAll(
    
    				new ItemBlock(rubis_block).setRegistryName(rubis_block.getRegistryName())
    
    				);	
    

    tu devrais faire :

    event.getRegistry().registerAll(
           new ItemBlock(fraisecrop).setRegistryName(fraisecrop.getRegistryName()),
           new ItemBlock(rubis_ore).setRegistryName(rubis_ore.getRegistryName()),
           new ItemBlock(rubis_block).setRegistryName(rubis_block.getRegistryName())
    );
    

    et ca pour tes blocks, items, itemblock etc...


  • Moddeurs confirmés

    Salut
    Dans le constructeur de BlockFraise, tu n'aurais pas oublié un this.setRegistryName(name); ? Car la quand tu vas récupérér le registry name pour l'itemblock... tu vas avoir une erreur.

    Autre chose par rapport au register des blocks et items block : c'est inutile de faire event.getRegistryAll(unElement);, le but de cette fonction et de register d'un coup touts les blocks (et itemblocks). Donc au lieu de faire comme tu fais :

    		event.getRegistry().registerAll(
    
    				new ItemBlock(fraisecrop).setRegistryName(fraisecrop.getRegistryName())
    
    				);
    
    		event.getRegistry().registerAll(
    
    				new ItemBlock(rubis_ore).setRegistryName(rubis_ore.getRegistryName())
    
    				);
    
    		event.getRegistry().registerAll(
    
    				new ItemBlock(rubis_block).setRegistryName(rubis_block.getRegistryName())
    
    				);	
    

    tu devrais faire :

    event.getRegistry().registerAll(
           new ItemBlock(fraisecrop).setRegistryName(fraisecrop.getRegistryName()),
           new ItemBlock(rubis_ore).setRegistryName(rubis_ore.getRegistryName()),
           new ItemBlock(rubis_block).setRegistryName(rubis_block.getRegistryName())
    );
    

    et ca pour tes blocks, items, itemblock etc...



  • Super en effet je l'avais oublier... '-'
    Sinon je prend note ^^
    merci.


Log in to reply