Modding FR

trotFunky

Aventurier
23 Juin 2011
32
0
1
25
Est-ce que quelqu'un saurait comment faire apparaitre une structure prédéfinie uniquement à la surface et comment créer un nouveau liquide?

Merci.
 

b0e0n0

Architecte en herbe
11 Juillet 2011
89
2
55
J'ai encor une question :/ je ne c'est pas ou mettre le code pour générer mon minerai :/

Voici le code:

Code:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
    for(int i = 0; i < 4; i++)
    {
        int randPosX = chunkX + rand.nextInt(16);
        int randPosY = rand.nextInt(16);
        int randPosZ = chunkZ + rand.nextInt(16);
        (new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(
                                          world, rand, randPosX, randPosY, randPosZ);
    }
}
 

b0e0n0

Architecte en herbe
11 Juillet 2011
89
2
55
Merci de votre aide,

si j'ai bien compri c'est comme sa :

Code:
package net.minecraft.src;
public class mod_modobsirithe extends BaseMod
{
        public mod_modobsirithe()
        {
                ModLoader.RegisterBlock(obsirithe);
                ModLoader.AddRecipe(new ItemStack(obsirithe, 1), new Object[]
                {"#",Character.valueOf('#'), obsirithe});
        }
        public static final Block obsirithe = (new
        Blockobsirithe(99,224)).setHardness(5.0F).setResistance(10F)
        .setStepSound(Block.soundStoneFootstep);
        public String Version()
        {
                return "1.7.3";
        }
        public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
    for(int i = 0; i < 4; i++)
    {
        int randPosX = chunkX + rand.nextInt(16);
        int randPosY = rand.nextInt(16);
        int randPosZ = chunkZ + rand.nextInt(16);
        (new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(
                                          world, rand, randPosX, randPosY, randPosZ);
    }
}
}
 

rafoudiablol

Lol ?!
29 Mai 2011
499
16
135
27
Oui. Fait les importations nécéssaires pour pouvoir utiliser Random.

Rajoute ceci au début de ton code ==> import java.util.Random;
 

b0e0n0

Architecte en herbe
11 Juillet 2011
89
2
55
Comme sa ?:
Code:
import java.util.Random;
package net.minecraft.src;
public class mod_modobsirithe extends BaseMod
{
        public mod_modobsirithe()
        {
                ModLoader.RegisterBlock(obsirithe);
                ModLoader.AddRecipe(new ItemStack(obsirithe, 1), new Object[]
                {"#",Character.valueOf('#'), obsirithe});
        }
        public static final Block obsirithe = (new
        Blockobsirithe(99,224)).setHardness(5.0F).setResistance(10F)
        .setStepSound(Block.soundStoneFootstep);
        public String Version()
        {
                return "1.7.3";
        }
        public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
    for(int i = 0; i < 4; i++)
    {
        int randPosX = chunkX + rand.nextInt(16);
        int randPosY = rand.nextInt(16);
        int randPosZ = chunkZ + rand.nextInt(16);
        (new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(
                                          world, rand, randPosX, randPosY, randPosZ);
    }
}
}
 

Agant

Aventurier
28 Août 2011
13
0
0
Moi, mes fichier en .txt ne veulent pas passé en .java oo'
(enfin, sa garde l'îcone .txt ...)
Sa me trouble un peu ...

Tuto III
Étape 3)Obfuscating

Alors, dedans, j'ai un petit problème...
Après avoir lancer le startclient.bat , tranquille, aucun problème, rien, mais après:

["Tuto a écrit :Une fois terminé,rendez vous dans le dossier "reobf" puis "minecraft"."]
Les fichiers qui s'y trouvent sont ceux de votre mod,prêt a être lancé avec Minecraft !

Je n'ai pas ceci dedans...
Help please ?