acmdoom's Avatar
Member
Level 9 Apprentice Modder
1

Forum Posts

1 - 1 of 1

    1
    07/24/2013 6:58 pm
    Level 9 : Apprentice Modder
    acmdoom
    acmdoom's Avatar
    My code doesn't work for my ore called nightmare to generate. What is wrong? I have ModLoader installed.

    package net.minecraft.src;

    import java.util.Random;

    public class mod_MyFirstBlock extends BaseMod {

    public static final Block myFirstBlock = new BlockStuff(170)
    .setUnlocalizedName("oreNightmare")
    .setCreativeTab(CreativeTabs.tabBlock)
    .setHardness(.5f);




    @Override
    public String getVersion() {
    // TODO Auto-generated method stub
    return "Version 1.0";
    }

    @Override
    public void load() {
    // TODO Auto-generated method stub
    ModLoader.registerBlock(myFirstBlock);
    ModLoader.addName(myFirstBlock, "Nightmare Ore");
    }



    public void GenerateSurface(World world, Random rand, int x, int z){

    for(int rarity = 0; rarity < 1000; rarity++){

    int xCoord = x + rand.nextInt(16);
    int yCoord = rand.nextInt(70);
    int zCoord = z + rand.nextInt(16);
    (new WorldGenMinable(myFirstBlock.blockID, 0, 32)).generate(world, rand, xCoord, yCoord, zCoord);
    }




    }

    public int quantityDropped(int par1) { return (1);
    }
    public int idDropped(int i, Random par2random, int j) { return mod_MyFirstBlock.myFirstBlock.blockID;
    }
    }

1 - 1 of 1

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome