Générations de minerais
-
Salut moi j’ai également un problème , lorsque je veut générer un monde mon jeu s’éteint et me met tout ce rapport d’erreur !
2013-12-16 18:23:43 [Infos] [ForgeModLoader] Forge Mod Loader version 6.4.45.953 for Minecraft 1.6.4 loading 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_45, running on Windows 8:amd64:6.2, installed at C:\Program Files\Java\jre7 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper 2013-12-16 18:23:43 [Infos] [STDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg 2013-12-16 18:23:43 [Grave] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work! 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper 2013-12-16 18:23:43 [Infos] [STDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg 2013-12-16 18:23:43 [Infos] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker 2013-12-16 18:23:44 [Infos] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main} 2013-12-16 18:23:44 [Infos] [Minecraft-Client] Setting user: Player484 2013-12-16 18:23:44 [Infos] [Minecraft-Client] LWJGL Version: 2.9.0 2013-12-16 18:23:44 [Infos] [STDERR] javax.imageio.IIOException: Can't read input file! 2013-12-16 18:23:44 [Infos] [STDERR] at javax.imageio.ImageIO.read(Unknown Source) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.client.Minecraft.readImage(Minecraft.java:558) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:419) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:808) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.client.main.Main.main(Main.java:93) 2013-12-16 18:23:44 [Infos] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-12-16 18:23:44 [Infos] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-12-16 18:23:44 [Infos] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-12-16 18:23:44 [Infos] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) 2013-12-16 18:23:44 [Infos] [STDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) 2013-12-16 18:23:45 [Infos] [Minecraft-Client] Reloading ResourceManager: Default 2013-12-16 18:23:46 [Infos] [MinecraftForge] Attempting early MinecraftForge initialization 2013-12-16 18:23:46 [Infos] [STDOUT] MinecraftForge v9.11.1.953 Initialized 2013-12-16 18:23:46 [Infos] [ForgeModLoader] MinecraftForge v9.11.1.953 Initialized 2013-12-16 18:23:46 [Infos] [STDOUT] Replaced 112 ore recipies 2013-12-16 18:23:46 [Infos] [MinecraftForge] Completed early MinecraftForge initialization 2013-12-16 18:23:46 [Infos] [ForgeModLoader] Reading custom logging properties from C:\Users\Legrandfifou\Desktop\Mod Minecraft 1.6.2\forge\mcp\jars\config\logging.properties 2013-12-16 18:23:46 [Désactivé] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2013-12-16 18:23:46 [Infos] [ForgeModLoader] Searching C:\Users\Legrandfifou\Desktop\Mod Minecraft 1.6.2\forge\mcp\jars\mods for mods 2013-12-16 18:23:47 [Infos] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load 2013-12-16 18:23:47 [Infos] [mcp] Activating mod mcp 2013-12-16 18:23:47 [Infos] [FML] Activating mod FML 2013-12-16 18:23:47 [Infos] [Forge] Activating mod Forge 2013-12-16 18:23:47 [Infos] [CM] Activating mod CM 2013-12-16 18:23:47 [Avertissement] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:47 [Avertissement] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:47 [Avertissement] [Prehistocraft] Mod Prehistocraft is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:47 [Infos] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Prehistocraft 2013-12-16 18:23:47 [Infos] [ForgeModLoader] Registering Forge Packet Handler 2013-12-16 18:23:47 [Infos] [ForgeModLoader] Succeeded registering Forge Packet Handler 2013-12-16 18:23:47 [Infos] [ForgeModLoader] Configured a dormant chunk cache size of 0 2013-12-16 18:23:48 [Infos] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods 2013-12-16 18:23:48 [Avertissement] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:48 [Avertissement] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:48 [Avertissement] [Prehistocraft] Mod Prehistocraft is missing a pack.mcmeta file, things may not work well 2013-12-16 18:23:48 [Infos] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Prehistocraft 2013-12-16 18:23:48 [Infos] [STDOUT] 2013-12-16 18:23:48 [Infos] [STDOUT] Starting up SoundSystem… 2013-12-16 18:23:49 [Infos] [STDOUT] Initializing LWJGL OpenAL 2013-12-16 18:23:49 [Infos] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-12-16 18:23:49 [Infos] [STDOUT] OpenAL initialized. 2013-12-16 18:23:49 [Infos] [STDOUT] 2013-12-16 18:23:49 [Grave] [Minecraft-Client] Realms: Invalid session id 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Starting integrated minecraft server version 1.6.4 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Generating keypair 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Converting map! 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Scanning folders… 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Total conversion count is 0 2013-12-16 18:23:53 [Infos] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@13e406b) 2013-12-16 18:23:53 [Infos] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@13e406b) 2013-12-16 18:23:53 [Infos] [ForgeModLoader] Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@13e406b) 2013-12-16 18:23:53 [Infos] [Minecraft-Server] Preparing start region for level 0 2013-12-16 18:23:54 [Infos] [STDERR] java.lang.NullPointerException 2013-12-16 18:23:54 [Infos] [STDERR] at chinesemod.WorldGeneratorTutoriel.generateSurface(WorldGeneratorTutoriel.java:28) 2013-12-16 18:23:54 [Infos] [STDERR] at chinesemod.WorldGeneratorTutoriel.generate(WorldGeneratorTutoriel.java:20) 2013-12-16 18:23:54 [Infos] [STDERR] at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1253) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:294) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) 2013-12-16 18:23:54 [Infos] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-12-16 18:23:54 [Grave] [Minecraft-Server] Encountered an unexpected exception NullPointerException java.lang.NullPointerException at chinesemod.WorldGeneratorTutoriel.generateSurface(WorldGeneratorTutoriel.java:28) at chinesemod.WorldGeneratorTutoriel.generate(WorldGeneratorTutoriel.java:20) at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103) at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259) at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1253) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153) at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:294) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-12-16 18:23:54 [Grave] [Minecraft-Server] This crash report has been saved to: C:\Users\Legrandfifou\Desktop\Mod Minecraft 1.6.2\forge\mcp\jars\.\crash-reports\crash-2013-12-16_18.23.54-server.txt 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Stopping server 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving players 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving worlds 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Overworld 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Nether 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/The End 2013-12-16 18:23:54 [Infos] [ForgeModLoader] Unloading dimension 0 2013-12-16 18:23:54 [Infos] [ForgeModLoader] Unloading dimension -1 2013-12-16 18:23:54 [Infos] [ForgeModLoader] Unloading dimension 1 2013-12-16 18:23:54 [Infos] [ForgeModLoader] The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded. 2013-12-16 18:23:54 [Infos] [STDOUT] –-- Minecraft Crash Report ---- 2013-12-16 18:23:54 [Infos] [STDOUT] // Surprise! Haha. Well, this is awkward. 2013-12-16 18:23:54 [Infos] [STDOUT] 2013-12-16 18:23:54 [Infos] [STDOUT] Time: 16/12/13 18:23 2013-12-16 18:23:54 [Infos] [STDOUT] Description: Exception in server tick loop 2013-12-16 18:23:54 [Infos] [STDOUT] 2013-12-16 18:23:54 [Infos] [STDOUT] java.lang.NullPointerException 2013-12-16 18:23:54 [Infos] [STDOUT] at chinesemod.WorldGeneratorTutoriel.generateSurface(WorldGeneratorTutoriel.java:28) 2013-12-16 18:23:54 [Infos] [STDOUT] at chinesemod.WorldGeneratorTutoriel.generate(WorldGeneratorTutoriel.java:20) 2013-12-16 18:23:54 [Infos] [STDOUT] at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:103) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:259) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1253) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:294) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:90) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) 2013-12-16 18:23:54 [Infos] [STDOUT] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-12-16 18:23:54 [Infos] [STDOUT] 2013-12-16 18:23:54 [Infos] [STDOUT] 2013-12-16 18:23:54 [Infos] [STDOUT] A detailed walkthrough of the error, its code path and all known details is as follows: 2013-12-16 18:23:54 [Infos] [STDOUT] –------------------------------------------------------------------------------------- 2013-12-16 18:23:54 [Infos] [STDOUT] 2013-12-16 18:23:54 [Infos] [STDOUT] – System Details -- 2013-12-16 18:23:54 [Infos] [STDOUT] Details: 2013-12-16 18:23:54 [Infos] [STDOUT] Minecraft Version: 1.6.4 2013-12-16 18:23:54 [Infos] [STDOUT] Operating System: Windows 8 (amd64) version 6.2 2013-12-16 18:23:54 [Infos] [STDOUT] Java Version: 1.7.0_45, Oracle Corporation 2013-12-16 18:23:54 [Infos] [STDOUT] Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation 2013-12-16 18:23:54 [Infos] [STDOUT] Memory: 930659968 bytes (887 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) 2013-12-16 18:23:54 [Infos] [STDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 2013-12-16 18:23:54 [Infos] [STDOUT] AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used 2013-12-16 18:23:54 [Infos] [STDOUT] Suspicious classes: FML and Forge are installed 2013-12-16 18:23:54 [Infos] [STDOUT] IntCache: cache: 2, tcache: 0, allocated: 1, tallocated: 63 2013-12-16 18:23:54 [Infos] [STDOUT] FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 4 mods loaded, 4 mods active 2013-12-16 18:23:54 [Infos] [STDOUT] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available 2013-12-16 18:23:54 [Infos] [STDOUT] FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available 2013-12-16 18:23:54 [Infos] [STDOUT] Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available 2013-12-16 18:23:54 [Infos] [STDOUT] CM{1.0.0} [Prehistocraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available 2013-12-16 18:23:54 [Infos] [STDOUT] Profiler Position: N/A (disabled) 2013-12-16 18:23:54 [Infos] [STDOUT] Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used 2013-12-16 18:23:54 [Infos] [STDOUT] Player Count: 0 / 8; [] 2013-12-16 18:23:54 [Infos] [STDOUT] Type: Integrated Server (map_client.txt) 2013-12-16 18:23:54 [Infos] [STDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge' 2013-12-16 18:23:54 [Infos] [STDOUT] #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2013-12-16_18.23.54-server.txt 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Stopping server 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving players 2013-12-16 18:23:54 [Infos] [Minecraft-Server] Saving worlds AL lib: (EE) alc_cleanup: 1 device not closed
Voici mon modmain et le WordGenerator
package chinesemod; import net.minecraft.block.Block; import net.minecraft.block.BlockOre; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="CM", name="Prehistocraft", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) // NE PAS MODIFIER CETTE LIGNE public class chinesemodmain { @Instance("CM") public static chinesemodmain instance; @SidedProxy(clientSide="chinesemod.ClientProxy", serverSide="chinesemod.CommonProxy") public static CommonProxy proxy; static EnumToolMaterial TOPAZE = EnumHelper.addToolMaterial("TOPAZE", 3/*miner obsi*/, 200/*durabilite*/, 10.0F/*Vitesse minage*/, 10/*coeur de degats*/,25 ); static EnumToolMaterial TOPAZEPICKAXE = EnumHelper.addToolMaterial("TOPAZEPICKAXE", 3/*miner obsi*/, 200/*durabilite*/, 21.0F/*Vitesse minage*/, 5/*coeur de degats*/,25 ); public static Item topaze; public static Item topazesword; public static Item topazepickaxe; public static Item topazeaxe; public static Item topazeshovel; public static Item topazehoe; public static Block boue; public static Block topazeblock; public static Block oretopaze; @EventHandler public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); Item topaze = new topaze(865).setTextureName("rm:topaze"); //*ITEMS*/ Item topazesword = (new ItemSword(866, TOPAZE)).setUnlocalizedName("topazeSword").setTextureName("rm:topazesword"); Item topazepickaxe = (new ItemPickaxe(867, TOPAZEPICKAXE)).setUnlocalizedName("topazePickaxe").setTextureName("rm:topazepickaxe"); Item topazeaxe= (new ItemAxe(868, TOPAZEPICKAXE)).setUnlocalizedName("topazeAxe").setTextureName("rm:topazeaxe"); Item topazeshovel= (new ItemSpade(869, TOPAZEPICKAXE)).setUnlocalizedName("topazeShovel").setTextureName("rm:topazeshovel"); Item topazehoe= (new ItemHoe(870, TOPAZEPICKAXE)).setUnlocalizedName("topazeHoe").setTextureName("rm:topazehoe"); Block boue = new boue(2000).setTextureName("rm:boue").setHardness(0.1F).setStepSound(Block.soundGravelFootstep); //*BLOCKS*/ Block topazeblock = new topazeblock(2001).setTextureName("rm:blocktopaze").setHardness(15.0F).setStepSound(Block.soundMetalFootstep); //*BLOCKS*/ Block oretopaze = new oretopaze(2002).setTextureName("rm:oretopaze").setHardness(10.0F).setStepSound(Block.soundStoneFootstep); GameRegistry.registerItem(topaze, "Topaze");//*ITEMSr*/ GameRegistry.registerItem(topazesword, "Topaze Sword");//*ITEMSr*/ GameRegistry.registerItem(topazepickaxe, "Topaze Pickaxe");//*ITEMSr*/ GameRegistry.registerItem(topazeaxe, "Topaze Axe");//*ITEMSr*/ GameRegistry.registerItem(topazeshovel, "Topaze Shovel");//*ITEMSr*/ GameRegistry.registerItem(topazehoe, "Topaze Hoe");//*ITEMSr*/ LanguageRegistry.addName(topaze, "Topaze");//*ITEMSl*/ LanguageRegistry.addName(topazesword, "Topaze Sword");//*ITEMSl*/ LanguageRegistry.addName(topazepickaxe, "Topaze Pickaxe");//*ITEMSl*/ LanguageRegistry.addName(topazeaxe, "Topaze Axe");//*ITEMSl*/ LanguageRegistry.addName(topazeshovel, "Topaze Shovel");//*ITEMSl*/ LanguageRegistry.addName(topazehoe, "Topaze Hoe");//*ITEMSl*/ GameRegistry.registerBlock(boue, "Boue");//*BLOCKSSr*/ GameRegistry.registerBlock(topazeblock, "Block Topaze"); GameRegistry.registerBlock(oretopaze, "Topaze Ore"); LanguageRegistry.addName(boue, "Boue");//*BLOCKSl*/ LanguageRegistry.addName(topazeblock, "Block Topaze");//*BLOCKSl*/ LanguageRegistry.addName(oretopaze, "Topaze Ore");//*BLOCKSl*/ //*CRAFTS*// //GameRegistry.addRecipe(new ItemStack(topazeblock), new Object[]{"XXX", "XXX", "XXX", 'X', chinesemodmain.topaze}); //*FURNACE*// GameRegistry.addSmelting(oretopaze.blockID, new ItemStack(topaze), 0.5F); GameRegistry.registerWorldGenerator(new WorldGeneratorTutoriel()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
package chinesemod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorTutoriel implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { case 0: this.generateSurface(world, chunkX * 16, chunkZ * 16, random); } } private void generateSurface(World world, int x, int z, Random rand) { for(int i = 0; i < 1; i++) { (new WorldGenMinable(chinesemodmain.oretopaze.blockID, 0, 6, Block.stone.blockID)).generate(world, rand, x + rand.nextInt(16), rand.nextInt(16), z + rand.nextInt(16)); } } }
Je débute en modding , je suis sur que c’est tout bête en plus Merci de vos réponses
-
J’ai pas eu trop le temps de me pencher sur le problème mais je pense que ça vient des textures.
-
Et bien effectivement dans le code j’ai ceci pour le oretopaze et topazeblock :
Blocks :
Block topazeblock = new topazeblock(2001).setTextureName("rm:blocktopaze").setHardness(15.0F).setStepSound(Block.soundMetalFootstep); //*BLOCKS*/ Block oretopaze = new oretopaze(2002).setTextureName("rm:oretopaze").setHardness(10.0F).setStepSound(Block.soundStoneFootstep);
GameRegistry:
GameRegistry.registerBlock(topazeblock, "Block Topaze"); GameRegistry.registerBlock(oretopaze, "Topaze Ore");
LanguageRegistry:
LanguageRegistry.addName(topazeblock, "Block Topaze");//*BLOCKSl*/ LanguageRegistry.addName(oretopaze, "Topaze Ore");//*BLOCKSl*/
Mais en jeux mon block de topaze (topazeblock) porte le non de Topaze Ore, pourquoi ?___
-
Car ils n’ont pas de nom non localisé :
.setUnlocalizedName(“nom non localisé”);Et non c’est pas un problème de texture, mais un NPE, car les objets de tes blocs sont null.
public static Block monBloc; @EventHandler public void preInit(FMLPreInitializationEvent event) { Block monBloc = new BlockQuelqueChose(1700).setUnlocalizedName("monBloc"); }
Je sais pas où vous avez vu ça, j’ai déjà vu plusieurs personnes faire ça, et c’est completement faux.
Dans cette exemple, je déclare un bloc nommé monBloc qui est public et static, donc accessible de partout sans instance. En dessus, je créer une variable local à la fonction preInit nommé monBloc. Et donc la variable de la classe (qui est utilisé dans les autres classes) reste null, d’où le NPE ( = NullPointerException).Le bon code c’est ça :
public static Block monBloc; @EventHandler public void preInit(FMLPreInitializationEvent event) { monBloc = new BlockQuelqueChose(1700).setUnlocalizedName("monBloc"); }
Ici je déclare la variable, puis je l’initialise dans la fonction preInit, donc pas de NPE puisque mon bloc à une valeur.
Même chose pour tout tes items, dans la fonction load enlève tout les Item, sinon tu créés une variable local à la place d’initialisé l’item.
En passant, les blocs et items se preinit, sinon tu vas avoir des problèmes le jour où tu vas faire des achievements.
-
D’accord je ferais comme cela dé maintenant mais je ne vois pas ou est le problème en fait car je le met dans “public void load” ?
Au fait une idée pour la génération du monde ?
-
D’après ce que j’ai compris c’est que dans le preInit(), tu recrées un block en écrivant le “Block” devant “oretopaze = new oretopaze(2002).setTextureName(“rm:oretopaze”).setHardness(10.0F).setStepSound(Block.soundStoneFootstep);”. Donc quand le jeu se lance, il utilise la variable déclarée précédemment (“public static Block oretopaze”) qui n’a pas subit de modification. Voilà j’espère que tu as compris.
-
Ah d’accord j’ai compris donc j’ai modifier tout mes codes , comme cela est-ce correcte y a t-il toujours des erreurs ?
package chinesemod; import net.minecraft.block.Block; import net.minecraft.block.BlockOre; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="CM", name="Prehistocraft", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) // NE PAS MODIFIER CETTE LIGNE public class chinesemodmain { @Instance("CM") public static chinesemodmain instance; @SidedProxy(clientSide="chinesemod.ClientProxy", serverSide="chinesemod.CommonProxy") public static CommonProxy proxy; static EnumToolMaterial TOPAZE = EnumHelper.addToolMaterial("TOPAZE", 3/*miner obsi*/, 200/*durabilite*/, 10.0F/*Vitesse minage*/, 10/*coeur de degats*/,25 ); static EnumToolMaterial TOPAZEPICKAXE = EnumHelper.addToolMaterial("TOPAZEPICKAXE", 3/*miner obsi*/, 200/*durabilite*/, 21.0F/*Vitesse minage*/, 5/*coeur de degats*/,25 ); public static Item topaze; public static Item topazesword; public static Item topazepickaxe; public static Item topazeaxe; public static Item topazeshovel; public static Item topazehoe; public static Block boue; public static Block topazeblock; public static Block oretopaze; @EventHandler public void preInit(FMLPreInitializationEvent event) { topaze = new topaze(865).setTextureName("rm:topaze"); topazesword = (new ItemSword(866, TOPAZE)).setUnlocalizedName("topazeSword").setTextureName("rm:topazesword"); topazepickaxe = (new ItemPickaxe(867, TOPAZEPICKAXE)).setUnlocalizedName("topazePickaxe").setTextureName("rm:topazepickaxe"); topazeaxe= (new ItemAxe(868, TOPAZEPICKAXE)).setUnlocalizedName("topazeAxe").setTextureName("rm:topazeaxe"); topazeshovel= (new ItemSpade(869, TOPAZEPICKAXE)).setUnlocalizedName("topazeShovel").setTextureName("rm:topazeshovel"); topazehoe= (new ItemHoe(870, TOPAZEPICKAXE)).setUnlocalizedName("topazeHoe").setTextureName("rm:topazehoe"); boue = new boue(2000).setTextureName("rm:boue").setHardness(0.1F).setStepSound(Block.soundGravelFootstep); oretopaze = new oretopaze(2001).setTextureName("rm:oretopaze").setHardness(10.0F).setStepSound(Block.soundStoneFootstep); topazeblock = new Blocktopaze(2002).setUnlocalizedName("topazeb").setTextureName("rm:topazeblock").setHardness(10.0F).setStepSound(Block.soundStoneFootstep); } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); GameRegistry.registerItem(topaze, "Topaze"); GameRegistry.registerItem(topazesword, "Topaze Sword"); GameRegistry.registerItem(topazepickaxe, "Topaze Pickaxe"); GameRegistry.registerItem(topazeaxe, "Topaze Axe"); GameRegistry.registerItem(topazeshovel, "Topaze Shovel"); GameRegistry.registerItem(topazehoe, "Topaze Hoe"); LanguageRegistry.addName(topaze, "Topaze"); LanguageRegistry.addName(topazesword, "Topaze Sword"); LanguageRegistry.addName(topazepickaxe, "Topaze Pickaxe"); LanguageRegistry.addName(topazeaxe, "Topaze Axe"); LanguageRegistry.addName(topazeshovel, "Topaze Shovel"); LanguageRegistry.addName(topazehoe, "Topaze Hoe"); GameRegistry.registerBlock(boue, "Boue"); GameRegistry.registerBlock(topazeblock, "TopazeBlock"); GameRegistry.registerBlock(oretopaze, "Topaze Ore"); LanguageRegistry.addName(boue, "Boue"); LanguageRegistry.addName(topazeblock, "TopazeBlock"); LanguageRegistry.addName(oretopaze, "Topaze Ore"); //*CRAFTS*// //GameRegistry.addRecipe(new ItemStack(topazeblock), new Object[]{"XXX", "XXX", "XXX", 'X', chinesemodmain.topaze}); //*FURNACE*// GameRegistry.addSmelting(oretopaze.blockID, new ItemStack(topaze), 1.0F); //GameRegistry.registerWorldGenerator(new WorldGeneratorTutoriel()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
-
Normalement c’est bon, mais pour le nom des Items et des blocs tu devrais utiliser les fichiers lang, c’est plus efficace et ça permet de clarifier le code.
-
@‘gagoi’:
Normalement c’est bon, mais pour le nom des Items et des blocs tu devrais utiliser les fichiers lang, c’est plus efficace et ça permet de clarifier le code.
Oké je retiens Merci , tout marche les crafts sont devenu opérationnel par la suite ainsi que le génération de monde maintenant je mine en créa a la couche 16 et je n’ai pas vu mon minerai , qu’est-ce qui pourrait causer sa ?
EDIT : Je n’ai riens dit mon minerai est générer MERCI BEAUCOUP !
-
De rien.
-
Salut j’aimerais générer dans l’end mon minerai mais sur la surface de l’end donc la ou on marche si vous préférer , mais comment faire ?
-
Tu fait une condition pour vérifier si il y a un bloc d’air au-dessus du bloc de pierre de l’end.
-
for(int i = 0; i < probabilité; i++) { int targetX = x + rand.nextInt(16); int targetY = rand.nextInt(192); int targetZ = z + rand.nextInt(16); if(world.isAirBlock(targetZ, targetY, targetZ) { (new WorldGenMinable(id du bloc à générer, metadata du bloc à générer, taille maximum d un filon, Block.whiteStone.blockID)).generate(world, rand, targetX, targetY, targetZ); } }
Parcontre monte bien la prob, sinon il se généra que très rarement.
-
Merci beaucoup à vous deux !
-
A croire que je ne suis pas très intelligent j’ai une question à chaque fois que je veut génerger un minerai je dois refaire un classe ou je l’ajoute simplement dans la case correspondant ? Car le minerai de néphrite ne se génère pas dans l’end ! Sad
-
Il faut mettre dans la même classe. Envoie ton code.
-
Voici mon code : j’ai un deuxième soucis mon generateNether se souligne en rouge comme si il avais été supprimer normal ?
package chinesemod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorTutoriel implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { case -1: this.generateEnd(world, chunkX * 16, chunkZ * 16, random); case 0: this.generateSurface(world, chunkX * 16, chunkZ * 16, random); case 1: //*this.generateNether(world, chunkX * 16, chunkZ * 16, random);*// } } private void generateSurface(World world, int x, int z, Random rand) { for(int i = 0; i < 14; i++) { (new WorldGenMinable(chinesemodmain.oretopaze.blockID, 0, 6, Block.stone.blockID)).generate(world, rand, x + rand.nextInt(16), rand.nextInt(16), z + rand.nextInt(16)); } } private void generateEnd(World world, int x, int z, Random rand) { for(int i = 0; i < 100; i++) { int targetX = x + rand.nextInt(16); int targetY = rand.nextInt(192); int targetZ = z + rand.nextInt(16); if(world.isAirBlock(targetZ, targetY, targetZ)) { (new WorldGenMinable(chinesemodmain.orenephrite.blockID, 0, 6, Block.whiteStone.blockID)).generate(world, rand, targetX, targetY, targetZ); } } } }
-
Faut pas @Override ?
Vérifie tes params aussi
-
Le @Override y est , mes paramètres sont bon normalement . . .
-
Screen l’erreur eclipse et envoie le