Bonjour à tous,
J'ai un petit problème pour générer mon bloc voici mon code :
Code (cpp):
package net.minecraft.src;
import java.util.Random;
public class mod_Mineraicaramel extends BaseMod {
@Override
public String getVersion() {
// TODO Auto-generated method stub
return "1.4.2";
}
@Override
public void load() {
ModLoader.registerBlock(copperOre);
ModLoader.addName(copperOre, "Minerai de caramel");
ModLoader.addSmelting(copperOre.blockID, new ItemStack(mod_caramel.caramel, 5), 0.35F);
}
public static final Block copperOre = new BlockOre(333, ModLoader.addOverride("/terrain.png","/mod/caramelor.png")).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep).setBlockName("copperOre");
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(16);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Mineraicaramel.copperOre.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}
et sa me marque sa dans minecraft :
Code (cpp):
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\QUENTIN\Desktop\mcp 1.4.2 more sweets\jars\.\crash-reports\crash-2012-10-30_10.13.02-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 880d91dc --------
Generated 30/10/12 10:13
- Minecraft Version: 1.4.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_07, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 989189464 bytes (943 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
- JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
- AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
- ModLoader: Mods loaded: 35
ModLoader 1.4.2
mod_bolchocolat 1.2.5
mod_boulecollante 1.2.5
mod_caramel 1.4.2
mod_Chamalow 1.4.2
mod_chewinggumbleu 1.2.5
mod_chewinggummultifruits 1.2.5
mod_chewinggumorange 1.2.5
mod_chewinggumrose 1.2.5
mod_chewinggumrouge 1.2.5
mod_chewinggumvert 1.2.5
mod_choconoir 1.2.5
mod_cone 1.2.5
mod_cookie 1.2.5
mod_cookiebla 1.2.5
mod_cookielait 1.2.5
mod_cowmilka 0.1
mod_Farine 1.2.5
mod_glacebubblegum 1.2.5
mod_glacechocolat 1.2.5
mod_glacecitron 1.2.5
mod_glacecitrouille 1.2.5
mod_glacefraise 1.2.5
mod_glacementhe 1.2.5
mod_glacemyrtille 1.2.5
mod_glaceorange 1.2.5
mod_glacepistache 1.2.5
mod_Mineraicaramel 1.4.2
mod_pommedamour 1.2.5
mod_sucettecerise 1.2.5
mod_sucetteorange 1.2.5
mod_sucettesaveurcitron 1.2.5
mod_sucettesaveurlapislazulis 1.2.5
mod_sucettesaveurpommeverte 1.2.5
mod_tablettedechocolat 1.2.5
java.lang.ArrayIndexOutOfBoundsException: 333
at net.minecraft.src.ModLoader.initStats(ModLoader.java:1004)
at net.minecraft.src.ModLoader.init(ModLoader.java:977)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:187)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:91)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 39c3f46f ----------
Dans la console maintenant :
Code (cpp):
"Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 333
at net.minecraft.src.ModLoader.init(ModLoader.java:990)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:187)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:91)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
... 3 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 333
at net.minecraft.src.ModLoader.initStats(ModLoader.java:1004)
at net.minecraft.src.ModLoader.init(ModLoader.java:977)
... 6 more
Merci d'avance