Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- import net.minecraft.src.forge.*;
- public class mod_Reagents extends BaseMod
- {
- public String getVersion()
- {
- return "1.1.0";
- }
- //declare blocks in class blockchemore.
- public static final Block chemistryOre = new BlockChemistryOre(230, 255).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("ChemistryOre");
- public static final Block nitrateOre = new BlockChemistryOre(230-1, 0).setHardness(3.0f).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("NitrateOre");
- public static final Block sulferOre = new BlockChemistryOre(230-2, 1).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("SulferOre");
- public static final Block copperOre = new BlockChemistryOre(230-3, 2).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("CopperOre");
- public static final Block tinOre = new BlockChemistryOre(230-4, 3).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("TinOre");
- public static final Block graphiteOre = new BlockChemistryOre(230-5, 4).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("GraphiteOre");
- public static final Block nickoliteOre = new BlockChemistryOre(230-6, 5).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("NickoliteOre");
- //declare items.
- public static final Item chemistryItem = new ItemChemistryItem(4000).setIconCoord(15, 15).setItemName("ChemistryItem");
- public static final Item nitrate = new ItemChemistryItem(4000-1).setIconCoord(1, 0).setItemName("Nitrate");
- public static final Item sulfer = new ItemChemistryItem(4000-2).setIconCoord(0, 0).setItemName("Sulfer");
- public static final Item graphite = new ItemChemistryItem(4000-3).setIconCoord(2, 0).setItemName("Graphite");
- public static final Item nickolite = new ItemChemistryItem(4000-4).setIconCoord(3, 0).setItemName("Nickolite");
- //set methods in side the Main class
- public mod_Reagents()
- {
- RegisterBlocks();
- SetTextures();
- AddName();
- Recipes();
- }
- public void RegisterBlocks()
- {
- ModLoader.RegisterBlock(chemistryOre);
- }
- public void SetTextures()
- {
- MinecraftForgeClient.preloadTexture("/Reagents/ChemistryBlocks.png");
- MinecraftForgeClient.preloadTexture("/Reagents/ChemistryItems.png");
- }
- public void AddName()
- {
- ModLoader.AddName(sulferOre, "Sulfer Ore");
- ModLoader.AddName(sulfer, "Sulfer");
- ModLoader.AddName(nitrateOre, "Nitrate Ore");
- ModLoader.AddName(nitrate, "Raw Nitrate");
- ModLoader.AddName(graphiteOre, "Graphite Ore");
- ModLoader.AddName(graphite, "Graphite");
- ModLoader.AddName(nickoliteOre, "Nickolite Ore");
- ModLoader.AddName(nickolite, "Nickolite");
- ModLoader.AddName(tinOre, "Tin Ore");
- ModLoader.AddName(copperOre, "Copper Ore");
- }
- public void Recipes()
- {
- }
- public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
- {
- for(int i = 0; i < 45; i++)
- {
- int randPosX = chunkX + rand.nextInt(16);
- int randPosY = rand.nextInt(80);
- int randPosZ = chunkZ + rand.nextInt(16);
- (new WorldGenMinable(mod_Reagents.sulferOre.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 60; i++)
- {
- int randPosX = chunkX + rand.nextInt(16);
- int randPosY = rand.nextInt(80);
- int randPosZ = chunkZ + rand.nextInt(16);
- (new WorldGenMinable(mod_Reagents.nitrateOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 30; i++)
- {
- int randPosX = chunkX + rand.nextInt(4);
- int randPosY = rand.nextInt(80);
- int randPosZ = chunkZ + rand.nextInt(16);
- (new WorldGenMinable(mod_Reagents.tinOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- for(int i = 0; i < 20; i++)
- {
- int randPosX = chunkX + rand.nextInt(16);
- int randPosY = rand.nextInt(80);
- int randPosZ = chunkZ + rand.nextInt(16);
- (new WorldGenMinable(mod_Reagents.copperOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- //for(int i = 0; i < 25; i++)
- //{
- // int randPosX = chunkX + rand.nextInt(16);
- // int randPosY = rand.nextInt(80);
- /// int randPosZ = chunkZ + rand.nextInt(16);
- //(new WorldGenMinable(mod_Reagents.graphiteOre.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
- //}
- for(int i = 0; i < 27; i++)
- {
- int randPosX = chunkX + rand.nextInt(16);
- int randPosY = rand.nextInt(80);
- int randPosZ = chunkZ + rand.nextInt(16);
- (new WorldGenMinable(mod_Reagents.nickoliteOre.blockID, 3)).generate(world, rand, randPosX, randPosY, randPosZ);
- }
- }
- public void load()
- {
- }
- }
Add Comment
Please, Sign In to add comment