import java.util.Random;//====================================================================public class mod_d_and_d extends BaseMod{ //Руда//==================================================================== public static Block ColdIron = new ColdIron(102, 0).setHardness(50F).setResistance(1.0F).setBlockName("ColdIron"); public static Block Adamantine = new Adamantine(103, 0).setHardness(80F).setResistance(3.0F).setBlockName("Adamantine"); public static Block DarkIron = new DarkIron(104, 0).setHardness(60F).setResistance(1.0F).setBlockName("DarkIron"); public static Block Mithril = new Mithril(105, 0).setHardness(60F).setResistance(1.0F).setBlockName("Mithril"); public static Block Silver = new Silver(106, 0).setHardness(40F).setResistance(1.0F).setBlockName("Silver"); public static Block Copper = new Copper(107, 0).setHardness(40F).setResistance(1.0F).setBlockName("Copper"); //Драгоценные руды//==================================================================== public static Block BloodStone = new BloodStone(101, 0).setHardness(50F).setResistance(1.0F).setBlockName("BloodStone");//========= public static Block Marble = new Marble(108, 0).setHardness(50F).setResistance(1.0F).setBlockName("Marble");//========= public static Block Aventurine = new Aventurine(109, 0).setHardness(50F).setResistance(1.0F).setBlockName("Aventurine");//========= //Предметы//==================================================================== //Слитки//============= public static final Item ColdIronIngot= new ColdIronIngot(2000).setItemName("ColdIronIngot");//======== public static final Item AdamantineIngot= new AdamantineIngot(2001).setItemName("AdamantineIngot");//======== public static final Item DarkIronIngot= new DarkIronIngot(2002).setItemName("DarkIronIngot");//======== public static final Item MithrilIngot= new MithrilIngot(2003).setItemName("MithrilIngot");//======== public static final Item SilverIngot= new SilverIngot(2004).setItemName("SilverIngot");//======== public static final Item CopperIngot= new CopperIngot(2005).setItemName("CopperIngot");//======== //Камни//============== public static final Item AventurineStone= new AventurineStone(2006).setItemName("AventurineStone");//======== public static final Item MarbleShard= new MarbleShard(2007).setItemName("MarbleShard");//======== public static final Item BloodStoneGem= new BloodStoneGem(2008).setItemName("BloodStoneGem");//======== public static final Item ObsidianShard= new ObsidianShard(2009).setItemName("ObsidianShard");//======== public String Version() { return "1.7_03"; } public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ) { for(int i = 0; i < 149; i++) { int randPosX = chunkX + rand.nextInt(16); int randPosY = rand.nextInt(150); int randPosZ = chunkZ + rand.nextInt(16); (new WorldGenMinable(mod_d_and_d.BloodStone.blockID, 32)).generate(world, rand, randPosX, randPosY, randPosZ); } } public mod_d_and_d() { //Руды //=================================================================== ModLoader.RegisterBlock(ColdIron); ModLoader.AddName(ColdIron, "Cold iron ore"); ColdIron.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/ColdIron.png"); //========= ModLoader.RegisterBlock(Adamantine); ModLoader.AddName(Adamantine, "Adamantine ore"); Adamantine.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/Adamantine.png"); //========= ModLoader.RegisterBlock(DarkIron); ModLoader.AddName(DarkIron, "Dark iron ore"); DarkIron.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/DarkIron.png"); //========= ModLoader.RegisterBlock(Mithril); ModLoader.AddName(Mithril, "Mithril ore"); Mithril.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/Mithril.png"); //========= ModLoader.RegisterBlock(Silver); ModLoader.AddName(Silver, "Silver ore"); Silver.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/Silver.png"); //========= ModLoader.RegisterBlock(Copper); ModLoader.AddName(Copper, "Copper ore"); Copper.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Ore/Copper.png"); //Драгоценные руды //=================================================================== ModLoader.RegisterBlock(Marble); ModLoader.AddName(Marble, "Marble"); Marble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Gem1/Marble.png"); //========= ModLoader.RegisterBlock(BloodStone); ModLoader.AddName(BloodStone, "Blood stone"); BloodStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Gem1/BloodStone.png"); //========= ModLoader.RegisterBlock(Aventurine); ModLoader.AddName(Aventurine, "Aventurine"); Aventurine.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/Gem1/Aventurine.png"); //========= //Предметы //=================================================================== //Слитки //================================== ModLoader.AddName(ColdIronIngot, "Cold iron ingot"); ColdIronIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/ColdIronIngot.png"); //========== ModLoader.AddName(AdamantineIngot, "Adamantine ingot"); AdamantineIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/AdamantineIngot.png"); //========== ModLoader.AddName(DarkIronIngot, "Dark iron ingot"); DarkIronIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/DarkIronIngot.png"); //========== ModLoader.AddName(MithrilIngot, "Mithril ingot"); MithrilIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/MithrilIngot.png"); //========== ModLoader.AddName(SilverIngot, "Silver Ingot"); SilverIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/SilverIngot.png"); //========= ModLoader.AddName(CopperIngot, "Copper ingot"); CopperIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Ingots/CopperIngot.png"); //Камни //================================ ModLoader.AddName(AventurineStone, "Aventurine stone"); AventurineStone.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Gem2/AventurineStone.png"); //========= ModLoader.AddName(MarbleShard, "MarbleShard"); MarbleShard.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Gem2/MarbleShard.png"); //========= ModLoader.AddName(BloodStoneGem, "Blood stone gem"); BloodStoneGem.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Gem2/BloodStoneGem.png"); //========= ModLoader.AddName(ObsidianShard, "Obsidian shard"); ObsidianShard.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Gem2/ObsidianShard.png"); //============================================================================================================ //Рецепты //=================================================================== ModLoader.AddRecipe(new ItemStack(AventurineStone,1),new Object[]{ "##","##", Character.valueOf('#'), Block.dirt}); //======== //Рецепты для печки //=================================================================== ModLoader.AddSmelting(mod_d_and_d.ColdIron.blockID, new ItemStack(mod_d_and_d.ColdIronIngot, 1)); //======== ModLoader.AddSmelting(mod_d_and_d.Adamantine.blockID, new ItemStack(mod_d_and_d.AdamantineIngot, 1)); //======== ModLoader.AddSmelting(mod_d_and_d.DarkIron.blockID, new ItemStack(mod_d_and_d.DarkIronIngot, 1)); //======== ModLoader.AddSmelting(mod_d_and_d.Mithril.blockID, new ItemStack(mod_d_and_d.MithrilIngot, 1)); //======== ModLoader.AddSmelting(mod_d_and_d.Silver.blockID, new ItemStack(mod_d_and_d.SilverIngot, 1)); //======== ModLoader.AddSmelting(mod_d_and_d.Copper.blockID, new ItemStack(mod_d_and_d.CopperIngot, 1)); } }