Problème recompile

Folkenarr

Bucheron
15 Juillet 2011
204
1
13
J'ai un problème a chaque fois que je recompile je ne comprend pas se qui ne va pas sur l'erreur
voila le message d'erreur :
> Recompiling client...
javac -g -verbose -classpath "lib/:lib/*:jars/bin/minecraft.jar:jars/bin/jinput.jar:jars/bin/lwjgl.jar:jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft/net/minecraft/isom/*.java src/minecraft/net/minecraft/client/*.java src/minecraft/net/minecraft/src/*.java conf/patches/*.java failed.
Return code : 1

== ERRORS FOUND ==

src/minecraft/net/minecraft/src/mod_MonMod.java:27: illegal start of expression
.setIconIndex(ModLoader.addOverride("/gui/items.png", "/mod_MonMod_objet/lingotMithril.png"))
^

1 error
==================

et voila mon mod_MonMod.java :
package net.minecraft.src;
public class mod_MonMod extends BaseMod
{
public static final Block Mithril = (new BlockMithril(99,0))
.setHardness(1.5F)
.setResistance(10F)
.setStepSound(Block.soundStoneFootstep)
.setBlockName("Mirerais de Mithril");

public static int textureHaut;
public static int textureBas;

public mod_MonMod()
{
Mithril.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mod_MonMod_blocks/MineraisMithril.png");
textureHaut = ModLoader.addOverride("/terrain.png", "/mod_MonMod_blocks/MineraisMithril.png");
textureBas = ModLoader.addOverride("/terrain.png", "/mod_MonMod_blocks/MineraisMithril.png");

ModLoader.RegisterBlock(Mithril);
ModLoader.AddName(Mithril, "Minerais de Mithril");
ModLoader.AddRecipe(
new ItemStack(Mithril, 1),
new Object[] {"#",Character.valueOf('#'), Block.dirt}
);

LingotMithril = (new ItemLingotMithril(1000));
.setIconIndex(ModLoader.addOverride("/gui/items.png", "/mod_MonMod_objet/lingotMithril.png"))
.setItemName("Pomme Verte");
ModLoader.AddName(LingotMithril, "Lingot de Mithril");
ModLoader.AddRecipe(
new ItemStack(LingotMithril, 1),
new Object[] {"#", Character.valueOf('#'), Item.stick}
);
ModLoader.AddSmelting(Mithril.blockID, new ItemStack(monItem, 1));
}

public String Version()
{
return "1.7.3";
}

public static Item LingotMithril;
}


quelqun peut m'aider ?
 

Folkenarr

Bucheron
15 Juillet 2011
204
1
13
ça marche merci beaucoup ^^

pardon mais j'ai chercher sur le forum et je ne trouve pas de tuto pour faire en sorte qu'un bloc se genere dans la map tout seul un minerais plus precisement
 

Gugu42

HUEHUAHUEHUAHUEHUAHUEHUA
29 Juin 2011
1 202
164
182
25
Collé a l'écran de mon PC
youtube.com
J'ai un truc pour toi :

Por la generation de tes minerais

A placer juste apres la premiere ligne ( package [...] )

Code:
import java.util.Random;
import java.util.Map;

Ensuite , le code de generation :

Code:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 4; i++) // 4 nombre de veine par chunck
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(16); // 16, la hauteur a partir d'ou on le trouve
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(myBlock.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ); //4, nombre de minerai par veine.
}
}