Modding FR

mysterioxes

Bucheron
8 Juin 2011
118
0
11
j'ai considérer block myblock comme une blcok normal et et enlever les tiret il me reste 1 erreur

Code:
== MCP v4.2 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
 bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java  conf/patches/*.java fai
led.
Return code : 1

== ERRORS FOUND ==

src\minecraft\net\minecraft\src\mod_mh.java:46: <identifier> expected
Lianeechelle = (new BlockLadder(65, 83)).setHardness(0.4F).setStepSound(soundWoo
dFootstep).setBlockName("Liane Grimpante").disableNeighborNotifyOnMetadataChange
();
^

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

> Done in 1.13 seconds
> Recompiling server...
!! Can not find server sources !!
Appuyez sur une touche pour continuer...

Edit :faut t'il complètement supprimer blockmybloc
 

Zoctos

Jeune Youtubeur
30 Mars 2011
288
0
11
28
Salut tout le monde,
Quelqu'un saurait comment faire pour qu'un mob inflige des dégats si il est attaqué directement. Quand je dis qu'il est attaqué directement je veut dire lorsqu'on fait un coup d'épée ou autre sauf les flèches et les explosions. J'espère être assez clair.
 

ulko10

Bucheron
20 Avril 2011
367
3
13
Bonjour a tous,

j'ai une petite question pour les moddeur qui si connaissent bien :)
Comment donner une texture aléatoire a notre objet ?

merci
 

Stormweaker

Bucheron
15 Mai 2011
518
1
11
30
serveur-sinan.forumgratuit.fr
Utilises un random, et pour différentes valeurs du random tu assignes à ton objet une texture grâce à des conditions
Ça ressemblerait à ça:
Code:
int tex = random.nextInt(2);
if(tex ==0)
       { //texture 1}
else if(tex == 1)
        { //texture 2}
else
        { //texture 3}
 

ulko10

Bucheron
20 Avril 2011
367
3
13
Je ne comprend pas comment integrer ce code désoler ..

voici le mien :)

package net.minecraft.src;
import java.util.Random;
public class mod_MoreNature extends BaseMod
{

public mod_MoreNature()
{
ModLoader.RegisterBlock(Tulipe);
ModLoader.AddRecipe(new ItemStack(Tulipe, 64), new Object[]
{"#",Character.valueOf('#'), Block.dirt});
ModLoader.AddName(Tulipe, "Tulipe");

}

public static final Block Tulipe = (BlockFlower)(new BlockTulipe(100, ModLoader.addOverride("/terrain.png","/plantes/Tulipe.png"))).setBlockName("Tulipe")
.setHardness(0F).setResistance(0F).setStepSound(Block.soundGrassFootstep);

public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 10; i++)
{
if(rand.nextInt(5) == 0) // la probabilité d'avoir cette fleur qui se génère
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenFlowers(Tulipe.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}

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

merci de ta réponse
 

Zangestunaka

Bucheron
7 Mai 2011
102
0
11
Les balises code existe
Code:
package net.minecraft.src;
import java.util.Random;
public class mod_MoreNature extends BaseMod
{

public mod_MoreNature()
{
ModLoader.RegisterBlock(Tulipe);
ModLoader.AddRecipe(new ItemStack(Tulipe, 64), new Object[]
{"#",Character.valueOf('#'), Block.dirt});
ModLoader.AddName(Tulipe, "Tulipe");

}

public static final Block Tulipe = (BlockFlower)(new BlockTulipe(100, ModLoader.addOverride("/terrain.png","/plantes/Tulipe.png"))).setBlockName("Tulipe")
.setHardness(0F).setResistance(0F).setStepSound(Block.soundGrassFootstep);

public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 10; i++)
{
if(rand.nextInt(5) == 0) // la probabilité d'avoir cette fleur qui se génère
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenFlowers(Tulipe.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}

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

c'est mieux comme ça
 

Mack

Architecte en herbe
3 Juin 2011
123
5
124
Dans une condition, comment on fait un "ou" ?
En gros, j'voudrais mettre :
if(world.isBlockGettingPowered(i, j, k)) OU if(world.isBlockIndirectlyGettingPowered(i, j, k))

J'ai pensé à or, mais c'est pas ça ...