Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement