Bonjour je vient de créer un mod qui rajoute un block
eclipse me signale aucune erreur mais quand test ba minecraft crashed!
Voici mon fichier mod_CryingObsidian :
Voici mon fichier BlockCryingObsidian :
eclipse me signale aucune erreur mais quand test ba minecraft crashed!
Mods loaded: 1
ModLoader 1.0.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 141ccf11 --------
Generated 10/12/11 11:05
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_01, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 7950 GT/PCI/SSE2/3DNOW! version 2.1.2, NVIDIA Corporation
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2999
at net.minecraft.src.Block.<init>(Block.java:209)
at net.minecraft.src.Block.<init>(Block.java:238)
at net.minecraft.src.BlockCryingObsidian.<init>(BlockCryingObsidian.java:9)
at net.minecraft.src.mod_CryingObsidian.<clinit>(mod_CryingObsidian.java:14)
... 15 more
--- END ERROR REPORT abafe7e0 ----------
Voici mon fichier mod_CryingObsidian :
package net.minecraft.src;
public class mod_CryingObsidian extends BaseMod
{
public mod_CryingObsidian()
{
ModLoader.RegisterBlock(CryingObsidian);
ModLoader.AddName(CryingObsidian, "Crying Obsidian");
ModLoader.AddRecipe(new ItemStack(CryingObsidian, 1), new Object[]
{"=X=", "X=X", "=X=", Character.valueOf('='), Block.blockLapis, Character.valueOf('X'), Block.obsidian} );
}
private static final int CryingObsidiantexture = ModLoader.addOverride("/terrain.png", "/mod/cryingobsidian.png");
public static final Block CryingObsidian = (new BlockCryingObsidian(2999, CryingObsidiantexture)).setBlockName("CryingObsidian").setHardness(50F).setResistance(2000F)
.setStepSound(Block.soundStoneFootstep);
@Override
public String getVersion() {
return "1.0.0";
}
@Override
public void load() {
}
}
Voici mon fichier BlockCryingObsidian :
package net.minecraft.src;
import java.util.Random;
public class BlockCryingObsidian extends Block
{
public BlockCryingObsidian(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return this.blockID;
}
}