diff --git a/common/MysticOres/Blocks/BlockHandler.java b/common/MysticOres/Blocks/BlockHandler.java new file mode 100644 index 0000000..c3a0ad6 --- /dev/null +++ b/common/MysticOres/Blocks/BlockHandler.java @@ -0,0 +1,45 @@ +package MysticOres.Blocks; + +import cpw.mods.fml.common.registry.GameRegistry; +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Items.ItemHandler; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.common.MinecraftForge; + +public class BlockHandler { + + public static Block ReinforcedGlass; + public static Block BlockOres; + + public static void init() { + ReinforcedGlass = new BlockReinforcedGlass(Config.ReinforcedGlassID, true).setHardness(4.5F).setResistance(2000.0F).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("Reinforced Glass"); + BlockOres = new BlockOres(Config.BlockOresID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticOreBlocks"); + + registerBlocks(); + setBlockHarvestLevels(); + } + + private static void registerBlocks() { + GameRegistry.registerBlock(ReinforcedGlass, "ReinforcedGlass"); + GameRegistry.registerBlock(BlockOres, ItemBlockOres.class, "OreBlocks!"); + } + + private static void setBlockHarvestLevels() { + MinecraftForge.setBlockHarvestLevel(BlockOres, 0, "pickaxe", 3); + MinecraftForge.setBlockHarvestLevel(BlockOres, 1, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 2, "pickaxe", 3); + MinecraftForge.setBlockHarvestLevel(BlockOres, 3, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 4, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 5, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 6, "pickaxe", 1); + MinecraftForge.setBlockHarvestLevel(BlockOres, 7, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 8, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 9, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 10, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(BlockOres, 11, "pickaxe", 2); + } + +} diff --git a/common/MysticOres/Blocks/BlockOres.java b/common/MysticOres/Blocks/BlockOres.java new file mode 100644 index 0000000..2698676 --- /dev/null +++ b/common/MysticOres/Blocks/BlockOres.java @@ -0,0 +1,249 @@ +package MysticOres.Blocks; + +import java.util.List; +import java.util.Random; + +import MysticOres.MysticOres; +import MysticOres.Items.ItemHandler; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockBreakable; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockOres extends Block { + + Icon[] textures; + + public BlockOres(int ID) { + super(ID, Material.rock); + setHardness(3F); + setResistance(5F); + setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + textures = new Icon[16]; + + for (int i = 0; i < 12; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "MysticOre_" + i); + } + } + + @Override + public Icon getIcon(int side, int meta) { + return textures[meta]; + } + + public int idDropped(int par1, Random par2Random, int par3) { + switch(par1){ + case 1:return ItemHandler.AmethystGem.itemID; + case 2:return ItemHandler.IridiumNugget.itemID; + case 4:return ItemHandler.TourmalineGem.itemID; + case 5:return ItemHandler.TopazGem.itemID; + case 7:return ItemHandler.BloodstoneShard.itemID; + case 8:return this.BlackSoulstoneDrops(par1, par2Random, par3); + case 9:return this.BlueSoulstoneDrops(par1, par2Random, par3); + case 10:return this.RedSoulstoneDrops(par1, par2Random, par3); + case 11:return ItemHandler.AgateGem.itemID; + default:return blockID; + } + } + + @Override + public int damageDropped(int j) { + switch(j){ + case 1:return 0; + case 2:return 0; + case 4:return 0; + case 5:return 0; + case 7:return 0; + case 8:return 0; + case 9:return 0; + case 10:return 0; + case 11:return 0; + default: return j; + } + } + + public int xpDropAmount(int j) { + switch(j){ + case 1:return 6; + case 2:return 6; + case 4:return 6; + case 5:return 6; + case 7:return 6; + case 8:return 6; + case 9:return 6; + case 10:return 6; + case 11:return 6; + default: return 0; + } + } + + + protected boolean canSilkHarvest() + { + return true; + } + + public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) + { + this.dropXpOnBlockBreak(world, x, y, z, xpDropAmount(meta)); + } + + public int BlackSoulstoneDrops(int par1, Random par2Random, int par3) + { + int w = par2Random.nextInt(6); + if (w == 0) + { + return Item.coal.itemID; + } + if (w == 1) + { + return Item.gunpowder.itemID; + } + if (w == 2) + { + return ItemHandler.ObsidianShard.itemID; + } + if (w == 3) + { + return ItemHandler.GlassShard.itemID; + } + else + { + return ItemHandler.ObsidianShard.itemID; + } + } + + public int RedSoulstoneDrops(int par1, Random par2Random, int par3) + { + int w = par2Random.nextInt(6); + if (w == 0) + { + return Item.lightStoneDust.itemID; + } + if (w == 1) + { + return Item.gunpowder.itemID; + } + if (w == 2) + { + return ItemHandler.ObsidianShard.itemID; + } + if (w == 3) + { + return ItemHandler.GlassShard.itemID; + } + if (w == 4) + { + return Item.redstone.itemID; + } + if (w == 5) + { + return ItemHandler.MysticPowder.itemID; + } + if (w==6) + { + return Block.obsidian.blockID; + } + if (w==7) + { + return ItemHandler.ObsidianShard.itemID; + } + else + { + return blockID; + } + } + + public int BlueSoulstoneDrops(int par1, Random par2Random, int par3) + { + int w = par2Random.nextInt(6); + if (w == 0) + { + return ItemHandler.AgateGem.itemID; + } + if (w == 1) + { + return ItemHandler.TourmalineGem.itemID; + } + if (w == 2) + { + return ItemHandler.TopazGem.itemID; + } + if (w == 3) + { + return ItemHandler.AmethystGem.itemID; + } + if (w == 4) + { + return ItemHandler.IridiumNugget.itemID; + } + if (w == 5) + { + return Item.diamond.itemID; + } + if (w == 6) + { + return Block.obsidian.blockID; + } + if (w == 7) + { + return Item.gunpowder.itemID; + } + if (w==8) + { + return Item.lightStoneDust.itemID; + } + else + { + return blockID; + } + } + + + + //meta specific stuff + public int idPicked(World par1World, int par2, int par3, int par4) + { + return this.blockID; + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) + { + int meta = world.getBlockMetadata(x, y, z); + + return new ItemStack(this, 1, meta); + } + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + list.add(new ItemStack(i,1,0)); + list.add(new ItemStack(i,1,1)); + list.add(new ItemStack(i,1,2)); + list.add(new ItemStack(i,1,3)); + list.add(new ItemStack(i,1,4)); + list.add(new ItemStack(i,1,5)); + list.add(new ItemStack(i,1,6)); + list.add(new ItemStack(i,1,7)); + list.add(new ItemStack(i,1,8)); + list.add(new ItemStack(i,1,9)); + list.add(new ItemStack(i,1,10)); + list.add(new ItemStack(i,1,11)); + } +} diff --git a/common/MysticOres/Blocks/BlockReinforcedGlass.java b/common/MysticOres/Blocks/BlockReinforcedGlass.java new file mode 100644 index 0000000..ec60075 --- /dev/null +++ b/common/MysticOres/Blocks/BlockReinforcedGlass.java @@ -0,0 +1,85 @@ +package MysticOres.Blocks; + +import java.util.Random; + +import MysticOres.MysticOres; +import MysticOres.Items.ItemHandler; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockBreakable; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; + + +public class BlockReinforcedGlass extends BlockBreakable +{ + Icon[] textures; + + private boolean RenderSide = false; + + public BlockReinforcedGlass(int par1, boolean par4) { + super(par1, "ReinforcedGlass", Material.glass, par4); + this.setCreativeTab(MysticOres.MysticOresTab); + this.RenderSide = false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + for(int i=0;i<8;i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "ReinforcedGlass"); + } + } + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + public int idDropped(int par1, Random par2Random, int par3) + { + return ItemHandler.GlassShard.itemID; + } + + public int quantityDropped(Random par1Random) + { + return 1 + par1Random.nextInt(2); + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public int getRenderBlockPass() + { + return 0; + } + + public boolean isOpaqueCube() + { + return false; + } + + protected boolean canSilkHarvest() + { + return true; + } + + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + int var6 = par1IBlockAccess.getBlockId(par2, par3, par4); + return !this.RenderSide && var6 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5); + } + +} + diff --git a/common/MysticOres/Blocks/ItemBlockOres.java b/common/MysticOres/Blocks/ItemBlockOres.java new file mode 100644 index 0000000..cc9e54a --- /dev/null +++ b/common/MysticOres/Blocks/ItemBlockOres.java @@ -0,0 +1,51 @@ +package MysticOres.Blocks; + +import java.util.List; + +import MysticOres.MysticOres; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockOres extends ItemBlock { + + public ItemBlockOres(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "Adamantine"; + case 1:return "Amethyst"; + case 2:return "Iridium"; + case 3:return "Mithril"; + case 4:return "Sapphire"; + case 5:return "Topaz"; + case 6:return "Verdite"; + case 7:return "Bloodstone"; + case 8:return "BlackSoulstone"; + case 9:return "BlueSoulstone"; + case 10:return "RedSoulstone"; + case 11:return "Agate"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return BlockHandler.BlockOres.getIcon(2, par1); + } + +} diff --git a/common/MysticOres/Config.java b/common/MysticOres/Config.java new file mode 100644 index 0000000..66ff8db --- /dev/null +++ b/common/MysticOres/Config.java @@ -0,0 +1,151 @@ +package MysticOres; + +import java.io.File; + +import net.minecraftforge.common.Configuration; + +public class Config +{ + public static Configuration config; + + public static int AdamantineSwordID; + public static int AdamantinePickaxeID; + public static int AdamantineShovelID; + public static int AdamantineAxeID; + public static int AdamantineHoeID; + public static int AdamantineIngotID; + public static int BloodstoneSwordID; + public static int BloodstonePickaxeID; + public static int BloodstoneShovelID; + public static int BloodstoneAxeID; + public static int BloodstoneHoeID; + public static int BloodstoneShardID; + public static int TopazGemID; + public static int TourmalineGemID; + public static int AmethystGemID; + public static int AgateGemID; + public static int MysticPowderID; + public static int IridiumSwordID; + public static int IridiumPickaxeID; + public static int IridiumShovelID; + public static int IridiumAxeID; + public static int IridiumHoeID; + public static int IridiumIngotID; + public static int IridiumNuggetID; + public static int MithrilSwordID; + public static int MithrilPickaxeID; + public static int MithrilShovelID; + public static int MithrilAxeID; + public static int MithrilHoeID; + public static int MithrilIngotID; + public static int ObsidianSwordID; + public static int ObsidianPickaxeID; + public static int ObsidianShovelID; + public static int ObsidianAxeID; + public static int ObsidianHoeID; + public static int ObsidianShardID; + public static int ObsidianRodID; + public static int VerditeSwordID; + public static int VerditePickaxeID; + public static int VerditeShovelID; + public static int VerditeAxeID; + public static int VerditeHoeID; + public static int VerditeIngotID; + public static int GlassShardID; + public static int SatchelID; + + public static int AdamantineDustID; + public static int MithrilDustID; + public static int VerditeDustID; + + public static int ReinforcedGlassID; + public static int BlockOresID; + + public static int AgateRarity; + public static int AmethystRarity; + public static int TopazRarity; + public static int TourmalineRarity; + + + public static int VerditeRarity; + public static int MithrilRarity; + public static int IridiumRarity; + public static int AdamantineRarity; + + public static boolean DustsEnabled; + + public static void initialize(File file) + { + config = new Configuration(file); + + AdamantineSwordID = config.getItem("Adamantine Sword ID", 15000).getInt(); + AdamantinePickaxeID = config.getItem("Adamantine Pickaxe ID", 15001).getInt(); + AdamantineShovelID = config.getItem("Adamantine Shovel ID", 15002).getInt(); + AdamantineAxeID = config.getItem("Adamantine Axe ID", 15003).getInt(); + AdamantineHoeID = config.getItem("Adamantine Hoe ID", 15004).getInt(); + AdamantineIngotID = config.getItem("Adamantine Ingot ID", 15005).getInt(); + BloodstoneSwordID = config.getItem("Bloodstone Sword ID", 15006).getInt(); + BloodstonePickaxeID = config.getItem("Bloodstone Pickaxe ID", 15007).getInt(); + BloodstoneShovelID = config.getItem("Bloodstone Shovel ID", 15008).getInt(); + BloodstoneAxeID = config.getItem("Bloodstone Axe ID", 15009).getInt(); + BloodstoneHoeID = config.getItem("Bloodstone Hoe ID", 15010).getInt(); + BloodstoneShardID = config.getItem("Bloodstone Shard ID", 15011).getInt(); + TopazGemID = config.getItem("Topaz ID", 15012).getInt(); + TourmalineGemID = config.getItem("Tourmaline ID", 15013).getInt(); + AmethystGemID = config.getItem("Amethyst ID", 15014).getInt(); + MysticPowderID = config.getItem("Mystic Powder ID", 15015).getInt(); + IridiumSwordID = config.getItem("Iridium Sword ID", 15016).getInt(); + IridiumPickaxeID = config.getItem("Iridium Pickaxe ID", 15017).getInt(); + IridiumShovelID = config.getItem("Iridium Shovel ID", 15018).getInt(); + IridiumAxeID = config.getItem("Iridium Axe ID", 15019).getInt(); + IridiumHoeID = config.getItem("Iridium Hoe ID", 15020).getInt(); + IridiumIngotID = config.getItem("Iridium Ingot ID", 15021).getInt(); + IridiumNuggetID = config.getItem("Iridium Nugget ID", 15022).getInt(); + MithrilSwordID = config.getItem("Mithril Sword ID", 15023).getInt(); + MithrilPickaxeID = config.getItem("Mithril Pickaxe ID", 15024).getInt(); + MithrilShovelID = config.getItem("Mithril Shovel ID", 15025).getInt(); + MithrilAxeID = config.getItem("Mithril Axe ID", 15026).getInt(); + MithrilHoeID = config.getItem("Mithril Hoe ID", 15027).getInt(); + MithrilIngotID = config.getItem("Mithril Ingot ID", 15028).getInt(); + ObsidianSwordID = config.getItem("Obsidian Sword ID", 15029).getInt(); + ObsidianPickaxeID = config.getItem("Obsidian Pickaxe ID", 15030).getInt(); + ObsidianShovelID = config.getItem("Obsidian Shovel ID", 15031).getInt(); + ObsidianAxeID = config.getItem("Obsidian Axe ID", 15032).getInt(); + ObsidianHoeID = config.getItem("Obsidian Hoe ID", 15033).getInt(); + ObsidianShardID = config.getItem("Obsidian Shard ID", 15034).getInt(); + ObsidianRodID = config.getItem("Obsidian Rod ID", 15035).getInt(); + VerditeSwordID = config.getItem("Verdite Sword ID", 15036).getInt(); + VerditePickaxeID = config.getItem("Verdite Pickaxe ID", 15037).getInt(); + VerditeShovelID = config.getItem("Verdite Shovel ID", 15038).getInt(); + VerditeAxeID = config.getItem("Verdite Axe ID", 15039).getInt(); + VerditeHoeID = config.getItem("Verdite Hoe ID", 15040).getInt(); + VerditeIngotID = config.getItem("Verdite Ingot ID", 15041).getInt(); + GlassShardID = config.getItem("Glass Shard ID", 15042).getInt(); + AdamantineDustID = config.getItem("Adamantine Dust ID", 15043).getInt(); + MithrilDustID = config.getItem("Mithril Dust ID", 15044).getInt(); + VerditeDustID = config.getItem("Verdite Dust ID", 15045).getInt(); + AgateGemID = config.getItem("Agate ID", 15046).getInt(); + SatchelID = config.getItem("Satchel ID", 15047).getInt(); + + DustsEnabled = config.get("General", "Enable Recipes for IC2/Thermal Expansion?", true).getBoolean(DustsEnabled); + + BlockOresID = config.getBlock("Ore IDs", 500).getInt(); + ReinforcedGlassID = config.getBlock("Reinforced Glass ID", 501).getInt(); + + AgateRarity = config.get("Ore Rarity", "Rarity of Agate", 3).getInt(); + AmethystRarity = config.get("Ore Rarity", "Rarity of Amethyst", 3).getInt(); + TopazRarity = config.get("Ore Rarity", "Rarity of Topaz", 3).getInt(); + TourmalineRarity = config.get("Ore Rarity", "Rarity of Tourmaline", 3).getInt(); + VerditeRarity = config.get("Ore Rarity", "Rarity of Verdite Ore", 10).getInt(); + MithrilRarity = config.get("Ore Rarity", "Rarity of Mithril Ore", 3).getInt(); + IridiumRarity = config.get("Ore Rarity", "Rarity of Iridium Ore", 2).getInt(); + AdamantineRarity = config.get("Ore Rarity", "Rarity of Adamantine Ore", 2).getInt(); + + config.save(); + } + + public static void save() + { + config.save(); + } +} \ No newline at end of file diff --git a/common/MysticOres/IC2Handler.java b/common/MysticOres/IC2Handler.java new file mode 100644 index 0000000..fbdb401 --- /dev/null +++ b/common/MysticOres/IC2Handler.java @@ -0,0 +1,54 @@ +package MysticOres; + +/* +import ic2.api.Ic2Recipes; + +import java.util.ArrayList; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class IC2Handler +{ + + public static void adamantineRecipe() + { + ItemStack tOutput = new ItemStack(MysticOres.AdamantineDust, 2, 0); + ArrayList tList = OreDictionary.getOres("oreAdamantine"); + for (int i = 0; i < tList.size(); i++) { + ItemStack tStack = tList.get(i); + tStack = tStack.copy(); + tStack.stackSize = 1; + Ic2Recipes.addMaceratorRecipe(tStack, tOutput); + } + } + + public static void mithrilRecipe() + { + ItemStack tOutput = new ItemStack(MysticOres.MithrilDust, 2, 0); + ArrayList tList = OreDictionary.getOres("oreMithril"); + for (int i = 0; i < tList.size(); i++) { + ItemStack tStack = tList.get(i); + tStack = tStack.copy(); + tStack.stackSize = 1; + Ic2Recipes.addMaceratorRecipe(tStack, tOutput); + } + } + + public static void verditeRecipe() + { + ItemStack tOutput = new ItemStack(MysticOres.VerditeDust, 2, 0); + ArrayList tList = OreDictionary.getOres("oreVerdite"); + for (int i = 0; i < tList.size(); i++) { + ItemStack tStack = tList.get(i); + tStack = tStack.copy(); + tStack.stackSize = 1; + Ic2Recipes.addMaceratorRecipe(tStack, tOutput); + } + } + +} +*/ \ No newline at end of file diff --git a/common/MysticOres/IridiumFuel.java b/common/MysticOres/IridiumFuel.java new file mode 100644 index 0000000..33d46c7 --- /dev/null +++ b/common/MysticOres/IridiumFuel.java @@ -0,0 +1,15 @@ +package MysticOres; + +import MysticOres.Items.ItemHandler; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.IFuelHandler; + +public class IridiumFuel implements IFuelHandler { + public int getBurnTime(ItemStack fuel) + { + if(fuel.itemID == ItemHandler.IridiumNugget.itemID) + return 12800; + else + return 0; + } +} diff --git a/common/MysticOres/Items/EnumTools.java b/common/MysticOres/Items/EnumTools.java new file mode 100644 index 0000000..45cd00e --- /dev/null +++ b/common/MysticOres/Items/EnumTools.java @@ -0,0 +1,13 @@ +package MysticOres.Items; + +import net.minecraft.item.EnumToolMaterial; +import net.minecraftforge.common.EnumHelper; + +public class EnumTools { + static EnumToolMaterial verditeToolMaterial = EnumHelper.addToolMaterial("Verdite", 1, 262, 5.0F, 1, 5); + static EnumToolMaterial mithrilToolMaterial = EnumHelper.addToolMaterial("Mithril", 2, 500, 7.0F, 2, 9); + static EnumToolMaterial adamantineToolMaterial = EnumHelper.addToolMaterial("Adamantine", 3, 3000, 10.0F, 4, 13); + static EnumToolMaterial iridiumToolMaterial = EnumHelper.addToolMaterial("Iridium", 3, 4000, 12.0F, 5, 15); + static EnumToolMaterial obsidianToolMaterial = EnumHelper.addToolMaterial("Obsidian", 3, 100, 4.0F, 5, 11); + static EnumToolMaterial bloodstoneToolMaterial = EnumHelper.addToolMaterial("Bloodstone", 3, 200, 16.0F, 8, 12); +} diff --git a/common/MysticOres/Items/ItemAxes.java b/common/MysticOres/Items/ItemAxes.java new file mode 100644 index 0000000..2a5a367 --- /dev/null +++ b/common/MysticOres/Items/ItemAxes.java @@ -0,0 +1,30 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemAxe; +import net.minecraft.item.ItemStack; +import cpw.mods.*; + +public class ItemAxes extends ItemAxe +{ + + public ItemAxes(int par1, EnumToolMaterial par2EnumToolMaterial) + { + super(par1, par2EnumToolMaterial); + + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} diff --git a/common/MysticOres/Items/ItemBase.java b/common/MysticOres/Items/ItemBase.java new file mode 100644 index 0000000..b6084d6 --- /dev/null +++ b/common/MysticOres/Items/ItemBase.java @@ -0,0 +1,27 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + + +public class ItemBase extends Item +{ + public ItemBase(int i) + { + super(i); + maxStackSize = 64; + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} \ No newline at end of file diff --git a/common/MysticOres/Items/ItemHandler.java b/common/MysticOres/Items/ItemHandler.java new file mode 100644 index 0000000..333687d --- /dev/null +++ b/common/MysticOres/Items/ItemHandler.java @@ -0,0 +1,133 @@ +package MysticOres.Items; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; +import cpw.mods.fml.common.registry.GameRegistry; + +public class ItemHandler { + public static Item AdamantineSword; + public static Item AdamantinePickaxe; + public static Item AdamantineShovel; + public static Item AdamantineAxe; + public static Item AdamantineHoe; + public static Item AdamantineIngot; + + public static Item BloodstoneSword; + public static Item BloodstonePickaxe; + public static Item BloodstoneShovel; + public static Item BloodstoneAxe; + public static Item BloodstoneHoe; + public static Item BloodstoneShard; + + public static Item TopazGem; + public static Item TourmalineGem; + public static Item AmethystGem; + public static Item AgateGem; + + public static Item MysticPowder; + + public static Item IridiumSword; + public static Item IridiumPickaxe; + public static Item IridiumShovel; + public static Item IridiumAxe; + public static Item IridiumHoe; + public static Item IridiumIngot; + public static Item IridiumNugget; + + public static Item MithrilSword; + public static Item MithrilPickaxe; + public static Item MithrilShovel; + public static Item MithrilAxe; + public static Item MithrilHoe; + public static Item MithrilIngot; + + public static Item ObsidianSword; + public static Item ObsidianPickaxe; + public static Item ObsidianShovel; + public static Item ObsidianAxe; + public static Item ObsidianHoe; + public static Item ObsidianShard; + public static Item ObsidianRod; + + public static Item VerditeSword; + public static Item VerditePickaxe; + public static Item VerditeShovel; + public static Item VerditeAxe; + public static Item VerditeHoe; + public static Item VerditeIngot; + + public static Item GlassShard; + + public static Item Satchel; + + public static Item AdamantineDust; + public static Item MithrilDust; + public static Item VerditeDust; + + public static void init(){ + AdamantineIngot = new ItemBase(Config.AdamantineIngotID).setUnlocalizedName("AdamantineIngot"); + MithrilIngot = new ItemBase(Config.MithrilIngotID).setUnlocalizedName("MithrilIngot"); + IridiumIngot = new ItemBase(Config.IridiumIngotID).setUnlocalizedName("IridiumIngot"); + + ObsidianShard = new ItemBase(Config.ObsidianShardID).setUnlocalizedName("ObsidianShard"); + BloodstoneShard = new ItemBase(Config.BloodstoneShardID).setUnlocalizedName("BloodstoneShard"); + + TopazGem = new ItemBase(Config.TopazGemID).setUnlocalizedName("TopazGem"); + TourmalineGem = new ItemBase(Config.TourmalineGemID).setUnlocalizedName("TourmalineGem"); + AmethystGem = new ItemBase(Config.AmethystGemID).setUnlocalizedName("AmethystGem"); + + IridiumNugget = new ItemBase(Config.IridiumNuggetID).setUnlocalizedName("IridiumNugget"); + GlassShard = new ItemBase(Config.GlassShardID).setUnlocalizedName("GlassShard"); + VerditeIngot = new ItemBase(Config.VerditeIngotID).setUnlocalizedName("VerditeIngot"); + + AdamantineSword = new ItemSwords(Config.AdamantineSwordID, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineSword"); + VerditeSword = new ItemSwords(Config.VerditeSwordID, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword"); + MithrilSword = new ItemSwords(Config.MithrilSwordID, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilSword"); + IridiumSword = new ItemSwords(Config.IridiumSwordID, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumSword"); + ObsidianSword = new ItemSwords(Config.ObsidianSwordID, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianSword"); + BloodstoneSword = new ItemSwords(Config.BloodstoneSwordID, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneSword"); + + AdamantinePickaxe = new ItemPickaxes(Config.AdamantinePickaxeID, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantinePickaxe"); + VerditePickaxe = new ItemPickaxes(Config.VerditePickaxeID, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe"); + MithrilPickaxe = new ItemPickaxes(Config.MithrilPickaxeID, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilPickaxe"); + IridiumPickaxe = new ItemPickaxes(Config.IridiumPickaxeID, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumPickaxe"); + ObsidianPickaxe = new ItemPickaxes(Config.ObsidianPickaxeID, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianPickaxe"); + BloodstonePickaxe = new ItemPickaxes(Config.BloodstonePickaxeID, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstonePickaxe"); + + AdamantineShovel = new ItemShovels(Config.AdamantineShovelID, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineShovel"); + VerditeShovel = new ItemShovels(Config.VerditeShovelID, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeShovel"); + MithrilShovel = new ItemShovels(Config.MithrilShovelID, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilShovel"); + IridiumShovel = new ItemShovels(Config.IridiumShovelID, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumShovel"); + ObsidianShovel = new ItemShovels(Config.ObsidianShovelID, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianShovel"); + BloodstoneShovel = new ItemShovels(Config.BloodstoneShovelID, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneShovel"); + + AdamantineAxe = new ItemAxes(Config.AdamantineAxeID, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineAxe"); + VerditeAxe = new ItemAxes(Config.VerditeAxeID, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeAxe"); + MithrilAxe = new ItemAxes(Config.MithrilAxeID, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilAxe"); + IridiumAxe = new ItemAxes(Config.IridiumAxeID, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumAxe"); + ObsidianAxe = new ItemAxes(Config.ObsidianAxeID, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianAxe"); + BloodstoneAxe = new ItemAxes(Config.BloodstoneAxeID, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneAxe"); + + AdamantineHoe = new ItemHoes(Config.AdamantineHoeID, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineHoe"); + VerditeHoe = new ItemHoes(Config.VerditeHoeID, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeHoe"); + MithrilHoe = new ItemHoes(Config.MithrilHoeID, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilHoe"); + IridiumHoe = new ItemHoes(Config.IridiumHoeID, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumHoe"); + ObsidianHoe = new ItemHoes(Config.ObsidianHoeID, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianHoe"); + BloodstoneHoe = new ItemHoes(Config.BloodstoneHoeID, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneHoe"); + + AdamantineDust = new ItemBase(Config.AdamantineDustID).setUnlocalizedName("AdamantineDust"); + MithrilDust = new ItemBase(Config.MithrilDustID).setUnlocalizedName("MithrilDust"); + VerditeDust = new ItemBase(Config.VerditeDustID).setUnlocalizedName("VerditeDust"); + AgateGem = new ItemBase(Config.AgateGemID).setUnlocalizedName("AgateGem"); + + ObsidianRod = new ItemBase(Config.ObsidianRodID).setUnlocalizedName("ObsidianRod"); + + MysticPowder = new ItemBase(Config.MysticPowderID).setUnlocalizedName("MysticPowder"); + + Satchel = new ItemSatchel(Config.SatchelID).setUnlocalizedName("Satchel"); + } +} diff --git a/common/MysticOres/Items/ItemHoes.java b/common/MysticOres/Items/ItemHoes.java new file mode 100644 index 0000000..ea0e6c8 --- /dev/null +++ b/common/MysticOres/Items/ItemHoes.java @@ -0,0 +1,30 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.entity.player.UseHoeEvent; + +public class ItemHoes extends ItemHoe +{ + + public ItemHoes(int par1, EnumToolMaterial par2EnumToolMaterial) + { + super(par1, par2EnumToolMaterial); + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} diff --git a/common/MysticOres/Items/ItemIridiumNugget.java b/common/MysticOres/Items/ItemIridiumNugget.java new file mode 100644 index 0000000..c8520f8 --- /dev/null +++ b/common/MysticOres/Items/ItemIridiumNugget.java @@ -0,0 +1,5 @@ +package MysticOres.Items; + +public class ItemIridiumNugget { + +} diff --git a/common/MysticOres/Items/ItemPickaxes.java b/common/MysticOres/Items/ItemPickaxes.java new file mode 100644 index 0000000..3314e63 --- /dev/null +++ b/common/MysticOres/Items/ItemPickaxes.java @@ -0,0 +1,28 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemStack; + +public class ItemPickaxes extends ItemPickaxe +{ + + public ItemPickaxes(int par1, EnumToolMaterial par2EnumToolMaterial) + { + super(par1, par2EnumToolMaterial); + + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} diff --git a/common/MysticOres/Items/ItemSatchel.java b/common/MysticOres/Items/ItemSatchel.java new file mode 100644 index 0000000..cbd064e --- /dev/null +++ b/common/MysticOres/Items/ItemSatchel.java @@ -0,0 +1,48 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.src.*; +import net.minecraft.world.World; + +public class ItemSatchel extends Item +{ + + public ItemSatchel(int par1) + { + super(par1); + setCreativeTab(MysticOres.MysticOresTab); + maxStackSize = 1; + } + + @Override + public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player) + { + if(!player.isSneaking()) + { + IInventory inv; + inv = player.getInventoryEnderChest(); + player.displayGUIChest(inv); + } + return is; + } + + @SideOnly(Side.CLIENT) + public boolean hasEffect(ItemStack par1ItemStack) + { + return true; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} diff --git a/common/MysticOres/Items/ItemShovels.java b/common/MysticOres/Items/ItemShovels.java new file mode 100644 index 0000000..924e97d --- /dev/null +++ b/common/MysticOres/Items/ItemShovels.java @@ -0,0 +1,28 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; + +public class ItemShovels extends ItemSpade +{ + + public ItemShovels(int par1, EnumToolMaterial par2EnumToolMaterial) + { + super(par1, par2EnumToolMaterial); + + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} diff --git a/common/MysticOres/Items/ItemSwords.java b/common/MysticOres/Items/ItemSwords.java new file mode 100644 index 0000000..7cd3d9a --- /dev/null +++ b/common/MysticOres/Items/ItemSwords.java @@ -0,0 +1,28 @@ +package MysticOres.Items; + +import MysticOres.MysticOres; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; + +public class ItemSwords extends ItemSword +{ + + public ItemSwords(int par1, EnumToolMaterial par2EnumToolMaterial) + { + super(par1, par2EnumToolMaterial); + + this.setCreativeTab(MysticOres.MysticOresTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} \ No newline at end of file diff --git a/common/MysticOres/Lang.java b/common/MysticOres/Lang.java new file mode 100644 index 0000000..46e9c82 --- /dev/null +++ b/common/MysticOres/Lang.java @@ -0,0 +1,78 @@ +package MysticOres; + +import MysticOres.Blocks.BlockHandler; +import MysticOres.Items.ItemHandler; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.registry.LanguageRegistry; + +public class Lang +{ + public static void init() + { + LanguageRegistry.instance().addName(BlockHandler.ReinforcedGlass, "Reinforced Glass"); + + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 0), "Adamantine"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 1), "Amethyst Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 2), "Iridium Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 3), "Mithril Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 4), "Tourmaline Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 5), "Topaz Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 6), "Verdite Ore"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 7), "Bloodstone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 8), "Black Soulstone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 9), "Blue Soulstone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 10), "Red Soulstone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.BlockOres, 1, 11), "Agate Ore"); + + LanguageRegistry.instance().addName(ItemHandler.AdamantineIngot, "Adamantine Ingot"); + LanguageRegistry.instance().addName(ItemHandler.MithrilIngot, "Mithril Ingot"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianShard, "Obsidian Shard"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianRod, "Obsidian Rod"); + LanguageRegistry.instance().addName(ItemHandler.BloodstoneShard, "Bloodstone Shard"); + LanguageRegistry.instance().addName(ItemHandler.TopazGem, "Topaz"); + LanguageRegistry.instance().addName(ItemHandler.AmethystGem, "Amethyst"); + LanguageRegistry.instance().addName(ItemHandler.TourmalineGem, "Tourmaline"); + LanguageRegistry.instance().addName(ItemHandler.MysticPowder, "Mystic Powder"); + LanguageRegistry.instance().addName(ItemHandler.IridiumIngot, "Iridium Ingot"); + LanguageRegistry.instance().addName(ItemHandler.IridiumNugget, "Iridium Nugget"); + LanguageRegistry.instance().addName(ItemHandler.GlassShard, "Glass Shard"); + LanguageRegistry.instance().addName(ItemHandler.VerditeIngot, "Verdite Ingot"); + LanguageRegistry.instance().addName(ItemHandler.VerditeDust, "Verdite Dust"); + LanguageRegistry.instance().addName(ItemHandler.MithrilDust, "Mithril Dust"); + LanguageRegistry.instance().addName(ItemHandler.AdamantineDust, "Adamantine Dust"); + LanguageRegistry.instance().addName(ItemHandler.AgateGem, "Agate"); + LanguageRegistry.instance().addName(ItemHandler.AdamantineSword, "Adamantine Sword"); + LanguageRegistry.instance().addName(ItemHandler.MithrilSword, "Mithril Sword"); + LanguageRegistry.instance().addName(ItemHandler.VerditeSword, "Verdite Sword"); + LanguageRegistry.instance().addName(ItemHandler.IridiumSword, "Iridium Sword"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianSword, "Obsidian Sword"); + LanguageRegistry.instance().addName(ItemHandler.BloodstoneSword, "Bloodstone Sword"); + LanguageRegistry.instance().addName(ItemHandler.AdamantinePickaxe, "Adamantine Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.MithrilPickaxe, "Mithril Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.VerditePickaxe, "Verdite Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.IridiumPickaxe, "Iridium Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianPickaxe, "Obsidian Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.BloodstonePickaxe, "Bloodstone Pickaxe"); + LanguageRegistry.instance().addName(ItemHandler.AdamantineShovel, "Adamantine Shovel"); + LanguageRegistry.instance().addName(ItemHandler.MithrilShovel, "Mithril Shovel"); + LanguageRegistry.instance().addName(ItemHandler.VerditeShovel, "Verdite Shovel"); + LanguageRegistry.instance().addName(ItemHandler.IridiumShovel, "Iridium Shovel"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianShovel, "Obsidian Shovel"); + LanguageRegistry.instance().addName(ItemHandler.BloodstoneShovel, "Bloodstone Shovel"); + LanguageRegistry.instance().addName(ItemHandler.AdamantineAxe, "Adamantine Axe"); + LanguageRegistry.instance().addName(ItemHandler.MithrilAxe, "Mithril Axe"); + LanguageRegistry.instance().addName(ItemHandler.VerditeAxe, "Verdite Axe"); + LanguageRegistry.instance().addName(ItemHandler.IridiumAxe, "Iridium Axe"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianAxe, "Obsidian Axe"); + LanguageRegistry.instance().addName(ItemHandler.BloodstoneAxe, "Bloodstone Axe"); + LanguageRegistry.instance().addName(ItemHandler.AdamantineHoe, "Adamantine Hoe"); + LanguageRegistry.instance().addName(ItemHandler.MithrilHoe, "Mithril Hoe"); + LanguageRegistry.instance().addName(ItemHandler.VerditeHoe, "Verdite Hoe"); + LanguageRegistry.instance().addName(ItemHandler.IridiumHoe, "Iridium Hoe"); + LanguageRegistry.instance().addName(ItemHandler.Satchel, "Magical Bag"); + LanguageRegistry.instance().addName(ItemHandler.BloodstoneHoe, "Bloodstone Hoe"); + LanguageRegistry.instance().addName(ItemHandler.ObsidianHoe, "Obsidian Hoe"); + + LanguageRegistry.instance().addStringLocalization("itemGroup.MysticOresTab", "en_US", "Mystic Ores!"); + } +} diff --git a/common/MysticOres/Lib/BlockIds.java b/common/MysticOres/Lib/BlockIds.java new file mode 100644 index 0000000..0d23204 --- /dev/null +++ b/common/MysticOres/Lib/BlockIds.java @@ -0,0 +1,5 @@ +package MysticOres.Lib; + +public class BlockIds { + +} diff --git a/common/MysticOres/Lib/ItemIds.java b/common/MysticOres/Lib/ItemIds.java new file mode 100644 index 0000000..48130aa --- /dev/null +++ b/common/MysticOres/Lib/ItemIds.java @@ -0,0 +1,5 @@ +package MysticOres.Lib; + +public class ItemIds { + +} diff --git a/common/MysticOres/Lib/Strings.java b/common/MysticOres/Lib/Strings.java new file mode 100644 index 0000000..a3242c5 --- /dev/null +++ b/common/MysticOres/Lib/Strings.java @@ -0,0 +1,5 @@ +package MysticOres.Lib; + +public class Strings { + +} diff --git a/common/MysticOres/ModHandler.java b/common/MysticOres/ModHandler.java new file mode 100644 index 0000000..2cdb554 --- /dev/null +++ b/common/MysticOres/ModHandler.java @@ -0,0 +1,62 @@ +package MysticOres; + +import MysticOres.Blocks.BlockHandler; +import MysticOres.Items.ItemHandler; +import thaumcraft.api.EnumTag; +import thaumcraft.api.ObjectTags; +import thaumcraft.api.ThaumcraftApi; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; + +public class ModHandler +{ + public static void init() + { + + //Thaumcraft API + if(Loader.isModLoaded("Thaumcraft") == true) + { + ThaumcraftApi.registerObjectTag(ItemHandler.AdamantineIngot.itemID, 0, (new ObjectTags()).add(EnumTag.METAL, 10).add(EnumTag.VALUABLE, 4)); + ThaumcraftApi.registerObjectTag(ItemHandler.MithrilIngot.itemID, 0, (new ObjectTags()).add(EnumTag.METAL, 8).add(EnumTag.MAGIC, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.VerditeIngot.itemID, 0, (new ObjectTags()).add(EnumTag.METAL, 8).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.IridiumIngot.itemID, 0, (new ObjectTags()).add(EnumTag.METAL, 16).add(EnumTag.VALUABLE, 8)); + ThaumcraftApi.registerObjectTag(ItemHandler.AmethystGem.itemID, 0, (new ObjectTags()).add(EnumTag.MAGIC, 4).add(EnumTag.VALUABLE, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.TourmalineGem.itemID, 0, (new ObjectTags()).add(EnumTag.MAGIC, 4).add(EnumTag.VALUABLE, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.TopazGem.itemID, 0, (new ObjectTags()).add(EnumTag.MAGIC, 4).add(EnumTag.VALUABLE, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.AgateGem.itemID, 0, (new ObjectTags()).add(EnumTag.MAGIC, 4).add(EnumTag.VALUABLE, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.MysticPowder.itemID, 0, (new ObjectTags()).add(EnumTag.MAGIC, 4).add(EnumTag.VALUABLE, 2) + .add(EnumTag.EXCHANGE, 9)); + ThaumcraftApi.registerObjectTag(BlockHandler.ReinforcedGlass.blockID, 0, (new ObjectTags()).add(EnumTag.CRYSTAL, 4).add(EnumTag.ROCK, 2)); + ThaumcraftApi.registerObjectTag(ItemHandler.IridiumNugget.itemID, 0, (new ObjectTags()).add(EnumTag.POISON, 2).add(EnumTag.FIRE, 1).add(EnumTag.MAGIC, 4) + .add(EnumTag.POWER, 6)); + ThaumcraftApi.registerObjectTag(ItemHandler.BloodstoneShard.itemID, 0, (new ObjectTags()).add(EnumTag.CRYSTAL, 1).add(EnumTag.DARK, 1)); + ThaumcraftApi.registerObjectTag(BlockHandler.BlockOres.blockID, 7, (new ObjectTags()).add(EnumTag.DARK, 4).add(EnumTag.EVIL, 2)); + + System.out.println("[Mystic Ores] Thaumcraft Integration Initialized Successfully!"); + } + + + //IC2 API + /* + if(Loader.isModLoaded("IC2") == true && Config.DustsEnabled == true) + { + IC2Handler.adamantineRecipe(); + IC2Handler.mithrilRecipe(); + IC2Handler.verditeRecipe(); + } + */ + + /* + //TE API + if(Loader.isModLoaded("ThermalExpansion") == true && Config.DustsEnabled == true) + { + ThermalExpansionHandler.init(); + + GameRegistry.addSmelting(MysticOres.AdamantineDust.itemID, new ItemStack(MysticOres.AdamantineIngot), 0.0F); + GameRegistry.addSmelting(MysticOres.MithrilDust.itemID, new ItemStack(MysticOres.MithrilIngot), 0.0F); + GameRegistry.addSmelting(MysticOres.VerditeDust.itemID, new ItemStack(MysticOres.VerditeIngot), 0.0F); + } + */ + } +} diff --git a/common/MysticOres/MysticOres.java b/common/MysticOres/MysticOres.java new file mode 100644 index 0000000..5f484f2 --- /dev/null +++ b/common/MysticOres/MysticOres.java @@ -0,0 +1,91 @@ +package MysticOres; + +import java.io.File; +import java.util.Random; + +import MysticOres.Blocks.BlockHandler; +import MysticOres.Blocks.BlockOres; +import MysticOres.Blocks.BlockReinforcedGlass; +import MysticOres.Blocks.ItemBlockOres; +import MysticOres.Items.ItemAxes; +import MysticOres.Items.ItemBase; +import MysticOres.Items.ItemHandler; +import MysticOres.Items.ItemHoes; +import MysticOres.Items.ItemPickaxes; +import MysticOres.Items.ItemSatchel; +import MysticOres.Items.ItemShovels; +import MysticOres.Items.ItemSwords; +import MysticOres.Worldgen.WorldGenHandler; +import MysticOres.Worldgen.WorldGenAdamantine; +import MysticOres.Worldgen.WorldGenAgate; +import MysticOres.Worldgen.WorldGenAmethyst; +import MysticOres.Worldgen.WorldGenIridium; +import MysticOres.Worldgen.WorldGenMithril; +import MysticOres.Worldgen.WorldGenMysticNetherMinable; +import MysticOres.Worldgen.WorldGenTopaz; +import MysticOres.Worldgen.WorldGenTourmaline; +import MysticOres.Worldgen.WorldGenVerdite; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockGrass; +import net.minecraft.block.BlockLeaves; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.DungeonHooks; +import net.minecraftforge.common.EnumHelper; +import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.ForgeVersion; +import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.Init; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.Mod.PostInit; +import cpw.mods.fml.common.Mod.PreInit; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@Mod(modid = "Mystic Ores", name = "Mystic Ores", version = "0.1") +@NetworkMod(clientSideRequired = true, serverSideRequired = false) + +public class MysticOres +{ + public static CreativeTabs MysticOresTab = new TabMysticOres(CreativeTabs.getNextID(), "MysticOresTab"); + + @PreInit + public void preInit(FMLPreInitializationEvent event) + { + Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic Ores.cfg")); + Config.save(); + } + + @Init + public void load(FMLInitializationEvent event) + { + BlockHandler.init(); + ItemHandler.init(); + GameRegistry.registerFuelHandler(new IridiumFuel()); + RecipeHandler.init(); + OreDictionaryHandler.init(); + WorldGenHandler.init(); + Lang.init(); + } + + @PostInit + public void postInit(FMLPostInitializationEvent event) + { + ModHandler.init(); + } +} diff --git a/common/MysticOres/OreDictionaryHandler.java b/common/MysticOres/OreDictionaryHandler.java new file mode 100644 index 0000000..609dba4 --- /dev/null +++ b/common/MysticOres/OreDictionaryHandler.java @@ -0,0 +1,33 @@ +package MysticOres; + +import MysticOres.Blocks.BlockHandler; +import MysticOres.Items.ItemHandler; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class OreDictionaryHandler +{ + public static void init() + { + OreDictionary.registerOre("ingotAdamantine", new ItemStack(ItemHandler.AdamantineIngot)); + OreDictionary.registerOre("ingotMithril", new ItemStack(ItemHandler.MithrilIngot)); + OreDictionary.registerOre("ingotVerdite", new ItemStack(ItemHandler.VerditeIngot)); + OreDictionary.registerOre("ingotIridium", new ItemStack(ItemHandler.IridiumIngot)); + OreDictionary.registerOre("gemTourmaline", new ItemStack(ItemHandler.TourmalineGem)); + OreDictionary.registerOre("gemTopaz", new ItemStack(ItemHandler.TopazGem)); + OreDictionary.registerOre("gemAmethyst", new ItemStack(ItemHandler.AmethystGem)); + OreDictionary.registerOre("gemAgate", new ItemStack(ItemHandler.AgateGem)); + + OreDictionary.registerOre("oreAdamantine", new ItemStack(BlockHandler.BlockOres, 1, 0)); + OreDictionary.registerOre("oreAmethyst", new ItemStack(BlockHandler.BlockOres, 1, 1)); + OreDictionary.registerOre("oreIridium", new ItemStack(BlockHandler.BlockOres, 1, 2)); + OreDictionary.registerOre("oreMithril", new ItemStack(BlockHandler.BlockOres, 1, 3)); + OreDictionary.registerOre("oreSapphire", new ItemStack(BlockHandler.BlockOres, 1, 4)); + OreDictionary.registerOre("oreTopaz", new ItemStack(BlockHandler.BlockOres, 1, 5)); + OreDictionary.registerOre("oreVerdite", new ItemStack(BlockHandler.BlockOres, 1, 6)); + OreDictionary.registerOre("oreBloodstone", new ItemStack(BlockHandler.BlockOres, 1, 7)); + OreDictionary.registerOre("oreBlackSoulstone", new ItemStack(BlockHandler.BlockOres, 1, 8)); + OreDictionary.registerOre("oreRedSoulstone", new ItemStack(BlockHandler.BlockOres, 1, 9)); + OreDictionary.registerOre("oreBlueSoulstone", new ItemStack(BlockHandler.BlockOres, 1, 10)); + } +} diff --git a/common/MysticOres/RecipeHandler.java b/common/MysticOres/RecipeHandler.java new file mode 100644 index 0000000..6bf899e --- /dev/null +++ b/common/MysticOres/RecipeHandler.java @@ -0,0 +1,572 @@ +package MysticOres; + +import MysticOres.Blocks.BlockHandler; +import MysticOres.Items.ItemHandler; +import net.minecraft.block.Block; +import net.minecraft.block.BlockGrass; +import net.minecraft.block.BlockLeaves; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import cpw.mods.fml.common.registry.GameRegistry; + +public class RecipeHandler +{ + public static void init(){ + recipes(); + blockRecipes(); + blockSmelting(); + itemRecipes(); + itemSmelting(); + mysticGemRecipes(); + mysticPowderRecipes(); + } + + private static void recipes() + { + GameRegistry.addRecipe(new ItemStack(Block.glass, 1), new Object [] { + "##", "##", '#', ItemHandler.GlassShard + }); + + GameRegistry.addRecipe(new ItemStack(Block.obsidian, 1), new Object[] { + "##", "##", '#', ItemHandler.ObsidianShard + }); + } + + private static void blockRecipes(){ + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockOres, 8, 7), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockOres, 16, 7), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), new ItemStack(BlockHandler.BlockOres, 1, 3), Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockOres, 8, 3), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(BlockHandler.ReinforcedGlass, 8), new Object[] { + "###", "#D#", "###", '#', ItemHandler.GlassShard, 'D', ItemHandler.ObsidianShard + }); + + GameRegistry.addRecipe(new ItemStack(BlockHandler.BlockOres, 1, 7), new Object[] { + "##", "##", '#', ItemHandler.BloodstoneShard + }); + + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockOres, 2, 7), new Object[] { + ItemHandler.MysticPowder, new ItemStack(BlockHandler.BlockOres, 1, 7) + }); + + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockOres, 2, 3), new Object[] { + ItemHandler.MysticPowder, new ItemStack(BlockHandler.BlockOres, 1, 3) + }); + + GameRegistry.addShapelessRecipe(new ItemStack(BlockHandler.BlockOres, 2, 0), new Object[] { + ItemHandler.MysticPowder, new ItemStack(BlockHandler.BlockOres, 1, 0) + }); + } + + private static void blockSmelting(){ + FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockOres.blockID, 0, new ItemStack(ItemHandler.AdamantineIngot), 0.9F); + FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockOres.blockID, 3, new ItemStack(ItemHandler.MithrilIngot), 0.7F); + FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockOres.blockID, 6, new ItemStack(ItemHandler.VerditeIngot), 0.4F); + } + + private static void itemRecipes(){ + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianRod, 2), new Object[] { + "#", "#", '#', ItemHandler.ObsidianShard + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumIngot, 1), new Object[] { + "###", "#O#", "###", '#', ItemHandler.IridiumNugget, 'O', ItemHandler.AdamantineIngot + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.GlassShard, 4), new Object[] { + Block.glass + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.ObsidianShard, 4), new Object[] { + Block.obsidian + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.MysticPowder, 8), new Object[] { + ItemHandler.TourmalineGem, ItemHandler.TopazGem, ItemHandler.AmethystGem, ItemHandler.AgateGem + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.BloodstoneShard, 2), new Object[] { + new ItemStack(BlockHandler.BlockOres, 1, 7) + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditePickaxe, 1), new Object[] { + "###", " S ", " S ", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeSword, 1), new Object[] { + "#", "#", "S", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeShovel, 1), new Object[] { + "#", "S", "S", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeHoe, 1), new Object[] { + "## ", " S ", " S ", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeHoe, 1), new Object[] { + "## ", "S ", "S ", '#', ItemHandler.VerditeIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilPickaxe, 1), new Object[] { + "###", " S ", " S ", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilSword, 1), new Object[] { + "#", "#", "S", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilShovel, 1), new Object[] { + "#", "S", "S", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilHoe, 1), new Object[] { + "## ", " S ", " S ", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.MithrilHoe, 1), new Object[] { + "## ", "S ", "S ", '#', ItemHandler.MithrilIngot, 'S', Item.stick + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantinePickaxe, 1), new Object[] { + "###", " S ", " S ", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineSword, 1), new Object[] { + "#", "#", "S", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineShovel, 1), new Object[] { + "#", "S", "S", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineHoe, 1), new Object[] { + "## ", " S ", " S ", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.AdamantineHoe, 1), new Object[] { + "## ", "S ", "S ", '#', ItemHandler.AdamantineIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumPickaxe, 1), new Object[] { + "###", " S ", " S ", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumSword, 1), new Object[] { + "#", "#", "S", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumShovel, 1), new Object[] { + "#", "S", "S", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumHoe, 1), new Object[] { + "## ", " S ", " S ", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumHoe, 1), new Object[] { + "## ", "S ", "S ", '#', ItemHandler.IridiumIngot, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianPickaxe, 1), new Object[] { + "###", " S ", " S ", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianSword, 1), new Object[] { + "#", "#", "S", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianShovel, 1), new Object[] { + "#", "S", "S", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianHoe, 1), new Object[] { + "## ", " S ", " S ", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianHoe, 1), new Object[] { + "## ", "S ", "S ", '#', Block.obsidian, 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstonePickaxe, 1), new Object[] { + "###", " S ", " S ", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneSword, 1), new Object[] { + "#", "#", "S", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneShovel, 1), new Object[] { + "#", "S", "S", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneAxe, 1), new Object[] { + "## ", "#S ", " S ", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneAxe, 1), new Object[] { + "## ", "S# ", "S ", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneHoe, 1), new Object[] { + "## ", " S ", " S ", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneHoe, 1), new Object[] { + "## ", "S ", "S ", '#', new ItemStack(BlockHandler.BlockOres, 1, 7), 'S', ItemHandler.ObsidianRod + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.Satchel, 1), new Object[] { + "#$#", "$%$", "#$#", '#', Item.silk, '$', ItemHandler.MysticPowder, '%', Block.enderChest + }); + } + + private static void itemSmelting(){ + GameRegistry.addSmelting(ItemHandler.AdamantineDust.itemID, new ItemStack(ItemHandler.AdamantineIngot), 0.0F); + GameRegistry.addSmelting(ItemHandler.MithrilDust.itemID, new ItemStack(ItemHandler.MithrilIngot), 0.0F); + GameRegistry.addSmelting(ItemHandler.VerditeDust.itemID, new ItemStack(ItemHandler.VerditeIngot), 0.0F); + } + + private static void mysticGemRecipes() + { + GameRegistry.addRecipe(new ItemStack(Item.slimeBall, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.stone, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.cobblestoneMossy, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.cobblestone, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(BlockGrass.grass, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sand, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.seeds, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sapling, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.wheat, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.reed, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.seeds, 32), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.cactus, 32), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.slimeBall, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreCoal, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.gravel, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.flint, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), ItemHandler.GlassShard, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.tallGrass, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.seeds, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.bookShelf, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.planks, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.cloth, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.glass, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.leather, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.stick, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.glass, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.stone, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.ice, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.blockSnow, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.blockLapis, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.blockIron, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.reed, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sapling, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.glass, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sand, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.blockSnow, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreLapis, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.oreCoal, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.snowball, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.reed, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.sugar, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.clay, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.slimeBall, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.mushroomBrown, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.seeds, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.sandStone, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.planks, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.snow, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.glass, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.silk, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.stick, Character.valueOf('O'), ItemHandler.TourmalineGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.sandStone, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.stone, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.netherrack, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.cobblestone, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.blockGold, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.blockIron, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.wood, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sapling, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.sponge, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sand, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreIron, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreRedstone, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.oreLapis, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.appleRed, 1), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.reed, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.feather, 32), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.arrow, 32), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), ItemHandler.GlassShard, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.mushroomRed, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.seeds, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.doorWood, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.planks, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.glowStone, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.glass, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.bone, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.stick, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.blockClay, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.stone, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.tnt, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.brick, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.diamond, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.blockLapis, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(BlockLeaves.leaves, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sapling, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreGold, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.sand, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.oreDiamond, 4), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.oreRedstone, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.book, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.reed, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.cookie, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Item.cake, 1), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.slimeBall, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.music, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.planks, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(Block.pumpkinLantern, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Block.glass, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.VerditeIngot, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.ingotIron, Character.valueOf('O'), ItemHandler.AgateGem + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.BloodstoneShard, 16), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), ItemHandler.ObsidianShard, Character.valueOf('O'), ItemHandler.TopazGem + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.IridiumNugget, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), ItemHandler.ObsidianShard, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianShard, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), ItemHandler.GlassShard, Character.valueOf('O'), ItemHandler.AmethystGem + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler.ObsidianRod, 8), new Object[] { + "XXX", "XOX", "XXX", Character.valueOf('X'), Item.stick, Character.valueOf('O'), ItemHandler.AmethystGem + }); + } + + private static void mysticPowderRecipes(){ + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreGold + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreIron + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.BloodstoneShard, 2), new Object[] { + ItemHandler.MysticPowder, ItemHandler.BloodstoneShard + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 2), new Object[] { + ItemHandler.MysticPowder, Item.gunpowder + }); + + GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.IridiumNugget, 2), new Object[] { + ItemHandler.MysticPowder, ItemHandler.IridiumNugget + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreCoal, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreCoal + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreIron, 3), new Object[] { + ItemHandler.MysticPowder, Block.oreIron + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreGold, 3), new Object[] { + ItemHandler.MysticPowder, Block.oreGold + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreRedstone, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreRedstone + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreLapis, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreLapis + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Block.oreDiamond, 2), new Object[] { + ItemHandler.MysticPowder, Block.oreDiamond + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Item.sugar, 18), new Object[] { + ItemHandler.MysticPowder, Item.sugar + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Item.redstone, 12), new Object[] { + ItemHandler.MysticPowder, Item.redstone + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Item.lightStoneDust, 6), new Object[] { + ItemHandler.MysticPowder, Item.lightStoneDust + }); + + GameRegistry.addShapelessRecipe(new ItemStack(Item.gunpowder, 3), new Object[] { + ItemHandler.MysticPowder, Item.gunpowder + }); + } +} diff --git a/common/MysticOres/TabMysticOres.java b/common/MysticOres/TabMysticOres.java new file mode 100644 index 0000000..45c997a --- /dev/null +++ b/common/MysticOres/TabMysticOres.java @@ -0,0 +1,19 @@ +package MysticOres; + +import MysticOres.Blocks.BlockHandler; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; + +public class TabMysticOres extends CreativeTabs { + + public TabMysticOres(int par1, String par2Str) { + super(par1, par2Str); + } + + @Override + public ItemStack getIconItemStack() { + return new ItemStack(BlockHandler.BlockOres, 1, 7); + } + +} diff --git a/common/MysticOres/ThermalExpansionHandler.java b/common/MysticOres/ThermalExpansionHandler.java new file mode 100644 index 0000000..365a347 --- /dev/null +++ b/common/MysticOres/ThermalExpansionHandler.java @@ -0,0 +1,32 @@ +package MysticOres; + +/* + +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.Loader; +import thermalexpansion.api.crafting.*; + +public class ThermalExpansionHandler +{ + public static void init() + { + //Adamantine Recipe + CraftingManagers.pulverizerManager.addRecipe(400, new ItemStack(MysticOres.BlockOres, 1, 0), + new ItemStack(MysticOres.AdamantineDust, 2, 0), true); + + //Mithril Recipe + CraftingManagers.pulverizerManager.addRecipe(400, new ItemStack(MysticOres.BlockOres, 1, 3), + new ItemStack(MysticOres.MithrilDust, 2, 0), true); + + //Verdite Recipe + CraftingManagers.pulverizerManager.addRecipe(400, new ItemStack(MysticOres.BlockOres, 1, 6), + new ItemStack(MysticOres.VerditeDust, 2, 0), true); + + //Iridium Ingot Recipe + CraftingManagers.smelterManager.addRecipe(800, new ItemStack(MysticOres.AdamantineIngot, 1, 0), + new ItemStack(MysticOres.IridiumNugget, 8, 0), new ItemStack(MysticOres.IridiumIngot, 2, 0), + true); + } +} + +*/ \ No newline at end of file diff --git a/common/MysticOres/Worldgen/NetherHandler.java b/common/MysticOres/Worldgen/NetherHandler.java new file mode 100644 index 0000000..ffa413b --- /dev/null +++ b/common/MysticOres/Worldgen/NetherHandler.java @@ -0,0 +1,75 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class NetherHandler extends WorldGenerator { + + private int minableBlockId; + private int minableBlockMeta = 0; + + private int numberOfBlocks; + + public NetherHandler(int par1, int par2) { + this.minableBlockId = par1; + this.numberOfBlocks = par2; + } + + public NetherHandler(int id, int meta, int number) { + this(id, number); + minableBlockMeta = meta; + } + + @Override + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { + float var6 = par2Random.nextFloat() * (float) Math.PI; + double var7 = (double) ((float) (par3 + 8) + MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F); + double var9 = (double) ((float) (par3 + 8) - MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F); + double var11 = (double) ((float) (par5 + 8) + MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F); + double var13 = (double) ((float) (par5 + 8) - MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F); + double var15 = (double) (par4 + par2Random.nextInt(3) - 2); + double var17 = (double) (par4 + par2Random.nextInt(3) - 2); + + for (int nBlockNumberTry = 0; nBlockNumberTry <= this.numberOfBlocks; ++nBlockNumberTry) { + double var20 = var7 + (var9 - var7) * (double) nBlockNumberTry / (double) this.numberOfBlocks; + double var22 = var15 + (var17 - var15) * (double) nBlockNumberTry / (double) this.numberOfBlocks; + double var24 = var11 + (var13 - var11) * (double) nBlockNumberTry / (double) this.numberOfBlocks; + double var26 = par2Random.nextDouble() * (double) this.numberOfBlocks / 16.0D; + double var28 = (double) (MathHelper.sin((float) nBlockNumberTry * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D; + double var30 = (double) (MathHelper.sin((float) nBlockNumberTry * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D; + int var32 = MathHelper.floor_double(var20 - var28 / 2.0D); + int var33 = MathHelper.floor_double(var22 - var30 / 2.0D); + int var34 = MathHelper.floor_double(var24 - var28 / 2.0D); + int var35 = MathHelper.floor_double(var20 + var28 / 2.0D); + int var36 = MathHelper.floor_double(var22 + var30 / 2.0D); + int var37 = MathHelper.floor_double(var24 + var28 / 2.0D); + + for (int var38 = var32; var38 <= var35; ++var38) { + double var39 = ((double) var38 + 0.5D - var20) / (var28 / 2.0D); + + if (var39 * var39 < 1.0D) { + for (int var41 = var33; var41 <= var36; ++var41) { + double var42 = ((double) var41 + 0.5D - var22) / (var30 / 2.0D); + + if (var39 * var39 + var42 * var42 < 1.0D) { + for (int var44 = var34; var44 <= var37; ++var44) { + double var45 = ((double) var44 + 0.5D - var24) / (var28 / 2.0D); + + int blocktoreplace = par1World.getBlockId(var38, var41, var44); + if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Block.netherrack.blockID) { + par1World.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 3); + } + } + } + } + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenAdamantine.java b/common/MysticOres/Worldgen/WorldGenAdamantine.java new file mode 100644 index 0000000..2c6c7f7 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenAdamantine.java @@ -0,0 +1,34 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenAdamantine implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Config.AdamantineRarity; i++) + { + int Xcoord = blockX + random.nextInt(8); + int Ycoord = random.nextInt(16); + int Zcoord = blockZ + random.nextInt(8); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 0, 3)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenAgate.java b/common/MysticOres/Worldgen/WorldGenAgate.java new file mode 100644 index 0000000..7178687 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenAgate.java @@ -0,0 +1,35 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenAgate implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Config.AgateRarity; i++) + { + int Xcoord = blockX + random.nextInt(32); + int Ycoord = random.nextInt(60); + int Zcoord = blockZ + random.nextInt(32); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 11, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenAmethyst.java b/common/MysticOres/Worldgen/WorldGenAmethyst.java new file mode 100644 index 0000000..489a5da --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenAmethyst.java @@ -0,0 +1,36 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenAmethyst implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.AmethystRarity; i++) + { + int Xcoord = blockX + random.nextInt(24); + int Ycoord = random.nextInt(60); + int Zcoord = blockZ + random.nextInt(24); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 1, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenHandler.java b/common/MysticOres/Worldgen/WorldGenHandler.java new file mode 100644 index 0000000..c785994 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenHandler.java @@ -0,0 +1,24 @@ +package MysticOres.Worldgen; + +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; +import cpw.mods.fml.common.registry.GameRegistry; + +public class WorldGenHandler +{ + public static void init() + { + GameRegistry.registerWorldGenerator(new WorldGenVerdite()); + GameRegistry.registerWorldGenerator(new WorldGenTopaz()); + GameRegistry.registerWorldGenerator(new WorldGenTourmaline()); + GameRegistry.registerWorldGenerator(new WorldGenMithril()); + GameRegistry.registerWorldGenerator(new WorldGenIridium()); + GameRegistry.registerWorldGenerator(new WorldGenAmethyst()); + GameRegistry.registerWorldGenerator(new WorldGenAdamantine()); + GameRegistry.registerWorldGenerator(new WorldGenAgate()); + GameRegistry.registerWorldGenerator(new WorldGenMysticNetherMinable(BlockHandler.BlockOres.blockID, 7, 1)); + GameRegistry.registerWorldGenerator(new WorldGenMysticNetherMinable(BlockHandler.BlockOres.blockID, 8, 3)); + GameRegistry.registerWorldGenerator(new WorldGenMysticNetherMinable(BlockHandler.BlockOres.blockID, 9, 2)); + GameRegistry.registerWorldGenerator(new WorldGenMysticNetherMinable(BlockHandler.BlockOres.blockID, 10, 3)); + } +} diff --git a/common/MysticOres/Worldgen/WorldGenIridium.java b/common/MysticOres/Worldgen/WorldGenIridium.java new file mode 100644 index 0000000..e86c8b1 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenIridium.java @@ -0,0 +1,36 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenIridium implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.IridiumRarity; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(12); + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 2, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenMithril.java b/common/MysticOres/Worldgen/WorldGenMithril.java new file mode 100644 index 0000000..e588637 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenMithril.java @@ -0,0 +1,35 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenMithril implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Config.MithrilRarity; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(64); + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 3, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenMysticNetherMinable.java b/common/MysticOres/Worldgen/WorldGenMysticNetherMinable.java new file mode 100644 index 0000000..106dd79 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenMysticNetherMinable.java @@ -0,0 +1,45 @@ +package MysticOres.Worldgen; + +import java.util.Random; + + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenMysticNetherMinable implements IWorldGenerator { + + private int minableBlockId; + private int minableBlockMeta = 0; + + private int numberOfBlocks; + + public WorldGenMysticNetherMinable(int blockId, int numBlocks) { + this.minableBlockId = blockId; + this.numberOfBlocks = numBlocks; + } + + public WorldGenMysticNetherMinable(int blockId, int meta, int numBlocks) { + this(blockId, numBlocks); + minableBlockMeta = meta; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + if (world.provider.isHellWorld) + generateNether(world, random, chunkX * 16, chunkZ * 16); + + } + + private void generateNether(World world, Random random, int i, int j) { + for (int j1 = 0; j1 < 50; j1++) { + int Xcoordinate = i + random.nextInt(16); + int Zcoordinate = j + random.nextInt(16); + int Ycoordinate = random.nextInt(256); + new NetherHandler(minableBlockId, minableBlockMeta, numberOfBlocks).generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate); + } + + } + +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenTopaz.java b/common/MysticOres/Worldgen/WorldGenTopaz.java new file mode 100644 index 0000000..597015c --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenTopaz.java @@ -0,0 +1,35 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenTopaz implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Config.TopazRarity; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(60); + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 5, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenTourmaline.java b/common/MysticOres/Worldgen/WorldGenTourmaline.java new file mode 100644 index 0000000..f77094b --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenTourmaline.java @@ -0,0 +1,33 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenTourmaline implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) { + for (int i = 0; i < Config.TourmalineRarity; i++){ + int Xcoord = blockX + random.nextInt(32); + int Ycoord = random.nextInt(60); + int Zcoord = blockZ + random.nextInt(32); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 4, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } \ No newline at end of file diff --git a/common/MysticOres/Worldgen/WorldGenVerdite.java b/common/MysticOres/Worldgen/WorldGenVerdite.java new file mode 100644 index 0000000..1911a11 --- /dev/null +++ b/common/MysticOres/Worldgen/WorldGenVerdite.java @@ -0,0 +1,36 @@ +package MysticOres.Worldgen; + +import java.util.Random; + +import MysticOres.Config; +import MysticOres.MysticOres; +import MysticOres.Blocks.BlockHandler; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenVerdite implements IWorldGenerator { + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.VerditeRarity; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(30) + 70; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(BlockHandler.BlockOres.blockID, 6, 9, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } +} \ No newline at end of file diff --git a/common/MysticRuins/Config.java b/common/MysticRuins/Config.java new file mode 100644 index 0000000..db0654f --- /dev/null +++ b/common/MysticRuins/Config.java @@ -0,0 +1,25 @@ +package MysticRuins; + +import java.io.File; + +import net.minecraftforge.common.Configuration; + +public class Config +{ + public static Configuration config; + public static int RuinRarity; + public static int DunRarity; + + public static void initialize(File file) + { + config = new Configuration(file); + RuinRarity = config.get("General", "Ruin Rarity", 2).getInt(); + DunRarity = config.get("General", "Mystic Dungeon Rarity", 1).getInt(); + config.save(); + } + + public static void save() + { + config.save(); + } +} \ No newline at end of file diff --git a/common/MysticRuins/DungeonLoot.java b/common/MysticRuins/DungeonLoot.java new file mode 100644 index 0000000..f1ab95f --- /dev/null +++ b/common/MysticRuins/DungeonLoot.java @@ -0,0 +1,30 @@ +package MysticRuins; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; + +public class DungeonLoot +{ + public DungeonLoot() + { + addLoot(); + } + + public static ChestGenHooks MysticRuinChest; + + public static void addLoot () + { + MysticRuinChest = new ChestGenHooks("MysticRuinChest", new WeightedRandomChestContent[0], 3, 27); + + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.ingotGold, 1, 0), 60, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.diamond, 1, 0), 100, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.ingotIron, 1, 0), 30, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.enderPearl, 4, 0), 20, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.appleRed, 3, 0), 10, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.appleGold, 1, 0), 50, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.emerald, 1, 0), 200, 1, 1)); + MysticRuinChest.addItem(new WeightedRandomChestContent(new ItemStack(Item.shovelIron, 1, 0), 60, 1, 1)); + } +} diff --git a/common/MysticRuins/MysticRuins.java b/common/MysticRuins/MysticRuins.java new file mode 100644 index 0000000..6509f5a --- /dev/null +++ b/common/MysticRuins/MysticRuins.java @@ -0,0 +1,48 @@ +package MysticRuins; + +import java.io.File; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.DungeonHooks; +import net.minecraftforge.common.EnumHelper; +import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.Init; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.Mod.PostInit; +import cpw.mods.fml.common.Mod.PreInit; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; + +@Mod(modid = "Mystic Ruins", name = "Mystic Ruins", version = "0.1") +@NetworkMod(clientSideRequired = false, serverSideRequired = false) + +public class MysticRuins +{ + @PreInit + public void preInit(FMLPreInitializationEvent event) + { + Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic Ruins.cfg")); + Config.save(); + } + + @Init + public void load(FMLInitializationEvent event) + { + GameRegistry.registerWorldGenerator(new WorldGenRuin()); + GameRegistry.registerWorldGenerator(new WorldGenRuin$1()); + GameRegistry.registerWorldGenerator(new WorldGenMysticDungeon()); + } + + @PostInit + public void postInit(FMLPostInitializationEvent event) + { + } +} diff --git a/common/MysticRuins/StructureMysticDungeon.java b/common/MysticRuins/StructureMysticDungeon.java new file mode 100644 index 0000000..b4f3d50 --- /dev/null +++ b/common/MysticRuins/StructureMysticDungeon.java @@ -0,0 +1,3998 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.world.gen.structure.*; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class StructureMysticDungeon extends WorldGenerator +{ + + public StructureMysticDungeon() + { + } + + public boolean generate(World world, Random random, int i, int j, int k) + { + if(world.getWorldInfo().getTerrainType() != world.getWorldInfo().getTerrainType().FLAT) + { + int l = random.nextInt(100); + if(l >= 4) + { + return false; + } + for(int i1 = 0; i1 < 1; i1++) + { + int j1 = (i + random.nextInt(8)) - random.nextInt(8); + int k1 = (j + random.nextInt(4)) - random.nextInt(4); + int l1 = (k + random.nextInt(8)) - random.nextInt(8); + if(world.isAirBlock(j1 - 1, k1 + 1, l1) && + world.isAirBlock(j1 - 1, k1 + 1, l1 + 1) && + world.isAirBlock(j1 - 1, k1 + 2, l1) && + world.isAirBlock(j1 - 1, k1 + 2, l1 + 1) && + world.getBlockId(j1, k1, l1) == Block.stone.blockID && + world.getBlockId(j1, k1, l1 + 1) == Block.stone.blockID && + world.getBlockId(j1 - 1, k1, l1) == Block.stone.blockID && + world.getBlockId(j1 - 1, k1, l1 + 1) == Block.stone.blockID && + world.getBlockId(j1, k1 + 1, l1) == Block.stone.blockID && + world.getBlockId(j1, k1 + 1, l1 + 1) == Block.stone.blockID); + boolean flag = true; + if(!flag) + { + continue; + } + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1 - 1, k1 + 1, l1, 0); + world.setBlock(j1 - 1, k1 + 2, l1, 0); + world.setBlock(j1 - 1, k1 + 3, l1, 0); + world.setBlock(j1 - 1, k1 + 1, l1 + 1, 0); + world.setBlock(j1 - 1, k1 + 2, l1 + 1, 0); + world.setBlock(j1 - 1, k1 + 1, l1 + 2, 0); + world.setBlock(j1 - 1, k1 + 1, l1 + 3, 0); + world.setBlock(j1 - 1, k1 + 2, l1 + 2, 0); + world.setBlock(j1 - 1, k1 + 3, l1 + 1, 0); + world.setBlock(j1 - 1, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 3, l1 - 1, 0); + world.setBlock(j1 - 2, k1 + 1, l1, 0); + world.setBlock(j1 - 2, k1 + 2, l1, 0); + world.setBlock(j1 - 2, k1 + 3, l1, 0); + world.setBlock(j1 - 2, k1 + 1, l1 + 1, 0); + world.setBlock(j1 - 2, k1 + 1, l1 + 2, 0); + world.setBlock(j1 - 1, k1 + 2, l1 + 2, 0); + world.setBlock(j1 - 2, k1 + 2, l1 + 1, 0); + world.setBlock(j1 - 2, k1 + 3, l1 + 1, 0); + world.setBlock(j1 - 2, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 2, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 2, k1 + 3, l1 - 1, 0); + world.setBlock(j1 - 3, k1 + 1, l1, 0); + world.setBlock(j1 - 3, k1 + 2, l1, 0); + world.setBlock(j1 - 3, k1 + 3, l1, 0); + world.setBlock(j1 - 3, k1 + 1, l1 + 1, 0); + world.setBlock(j1 - 3, k1 + 2, l1 + 1, 0); + world.setBlock(j1 - 3, k1 + 3, l1 + 1, 0); + world.setBlock(j1 - 3, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 3, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 3, k1 + 3, l1 - 1, 0); + world.setBlock(j1 - 4, k1 + 1, l1, 0); + world.setBlock(j1 - 4, k1 + 2, l1, 0); + world.setBlock(j1 - 4, k1 + 3, l1, 0); + world.setBlock(j1 - 4, k1 + 1, l1 + 1, 0); + world.setBlock(j1 - 4, k1 + 2, l1 + 1, 0); + world.setBlock(j1 - 4, k1 + 3, l1 + 1, 0); + world.setBlock(j1 - 4, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 4, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 4, k1 + 3, l1 - 1, 0); + world.setBlock(j1 - 5, k1 + 1, l1, 0); + world.setBlock(j1 - 5, k1 + 2, l1, 0); + world.setBlock(j1 - 5, k1 + 3, l1, 0); + world.setBlock(j1 - 5, k1 + 1, l1 + 1, 0); + world.setBlock(j1 - 5, k1 + 2, l1 + 1, 0); + world.setBlock(j1 - 5, k1 + 3, l1 + 1, 0); + world.setBlock(j1 - 5, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 5, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 5, k1 + 3, l1 - 1, 0); + world.setBlock(j1 - 6, k1 + 1, l1, 0); + world.setBlock(j1 - 6, k1 + 2, l1, 0); + world.setBlock(j1 - 6, k1 + 3, l1, 0); + world.setBlock(j1 - 6, k1 + 4, l1, 0); + world.setBlock(j1 - 7, k1 + 2, l1, 0); + world.setBlock(j1 - 7, k1 + 3, l1, 0); + world.setBlock(j1 - 7, k1 + 4, l1, 0); + world.setBlock(j1 - 7, k1 + 5, l1, 0); + world.setBlock(j1 - 8, k1 + 3, l1, 0); + world.setBlock(j1 - 8, k1 + 4, l1, 0); + world.setBlock(j1 - 8, k1 + 5, l1, 0); + world.setBlock(j1 - 9, k1 + 4, l1, 0); + world.setBlock(j1 - 9, k1 + 5, l1, 0); + world.setBlock(j1 - 9, k1 + 6, l1, 0); + world.setBlock(j1 - 9, k1 + 7, l1, 0); + world.setBlock(j1 - 10, k1 + 5, l1, 0); + world.setBlock(j1 - 10, k1 + 6, l1, 0); + world.setBlock(j1 - 10, k1 + 7, l1, 0); + world.setBlock(j1 - 10, k1 + 8, l1, 0); + world.setBlock(j1 - 11, k1 + 6, l1, 0); + world.setBlock(j1 - 11, k1 + 7, l1, 0); + world.setBlock(j1 - 11, k1 + 8, l1, 0); + world.setBlock(j1 - 11, k1 + 9, l1, 0); + world.setBlock(j1 - 12, k1 + 7, l1, 0); + world.setBlock(j1 - 12, k1 + 8, l1, 0); + world.setBlock(j1 - 12, k1 + 9, l1, 0); + world.setBlock(j1 - 12, k1 + 10, l1, 0); + world.setBlock(j1 - 13, k1 + 8, l1, 0); + world.setBlock(j1 - 13, k1 + 9, l1, 0); + world.setBlock(j1 - 13, k1 + 10, l1, 0); + world.setBlock(j1 - 13, k1 + 11, l1, 0); + world.setBlock(j1 - 14, k1 + 9, l1, 0); + world.setBlock(j1 - 14, k1 + 10, l1, 0); + world.setBlock(j1 - 14, k1 + 11, l1, 0); + world.setBlock(j1 - 14, k1 + 12, l1, 0); + world.setBlock(j1 - 15, k1 + 10, l1, 0); + world.setBlock(j1 - 15, k1 + 11, l1, 0); + world.setBlock(j1 - 15, k1 + 12, l1, 0); + world.setBlock(j1 - 15, k1 + 13, l1, 0); + world.setBlock(j1 - 15, k1 + 14, l1, 0); + world.setBlock(j1 - 16, k1 + 11, l1, 0); + world.setBlock(j1 - 16, k1 + 12, l1, 0); + world.setBlock(j1 - 16, k1 + 13, l1, 0); + world.setBlock(j1 - 16, k1 + 14, l1, 0); + int i2 = random.nextInt(100); + if(i2 <= 40) + { + world.setBlock(j1 - 16, k1 + 11, l1 - 1, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 1, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 2, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 2, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 3, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 3, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 4, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 4, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 5, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 5, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 6, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 6, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 7, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 7, 0); + world.setBlock(j1 - 16, k1 + 11, l1 - 8, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 8, 0); + world.setBlock(j1 - 16, k1 + 13, l1 - 8, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 8, 0); + world.setBlock(j1 - 16, k1 + 12, l1 - 9, 0); + world.setBlock(j1 - 16, k1 + 13, l1 - 9, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 9, 0); + world.setBlock(j1 - 16, k1 + 15, l1 - 9, 0); + world.setBlock(j1 - 16, k1 + 13, l1 - 10, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 10, 0); + world.setBlock(j1 - 16, k1 + 15, l1 - 10, 0); + world.setBlock(j1 - 16, k1 + 16, l1 - 10, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 11, 0); + world.setBlock(j1 - 16, k1 + 15, l1 - 11, 0); + world.setBlock(j1 - 16, k1 + 16, l1 - 11, 0); + world.setBlock(j1 - 16, k1 + 17, l1 - 11, 0); + world.setBlock(j1 - 16, k1 + 15, l1 - 12, 0); + world.setBlock(j1 - 16, k1 + 16, l1 - 12, 0); + world.setBlock(j1 - 16, k1 + 17, l1 - 12, 0); + world.setBlock(j1 - 16, k1 + 16, l1 - 13, 0); + world.setBlock(j1 - 16, k1 + 17, l1 - 13, 0); + world.setBlock(j1 - 16, k1 + 18, l1 - 13, 0); + world.setBlock(j1 - 16, k1 + 19, l1 - 13, 0); + world.setBlock(j1 - 16, k1 + 20, l1 - 13, 0); + int j2 = random.nextInt(100); + if(j2 <= 20) + { + world.setBlock(j1 - 16, k1 + 17, l1 - 15, 0); + world.setBlock(j1 - 16, k1 + 18, l1 - 15, 0); + world.setBlock(j1 - 16, k1 + 17, l1 - 16, 0); + world.setBlock(j1 - 16, k1 + 18, l1 - 16, 0); + world.setBlock(j1 - 16, k1 + 17, l1 - 17, 0); + world.setBlock(j1 - 16, k1 + 18, l1 - 17, 0); + world.setBlock(j1 - 15, k1 + 17, l1 - 15, 0); + world.setBlock(j1 - 15, k1 + 18, l1 - 15, 0); + world.setBlock(j1 - 15, k1 + 17, l1 - 16, 0); + world.setBlock(j1 - 15, k1 + 18, l1 - 16, 0); + world.setBlock(j1 - 15, k1 + 17, l1 - 17, 0); + world.setBlock(j1 - 15, k1 + 18, l1 - 17, 0); + world.setBlock(j1 - 17, k1 + 17, l1 - 15, 0); + world.setBlock(j1 - 17, k1 + 18, l1 - 15, 0); + world.setBlock(j1 - 17, k1 + 17, l1 - 16, 0); + world.setBlock(j1 - 17, k1 + 18, l1 - 16, 0); + world.setBlock(j1 - 17, k1 + 17, l1 - 17, 0); + world.setBlock(j1 - 17, k1 + 18, l1 - 17, 0); + world.setBlock(j1 - 16, k1 + 16, l1 - 15, Block.blockLapis.blockID); + world.setBlock(j1 - 16, k1 + 16, l1 - 16, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 16, k1 + 16, l1 - 17, Block.blockLapis.blockID); + world.setBlock(j1 - 15, k1 + 16, l1 - 15, Block.blockLapis.blockID); + world.setBlock(j1 - 15, k1 + 16, l1 - 16, Block.blockLapis.blockID); + world.setBlock(j1 - 15, k1 + 16, l1 - 17, Block.blockLapis.blockID); + world.setBlock(j1 - 17, k1 + 16, l1 - 15, Block.blockLapis.blockID); + world.setBlock(j1 - 17, k1 + 16, l1 - 16, Block.blockLapis.blockID); + world.setBlock(j1 - 17, k1 + 16, l1 - 17, Block.blockLapis.blockID); + world.setBlock(j1 - 16, k1 + 17, l1 - 16, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1 - 16, k1 + 17, l1 - 16); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + } + } + world.setBlock(j1 - 16, k1 + 12, l1 + 1, 0); + world.setBlock(j1 - 16, k1 + 13, l1 + 1, 0); + world.setBlock(j1 - 16, k1 + 14, l1 + 1, 0); + world.setBlock(j1 - 16, k1 + 15, l1 + 1, 0); + world.setBlock(j1 - 16, k1 + 13, l1 + 2, 0); + world.setBlock(j1 - 16, k1 + 14, l1 + 2, 0); + world.setBlock(j1 - 16, k1 + 15, l1 + 2, 0); + world.setBlock(j1 - 16, k1 + 16, l1 + 2, 0); + world.setBlock(j1 - 16, k1 + 14, l1 + 3, 0); + world.setBlock(j1 - 16, k1 + 15, l1 + 3, 0); + world.setBlock(j1 - 16, k1 + 16, l1 + 3, 0); + world.setBlock(j1 - 16, k1 + 15, l1 + 4, 0); + world.setBlock(j1 - 16, k1 + 16, l1 + 4, 0); + world.setBlock(j1 - 16, k1 + 17, l1 + 4, 0); + world.setBlock(j1 - 16, k1 + 18, l1 + 4, 0); + world.setBlock(j1 - 16, k1 + 16, l1 + 5, 0); + world.setBlock(j1 - 16, k1 + 17, l1 + 5, 0); + world.setBlock(j1 - 16, k1 + 18, l1 + 5, 0); + world.setBlock(j1 - 16, k1 + 19, l1 + 5, 0); + world.setBlock(j1 - 16, k1 + 17, l1 + 6, 0); + world.setBlock(j1 - 16, k1 + 18, l1 + 6, 0); + world.setBlock(j1 - 16, k1 + 19, l1 + 6, 0); + world.setBlock(j1 - 16, k1 + 20, l1 + 6, 0); + world.setBlock(j1 - 16, k1 + 18, l1 + 7, 0); + world.setBlock(j1 - 16, k1 + 19, l1 + 7, 0); + world.setBlock(j1 - 16, k1 + 20, l1 + 7, 0); + world.setBlock(j1 - 16, k1 + 21, l1 + 7, 0); + world.setBlock(j1 - 16, k1 + 19, l1 + 8, 0); + world.setBlock(j1 - 16, k1 + 20, l1 + 8, 0); + world.setBlock(j1 - 16, k1 + 21, l1 + 8, 0); + world.setBlock(j1 - 16, k1 + 22, l1 + 8, 0); + world.setBlock(j1 - 16, k1 + 20, l1 + 9, 0); + world.setBlock(j1 - 16, k1 + 21, l1 + 9, 0); + world.setBlock(j1 - 16, k1 + 22, l1 + 9, 0); + world.setBlock(j1 - 16, k1 + 23, l1 + 9, 0); + world.setBlock(j1 - 16, k1 + 24, l1 + 9, 0); + world.setBlock(j1 - 16, k1 + 21, l1 + 10, 0); + world.setBlock(j1 - 16, k1 + 22, l1 + 10, 0); + world.setBlock(j1 - 16, k1 + 23, l1 + 10, 0); + world.setBlock(j1 - 16, k1 + 24, l1 + 10, 0); + world.setBlock(j1 - 16, k1 + 22, l1 + 11, 0); + world.setBlock(j1 - 16, k1 + 23, l1 + 11, 0); + world.setBlock(j1 - 16, k1 + 24, l1 + 11, 0); + world.setBlock(j1 - 16, k1 + 25, l1 + 11, 0); + world.setBlock(j1 - 16, k1 + 23, l1 + 12, 0); + world.setBlock(j1 - 16, k1 + 24, l1 + 12, 0); + world.setBlock(j1 - 16, k1 + 25, l1 + 12, 0); + world.setBlock(j1 - 16, k1 + 26, l1 + 12, 0); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1, Block.cobblestoneMossy.blockID); + int k2 = random.nextInt(100); + if(k2 <= 40) + { + world.setBlock(j1 - 1, k1 + 3, l1, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 3, l1 + 1, Block.vine.blockID); + world.setBlock(j1 - 2, k1 + 3, l1 - 1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 3, l1 + 2, Block.vine.blockID); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 + 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + int l2 = random.nextInt(100); + if(l2 <= 30) + { + world.setBlock(j1 - 1, k1 + 3, l1, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 3, l1 + 2, Block.vine.blockID); + world.setBlock(j1 - 2, k1 + 3, l1 - 1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 3, l1 + 1, Block.vine.blockID); + world.setBlock(j1 - 5, k1 + 3, l1, Block.vine.blockID); + } + int i3 = random.nextInt(100); + if(i3 <= 40) + { + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 - 9, 0); + world.setBlock(j1, k1 + 2, l1 - 9, 0); + world.setBlock(j1, k1 + 1, l1 - 10, 0); + world.setBlock(j1, k1 + 2, l1 - 10, 0); + world.setBlock(j1, k1 + 3, l1 - 10, 0); + world.setBlock(j1, k1 + 4, l1 - 10, 0); + world.setBlock(j1, k1 + 2, l1 - 11, 0); + world.setBlock(j1, k1 + 3, l1 - 11, 0); + world.setBlock(j1, k1 + 4, l1 - 11, 0); + world.setBlock(j1, k1 + 5, l1 - 11, 0); + world.setBlock(j1, k1 + 3, l1 - 12, 0); + world.setBlock(j1, k1 + 4, l1 - 12, 0); + world.setBlock(j1, k1 + 5, l1 - 12, 0); + world.setBlock(j1, k1 + 6, l1 - 12, 0); + world.setBlock(j1, k1 + 4, l1 - 13, 0); + world.setBlock(j1, k1 + 5, l1 - 13, 0); + world.setBlock(j1, k1 + 6, l1 - 13, 0); + world.setBlock(j1, k1 + 7, l1 - 13, 0); + world.setBlock(j1, k1 + 5, l1 - 14, 0); + world.setBlock(j1, k1 + 6, l1 - 14, 0); + world.setBlock(j1, k1 + 7, l1 - 14, 0); + world.setBlock(j1, k1 + 8, l1 - 14, 0); + world.setBlock(j1, k1 + 6, l1 - 15, 0); + world.setBlock(j1, k1 + 7, l1 - 15, 0); + world.setBlock(j1, k1 + 8, l1 - 15, 0); + world.setBlock(j1, k1 + 9, l1 - 15, 0); + world.setBlock(j1, k1 + 7, l1 - 16, 0); + world.setBlock(j1, k1 + 8, l1 - 16, 0); + world.setBlock(j1, k1 + 9, l1 - 16, 0); + world.setBlock(j1, k1 + 10, l1 - 16, 0); + world.setBlock(j1, k1 + 8, l1 - 17, 0); + world.setBlock(j1, k1 + 9, l1 - 17, 0); + world.setBlock(j1, k1 + 10, l1 - 17, 0); + world.setBlock(j1, k1 + 11, l1 - 17, 0); + world.setBlock(j1, k1 + 9, l1 - 18, 0); + world.setBlock(j1, k1 + 10, l1 - 18, 0); + world.setBlock(j1, k1 + 11, l1 - 18, 0); + world.setBlock(j1, k1 + 12, l1 - 18, 0); + world.setBlock(j1, k1 + 10, l1 - 19, 0); + world.setBlock(j1, k1 + 11, l1 - 19, 0); + world.setBlock(j1, k1 + 12, l1 - 19, 0); + world.setBlock(j1, k1 + 13, l1 - 19, 0); + world.setBlock(j1, k1 + 11, l1 - 20, 0); + world.setBlock(j1, k1 + 12, l1 - 20, 0); + world.setBlock(j1, k1 + 13, l1 - 20, 0); + world.setBlock(j1, k1 + 14, l1 - 20, 0); + world.setBlock(j1, k1 + 15, l1 - 20, 0); + world.setBlock(j1, k1 + 12, l1 - 21, 0); + world.setBlock(j1, k1 + 13, l1 - 21, 0); + world.setBlock(j1, k1 + 14, l1 - 21, 0); + world.setBlock(j1, k1 + 15, l1 - 21, 0); + world.setBlock(j1, k1 + 16, l1 - 21, 0); + world.setBlock(j1, k1 + 13, l1 - 22, 0); + world.setBlock(j1, k1 + 14, l1 - 22, 0); + world.setBlock(j1, k1 + 15, l1 - 22, 0); + world.setBlock(j1, k1 + 16, l1 - 22, 0); + world.setBlock(j1, k1 + 14, l1 - 23, 0); + world.setBlock(j1, k1 + 15, l1 - 23, 0); + world.setBlock(j1, k1 + 16, l1 - 23, 0); + world.setBlock(j1, k1 + 17, l1 - 23, 0); + int j3 = random.nextInt(100); + if(j3 <= 20) + { + world.setBlock(j1, k1 + 15, l1 - 25, 0); + world.setBlock(j1, k1 + 16, l1 - 25, 0); + world.setBlock(j1, k1 + 15, l1 - 26, 0); + world.setBlock(j1, k1 + 16, l1 - 26, 0); + world.setBlock(j1, k1 + 15, l1 - 27, 0); + world.setBlock(j1, k1 + 16, l1 - 27, 0); + world.setBlock(j1 + 1, k1 + 15, l1 - 25, 0); + world.setBlock(j1 + 1, k1 + 16, l1 - 25, 0); + world.setBlock(j1 + 1, k1 + 15, l1 - 26, 0); + world.setBlock(j1 + 1, k1 + 16, l1 - 26, 0); + world.setBlock(j1 + 1, k1 + 15, l1 - 27, 0); + world.setBlock(j1 + 1, k1 + 16, l1 - 27, 0); + world.setBlock(j1 - 1, k1 + 15, l1 - 25, 0); + world.setBlock(j1 - 1, k1 + 16, l1 - 25, 0); + world.setBlock(j1 - 1, k1 + 15, l1 - 26, 0); + world.setBlock(j1 - 1, k1 + 16, l1 - 26, 0); + world.setBlock(j1 - 1, k1 + 15, l1 - 27, 0); + world.setBlock(j1 - 1, k1 + 16, l1 - 27, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 15, 0); + world.setBlock(j1 - 16, k1 + 14, l1 - 16, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 16, k1 + 14, l1 - 17, 0); + world.setBlock(j1 - 15, k1 + 14, l1 - 15, 0); + world.setBlock(j1 - 15, k1 + 14, l1 - 16, 0); + world.setBlock(j1 - 15, k1 + 14, l1 - 17, 0); + world.setBlock(j1 - 17, k1 + 14, l1 - 15, 0); + world.setBlock(j1 - 17, k1 + 14, l1 - 16, 0); + world.setBlock(j1 - 17, k1 + 14, l1 - 17, 0); + world.setBlock(j1 - 16, k1 + 15, l1 - 16, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1 - 16, k1 + 15, l1 - 16); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1, Block.cobblestoneMossy.blockID); + j1++; + int k3 = random.nextInt(2) + 1; + if(k3 == 1) + { + int l3 = random.nextInt(2) + 1; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestoneMossy.blockID); + if(l3 == 1) + { + int k4 = random.nextInt(100); + if(k4 <= 60) + { + for(int u=1;u<4;u++) + { + world.setBlock(j1, k1 + u, l1 + u, Block.bookShelf.blockID); + } + } + } + if(l3 == 2) + { + int l4 = random.nextInt(100); + if(l4 <= 40) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.blockIron.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.blockIron.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.blockIron.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + for(int u=0;u<5;u++) + { + world.setBlock(j1, k1+1, l1+u, 0); + world.setBlock(j1, k1+2, l1+u, 0); + world.setBlock(j1, k1+3, l1+u, 0); + world.setBlock(j1, k1+4, l1+u, 0); + world.setBlock(j1, k1+1, l1-u, 0); + world.setBlock(j1, k1+2, l1-u, 0); + world.setBlock(j1, k1+3, l1-u, 0); + world.setBlock(j1, k1+4, l1-u, 0); + } + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestone.blockID); + if(l3 == 2) + { + int i5 = random.nextInt(100); + if(i5 <= 40) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.blockIron.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.blockIron.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + + for(int u=0;u<5;u++) + { + world.setBlock(j1, k1+1, l1+u, 0); + world.setBlock(j1, k1+2, l1+u, 0); + world.setBlock(j1, k1+3, l1+u, 0); + world.setBlock(j1, k1+4, l1+u, 0); + world.setBlock(j1, k1+1, l1-u, 0); + world.setBlock(j1, k1+2, l1-u, 0); + world.setBlock(j1, k1+3, l1-u, 0); + world.setBlock(j1, k1+4, l1-u, 0); + } + + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestone.blockID); + if(l3 == 1) + { + int j5 = random.nextInt(100); + if(j5 <= 15) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 1, l1 + 1); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Zombie"); + } + world.setBlock(j1, k1 + 2, l1 + 1, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1, k1 + 2, l1 + 1); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + world.setBlock(j1, k1 + 3, l1 + 1, Block.mobSpawner.blockID); + TileEntityMobSpawner spawnerII = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 3, l1 + 1); + if(spawnerII != null) + { + spawnerII.func_98049_a().setMobID("CaveSpider"); + } + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + + } + world.setBlock(j1, k1 + 1, l1 - 2, Block.planks.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.planks.blockID); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestoneMossy.blockID); + if(l3 == 1) + { + world.setBlock(j1, k1 + 1, l1 - 2, Block.planks.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.planks.blockID); + } + if(l3 == 2) + { + int k5 = random.nextInt(100); + if(k5 <= 30) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.blockIron.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.blockIron.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.blockIron.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 1, l1 + 3); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Creeper"); + } + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 5, Block.cobblestoneMossy.blockID); + if(l3 == 1) + { + int l5 = random.nextInt(100); + if(l5 <= 60) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 3, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 2, l1 + 2); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Skeleton"); + } + world.setBlock(j1, k1 + 3, l1 + 2, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 3, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 3, l1 + 3, Block.bookShelf.blockID); + } + world.setBlock(j1, k1 + 1, l1 - 2, Block.planks.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.planks.blockID); + } + int i6 = random.nextInt(100); + if(i6 <= 30) + { + world.setBlock(j1 - 1, k1 + 4, l1 + 3, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 4, l1 + 2, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 4, l1 - 1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 4, l1 + 1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 4, l1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 4, l1 - 3, Block.vine.blockID); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestone.blockID); + if(l3 == 2) + { + int l6 = random.nextInt(100); + if(l6 <= 30) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.blockGold.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 1, l1 + 2); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Blaze"); + } + world.setBlock(j1, k1 + 1, l1 + 3, Block.blockGold.blockID); + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 - 5, Block.cobblestone.blockID); + if(l3 == 1) + { + int i7 = random.nextInt(100); + if(i7 <= 60) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 3, l1 + 1, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 3, l1 + 2, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 2, l1 + 3, Block.bookShelf.blockID); + world.setBlock(j1, k1 + 3, l1 + 3, Block.bookShelf.blockID); + } + } + if(l3 == 2) + { + int j7 = random.nextInt(100); + if(j7 <= 20) + { + world.setBlock(j1, k1 + 1, l1 + 1, Block.blockGold.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.blockGold.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.blockGold.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.blockGold.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.blockGold.blockID); + } + int j8 = random.nextInt(100); + if(j8 <= 30) + { + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1, k1 + 2, l1 - 1); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Zombie"); + } + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1 - 1, k1 + 1, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 2, l1 - 2, 0); + world.setBlock(j1 - 1, k1 + 1, l1 - 2, 0); + } + int j9 = random.nextInt(100); + if(j9 <= 10) + { + world.setBlock(j1 - 3, k1 + 1, l1 - 1, Block.blockDiamond.blockID); + world.setBlock(j1 - 3, k1 + 1, l1 - 2, Block.blockDiamond.blockID); + } + int j10 = random.nextInt(100); + if(j10 <= 10) + { + world.setBlock(j1 - 3, k1 + 1, l1 - 2, Block.blockDiamond.blockID); + } + int j11 = random.nextInt(100); + if(j11 <= 15) + { + world.setBlock(j1 - 5, k1 + 1, l1 - 2, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1 - 5, k1 + 1, l1 - 2); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + world.setBlock(j1 - 5, k1 + 1, l1 - 3, 0); + } + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + for(int u = 0; u<5;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + } + world.setBlock(j1, k1 + 2, l1 - 5, Block.cobblestone.blockID); + int k7 = random.nextInt(100); + if(k7 <= 30) + { + world.setBlock(j1 - 2, k1 + 5, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 5, l1 - 3, 0); + world.setBlock(j1 - 2, k1 + 5, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 5, l1 - 2, 0); + world.setBlock(j1 - 3, k1 + 5, l1 - 2, 0); + world.setBlock(j1 - 5, k1 + 5, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 6, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 6, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 6, l1 - 2, 0); + world.setBlock(j1 - 3, k1 + 6, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 7, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 7, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 7, l1 - 2, 0); + world.setBlock(j1 - 3, k1 + 7, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 8, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 8, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 8, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 9, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 9, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 9, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 10, l1 - 1, 0); + world.setBlock(j1 - 1, k1 + 10, l1 - 2, 0); + world.setBlock(j1 - 2, k1 + 1, l1 - 2, Block.stone.blockID); + world.setBlock(j1 - 2, k1 + 1, l1 - 3, Block.gravel.blockID); + world.setBlock(j1 - 1, k1 + 1, l1 - 2, Block.stone.blockID); + world.setBlock(j1 - 1, k1 + 1, l1 - 3, Block.gravel.blockID); + world.setBlock(j1 - 2, k1 + 1, l1 - 1, Block.stone.blockID); + world.setBlock(j1 - 3, k1 + 1, l1 - 2, Block.stone.blockID); + world.setBlock(j1 - 2, k1 + 2, l1 - 2, Block.stone.blockID); + world.setBlock(j1 - 2, k1 + 2, l1 - 1, Block.gravel.blockID); + world.setBlock(j1 - 2, k1 + 3, l1 - 2, Block.stone.blockID); + world.setBlock(j1 - 2, k1 + 3, l1 - 1, Block.stone.blockID); + world.setBlock(j1 - 4, k1 + 3, l1 - 1, Block.gravel.blockID); + world.setBlock(j1 - 2, k1 + 3, l1, Block.gravel.blockID); + world.setBlock(j1 - 1, k1 + 3, l1 - 3, Block.stone.blockID); + } + } + if(k3 == 2) + { + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + for(int u = 0; u<9;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+5, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + world.setBlock(j1, k1+5, l1 - u, 0); + } + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 - 9, Block.cobblestoneMossy.blockID); + int i4 = random.nextInt(100); + if(i4 <= 60) + { + world.setBlock(j1, k1, l1, 0); + world.setBlock(j1, k1 - 1, l1, 0); + world.setBlock(j1, k1 - 2, l1, 0); + world.setBlock(j1, k1 - 3, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 6, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 11, l1, 0); + world.setBlock(j1, k1 - 12, l1, 0); + world.setBlock(j1, k1 - 13, l1, 0); + world.setBlock(j1, k1 - 13, l1 + 1, 0); + world.setBlock(j1, k1 - 13, l1 - 1, 0); + world.setBlock(j1, k1 - 14, l1, 0); + world.setBlock(j1, k1 - 14, l1 + 1, 0); + world.setBlock(j1, k1 - 14, l1 - 1, 0); + world.setBlock(j1 + 1, k1 - 13, l1 + 1, 0); + world.setBlock(j1 + 1, k1 - 13, l1 - 1, 0); + world.setBlock(j1 + 1, k1 - 14, l1 + 1, 0); + world.setBlock(j1 + 1, k1 - 14, l1 - 1, 0); + } + int j6 = random.nextInt(100); + if(j6 <= 70) + { + world.setBlock(j1, k1, l1 + 6, 0); + world.setBlock(j1, k1 - 1, l1 + 6, 0); + world.setBlock(j1, k1 - 2, l1 + 6, 0); + world.setBlock(j1, k1 - 3, l1 + 6, 0); + world.setBlock(j1, k1 - 4, l1 + 6, 0); + world.setBlock(j1, k1 - 5, l1 + 6, 0); + world.setBlock(j1, k1 - 6, l1 + 6, 0); + world.setBlock(j1, k1 - 7, l1 + 6, 0); + world.setBlock(j1, k1 - 8, l1 + 6, 0); + world.setBlock(j1, k1 - 9, l1 + 6, 0); + world.setBlock(j1, k1 - 10, l1 + 6, 0); + world.setBlock(j1, k1 - 11, l1 + 6, 0); + world.setBlock(j1, k1 - 11, l1 + 7, 0); + world.setBlock(j1, k1 - 11, l1 + 5, 0); + world.setBlock(j1, k1 - 12, l1 + 6, 0); + world.setBlock(j1, k1 - 12, l1 + 7, 0); + world.setBlock(j1, k1 - 12, l1 + 5, 0); + world.setBlock(j1 + 1, k1 - 11, l1 + 7, 0); + world.setBlock(j1 + 1, k1 - 11, l1 + 5, 0); + world.setBlock(j1 + 1, k1 - 12, l1 + 7, 0); + world.setBlock(j1 + 1, k1 - 12, l1 + 5, 0); + } + int l7 = random.nextInt(100); + if(l7 <= 50) + { + world.setBlock(j1 + 7, k1, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 1, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 2, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 3, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 4, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 5, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 6, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 7, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 8, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 9, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 10, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 11, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 12, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 13, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 14, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 15, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 15, l1 - 5, 0); + world.setBlock(j1 + 7, k1 - 15, l1 - 3, 0); + world.setBlock(j1 + 7, k1 - 16, l1 - 4, 0); + world.setBlock(j1 + 7, k1 - 16, l1 - 5, 0); + world.setBlock(j1 + 7, k1 - 16, l1 - 3, 0); + world.setBlock(j1 + 8, k1 - 15, l1 - 5, 0); + world.setBlock(j1 + 8, k1 - 15, l1 - 3, 0); + world.setBlock(j1 + 8, k1 - 16, l1 - 5, 0); + world.setBlock(j1 + 8, k1 - 16, l1 - 3, 0); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 1, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + for(int u = 1; u<9;u++) + { + world.setBlock(j1, k1+1, l1 + u, 0); + world.setBlock(j1, k1+2, l1 + u, 0); + world.setBlock(j1, k1+3, l1 + u, 0); + world.setBlock(j1, k1+4, l1 + u, 0); + world.setBlock(j1, k1+5, l1 + u, 0); + world.setBlock(j1, k1+1, l1 - u, 0); + world.setBlock(j1, k1+2, l1 - u, 0); + world.setBlock(j1, k1+3, l1 - u, 0); + world.setBlock(j1, k1+4, l1 - u, 0); + world.setBlock(j1, k1+5, l1 - u, 0); + } + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.stoneSingleSlab.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1, l1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 1, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + int k8 = random.nextInt(100); + if(k8 <= 15) + { + world.setBlock(j1, k1 + 1, l1 - 7, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1, k1 + 1, l1 - 7); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + } + world.setBlock(j1, k1 + 2, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 4, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1, l1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1, k1 + 1, l1); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + world.setBlock(j1, k1 + 2, l1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.stoneSingleSlab.blockID); + int k9 = random.nextInt(100); + if(k9 <= 75) + { + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1 - 1, k1 + 1, l1, 0); + world.setBlock(j1 - 1, k1 + 2, l1, 0); + world.setBlock(j1 - 1, k1 + 2, l1 - 1, 0); + world.setBlock(j1 - 3, k1 + 1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1 - 2, k1 + 1, l1, Block.obsidian.blockID); + world.setBlock(j1 - 3, k1 + 1, l1 - 3, Block.obsidian.blockID); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1, l1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.obsidian.blockID); + world.setBlock(j1, k1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 2, l1 - 2, Block.obsidian.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 1, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + int k10 = random.nextInt(100); + if(k10 <= 50) + { + world.setBlock(j1, k1 + 1, l1 + 7, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 2, k1 + 1, l1 + 8, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 + 1, l1 + 5, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + } + int k11 = random.nextInt(100); + if(k11 <= 30) + { + world.setBlock(j1 + 1, k1 + 5, l1 + 3, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 5, l1 + 3, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 6, l1 + 2, Block.vine.blockID); + world.setBlock(j1 - 1, k1 + 5, l1 + 2, Block.vine.blockID); + world.setBlock(j1 - 2, k1 + 7, l1 - 1, Block.vine.blockID); + world.setBlock(j1 - 2, k1 + 7, l1 + 1, Block.vine.blockID); + world.setBlock(j1 - 2, k1 + 6, l1 + 1, Block.vine.blockID); + world.setBlock(j1 - 3, k1 + 8, l1, Block.vine.blockID); + world.setBlock(j1 + 1, k1 + 5, l1 - 3, Block.vine.blockID); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 4, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 2, Block.stoneSingleSlab.blockID); + world.setBlock(j1, k1 + 1, l1 - 3, Block.stoneSingleSlab.blockID); + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 + 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 1, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 2, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 4, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 5, l1 - 6, Block.blockNetherQuartz.blockID, 2, 2); + int j12 = random.nextInt(100); + if(j12 <= 50) + { + world.setBlock(j1, k1 + 1, l1 - 7, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 + 1, l1 - 8, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 + 1, l1 - 5, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + } + j1++; + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 8, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 4, l1, 0); + world.setBlock(j1, k1 + 5, l1, 0); + world.setBlock(j1, k1 + 6, l1, 0); + world.setBlock(j1, k1 + 7, l1, 0); + world.setBlock(j1, k1 + 6, l1 + 1, 0); + world.setBlock(j1, k1 + 6, l1 - 1, 0); + world.setBlock(j1, k1 + 6, l1 + 2, 0); + world.setBlock(j1, k1 + 6, l1 - 2, 0); + world.setBlock(j1, k1 + 7, l1 + 1, 0); + world.setBlock(j1, k1 + 7, l1 - 1, 0); + world.setBlock(j1, k1 + 8, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 + 2, 0); + world.setBlock(j1, k1 + 1, l1 + 3, 0); + world.setBlock(j1, k1 + 1, l1 + 4, 0); + world.setBlock(j1, k1 + 1, l1 + 5, 0); + world.setBlock(j1, k1 + 1, l1 + 6, 0); + world.setBlock(j1, k1 + 1, l1 + 7, 0); + world.setBlock(j1, k1 + 1, l1 + 8, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 1, l1 - 2, 0); + world.setBlock(j1, k1 + 1, l1 - 3, 0); + world.setBlock(j1, k1 + 1, l1 - 4, 0); + world.setBlock(j1, k1 + 1, l1 - 5, 0); + world.setBlock(j1, k1 + 1, l1 - 6, 0); + world.setBlock(j1, k1 + 1, l1 - 7, 0); + world.setBlock(j1, k1 + 1, l1 - 8, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 2, 0); + world.setBlock(j1, k1 + 2, l1 + 3, 0); + world.setBlock(j1, k1 + 2, l1 + 4, 0); + world.setBlock(j1, k1 + 2, l1 + 5, 0); + world.setBlock(j1, k1 + 2, l1 + 6, 0); + world.setBlock(j1, k1 + 2, l1 + 7, 0); + world.setBlock(j1, k1 + 2, l1 + 8, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 2, 0); + world.setBlock(j1, k1 + 2, l1 - 3, 0); + world.setBlock(j1, k1 + 2, l1 - 4, 0); + world.setBlock(j1, k1 + 2, l1 - 5, 0); + world.setBlock(j1, k1 + 2, l1 - 6, 0); + world.setBlock(j1, k1 + 2, l1 - 7, 0); + world.setBlock(j1, k1 + 2, l1 - 8, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 2, 0); + world.setBlock(j1, k1 + 3, l1 + 3, 0); + world.setBlock(j1, k1 + 3, l1 + 4, 0); + world.setBlock(j1, k1 + 3, l1 + 5, 0); + world.setBlock(j1, k1 + 3, l1 + 6, 0); + world.setBlock(j1, k1 + 3, l1 + 7, 0); + world.setBlock(j1, k1 + 3, l1 + 8, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 2, 0); + world.setBlock(j1, k1 + 3, l1 - 3, 0); + world.setBlock(j1, k1 + 3, l1 - 4, 0); + world.setBlock(j1, k1 + 3, l1 - 5, 0); + world.setBlock(j1, k1 + 3, l1 - 6, 0); + world.setBlock(j1, k1 + 3, l1 - 7, 0); + world.setBlock(j1, k1 + 3, l1 - 8, 0); + world.setBlock(j1, k1 + 4, l1 + 1, 0); + world.setBlock(j1, k1 + 4, l1 + 2, 0); + world.setBlock(j1, k1 + 4, l1 + 3, 0); + world.setBlock(j1, k1 + 4, l1 + 4, 0); + world.setBlock(j1, k1 + 4, l1 + 5, 0); + world.setBlock(j1, k1 + 4, l1 + 6, 0); + world.setBlock(j1, k1 + 4, l1 + 7, 0); + world.setBlock(j1, k1 + 4, l1 + 8, 0); + world.setBlock(j1, k1 + 4, l1 - 1, 0); + world.setBlock(j1, k1 + 4, l1 - 2, 0); + world.setBlock(j1, k1 + 4, l1 - 3, 0); + world.setBlock(j1, k1 + 4, l1 - 4, 0); + world.setBlock(j1, k1 + 4, l1 - 5, 0); + world.setBlock(j1, k1 + 4, l1 - 6, 0); + world.setBlock(j1, k1 + 4, l1 - 7, 0); + world.setBlock(j1, k1 + 4, l1 - 8, 0); + world.setBlock(j1, k1 + 5, l1 + 1, 0); + world.setBlock(j1, k1 + 5, l1 + 2, 0); + world.setBlock(j1, k1 + 5, l1 + 3, 0); + world.setBlock(j1, k1 + 5, l1 + 4, 0); + world.setBlock(j1, k1 + 5, l1 + 5, 0); + world.setBlock(j1, k1 + 5, l1 + 6, 0); + world.setBlock(j1, k1 + 5, l1 + 7, 0); + world.setBlock(j1, k1 + 5, l1 + 8, 0); + world.setBlock(j1, k1 + 5, l1 - 1, 0); + world.setBlock(j1, k1 + 5, l1 - 2, 0); + world.setBlock(j1, k1 + 5, l1 - 3, 0); + world.setBlock(j1, k1 + 5, l1 - 4, 0); + world.setBlock(j1, k1 + 5, l1 - 5, 0); + world.setBlock(j1, k1 + 5, l1 - 6, 0); + world.setBlock(j1, k1 + 5, l1 - 7, 0); + world.setBlock(j1, k1 + 5, l1 - 8, 0); + world.setBlock(j1, k1 + 1, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 - 9, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 9, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 - 9, Block.cobblestone.blockID); + } + j1++; + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 1, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 2, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 3, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 3, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 + 1, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 + 2, l1 - 1, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + world.setBlock(j1, k1 + 1, l1 + 1, 0); + world.setBlock(j1, k1 + 2, l1 + 1, 0); + world.setBlock(j1, k1 + 3, l1 + 1, 0); + world.setBlock(j1, k1 + 1, l1 - 1, 0); + world.setBlock(j1, k1 + 2, l1 - 1, 0); + world.setBlock(j1, k1 + 3, l1 - 1, 0); + world.setBlock(j1, k1, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1, l1 - 1, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1, l1, 0); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + world.setBlock(j1, k1 + 3, l1, 0); + j1++; + world.setBlock(j1, k1 - 1, l1, 0); + world.setBlock(j1, k1, l1, 0); + world.setBlock(j1, k1 + 1, l1, 0); + world.setBlock(j1, k1 + 2, l1, 0); + j1++; + world.setBlock(j1, k1 - 2, l1, 0); + world.setBlock(j1, k1 - 1, l1, 0); + world.setBlock(j1, k1, l1, 0); + world.setBlock(j1, k1 + 1, l1, 0); + j1++; + world.setBlock(j1, k1 - 3, l1, 0); + world.setBlock(j1, k1 - 2, l1, 0); + world.setBlock(j1, k1 - 1, l1, 0); + world.setBlock(j1, k1, l1, 0); + j1++; + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 3, l1, 0); + world.setBlock(j1, k1 - 2, l1, 0); + world.setBlock(j1, k1 - 1, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 3, l1, 0); + world.setBlock(j1, k1 - 2, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 5, l1 + 1, 0); + world.setBlock(j1, k1 - 4, l1 + 1, 0); + world.setBlock(j1, k1 - 5, l1 + 2, 0); + world.setBlock(j1, k1 - 4, l1 + 2, 0); + world.setBlock(j1, k1 - 5, l1 + 3, 0); + world.setBlock(j1, k1 - 4, l1 + 3, 0); + world.setBlock(j1, k1 - 5, l1 + 4, 0); + world.setBlock(j1, k1 - 4, l1 + 4, 0); + world.setBlock(j1, k1 - 5, l1 + 5, 0); + world.setBlock(j1, k1 - 4, l1 + 5, 0); + world.setBlock(j1, k1 - 5, l1 + 6, 0); + world.setBlock(j1, k1 - 4, l1 + 6, 0); + world.setBlock(j1, k1 - 5, l1 + 7, 0); + world.setBlock(j1, k1 - 4, l1 + 7, 0); + world.setBlock(j1, k1 - 5, l1 + 8, 0); + world.setBlock(j1, k1 - 4, l1 + 8, 0); + world.setBlock(j1, k1 - 5, l1 + 9, 0); + world.setBlock(j1, k1 - 4, l1 + 9, 0); + world.setBlock(j1, k1 - 5, l1 + 10, 0); + world.setBlock(j1, k1 - 4, l1 + 10, 0); + world.setBlock(j1, k1 - 5, l1 + 11, 0); + world.setBlock(j1, k1 - 4, l1 + 11, 0); + world.setBlock(j1, k1 - 5, l1 + 12, 0); + world.setBlock(j1, k1 - 4, l1 + 12, 0); + world.setBlock(j1, k1 - 5, l1 + 13, 0); + world.setBlock(j1, k1 - 4, l1 + 13, 0); + world.setBlock(j1, k1 - 5, l1 + 14, 0); + world.setBlock(j1, k1 - 4, l1 + 14, 0); + world.setBlock(j1, k1 - 5, l1 + 15, 0); + world.setBlock(j1, k1 - 4, l1 + 15, 0); + world.setBlock(j1, k1 - 5, l1 + 16, 0); + world.setBlock(j1, k1 - 4, l1 + 16, 0); + world.setBlock(j1, k1 - 5, l1 + 17, 0); + world.setBlock(j1, k1 - 4, l1 + 17, 0); + world.setBlock(j1, k1 - 5, l1 + 18, 0); + world.setBlock(j1, k1 - 4, l1 + 18, 0); + world.setBlock(j1, k1 - 5, l1 + 19, 0); + world.setBlock(j1, k1 - 4, l1 + 19, 0); + world.setBlock(j1, k1 - 5, l1 + 20, 0); + world.setBlock(j1, k1 - 4, l1 + 20, 0); + world.setBlock(j1, k1 - 4, l1 + 21, 0); + world.setBlock(j1, k1 - 5, l1 + 21, 0); + world.setBlock(j1, k1 - 6, l1 + 21, 0); + world.setBlock(j1, k1 - 4, l1 + 22, 0); + world.setBlock(j1, k1 - 5, l1 + 22, 0); + world.setBlock(j1, k1 - 6, l1 + 22, 0); + world.setBlock(j1, k1 - 7, l1 + 22, 0); + world.setBlock(j1, k1 - 5, l1 + 23, 0); + world.setBlock(j1, k1 - 6, l1 + 23, 0); + world.setBlock(j1, k1 - 7, l1 + 23, 0); + world.setBlock(j1, k1 - 8, l1 + 23, 0); + world.setBlock(j1, k1 - 6, l1 + 24, 0); + world.setBlock(j1, k1 - 7, l1 + 24, 0); + world.setBlock(j1, k1 - 8, l1 + 24, 0); + world.setBlock(j1, k1 - 9, l1 + 24, 0); + world.setBlock(j1, k1 - 7, l1 + 25, 0); + world.setBlock(j1, k1 - 8, l1 + 25, 0); + world.setBlock(j1, k1 - 9, l1 + 25, 0); + world.setBlock(j1, k1 - 10, l1 + 25, 0); + world.setBlock(j1, k1 - 8, l1 + 26, 0); + world.setBlock(j1, k1 - 9, l1 + 26, 0); + world.setBlock(j1, k1 - 10, l1 + 26, 0); + world.setBlock(j1, k1 - 11, l1 + 26, 0); + world.setBlock(j1, k1 - 9, l1 + 27, 0); + world.setBlock(j1, k1 - 10, l1 + 27, 0); + world.setBlock(j1, k1 - 11, l1 + 27, 0); + world.setBlock(j1, k1 - 12, l1 + 27, 0); + world.setBlock(j1, k1 - 10, l1 + 28, 0); + world.setBlock(j1, k1 - 11, l1 + 28, 0); + world.setBlock(j1, k1 - 12, l1 + 28, 0); + world.setBlock(j1, k1 - 13, l1 + 28, 0); + world.setBlock(j1, k1 - 11, l1 + 29, 0); + world.setBlock(j1, k1 - 12, l1 + 29, 0); + world.setBlock(j1, k1 - 13, l1 + 29, 0); + world.setBlock(j1, k1 - 14, l1 + 29, 0); + int j4 = random.nextInt(100); + if(j4 <= 20) + { + world.setBlock(j1, k1 - 12, l1 + 31, 0); + world.setBlock(j1, k1 - 13, l1 + 31, 0); + world.setBlock(j1, k1 - 12, l1 + 32, 0); + world.setBlock(j1, k1 - 13, l1 + 32, 0); + world.setBlock(j1, k1 - 12, l1 + 33, 0); + world.setBlock(j1, k1 - 13, l1 + 33, 0); + world.setBlock(j1 + 1, k1 - 12, l1 + 31, 0); + world.setBlock(j1 + 1, k1 - 13, l1 + 31, 0); + world.setBlock(j1 + 1, k1 - 12, l1 + 32, 0); + world.setBlock(j1 + 1, k1 - 13, l1 + 32, 0); + world.setBlock(j1 + 1, k1 - 12, l1 + 33, 0); + world.setBlock(j1 + 1, k1 - 13, l1 + 33, 0); + world.setBlock(j1 - 1, k1 - 12, l1 + 31, 0); + world.setBlock(j1 - 1, k1 - 13, l1 + 31, 0); + world.setBlock(j1 - 1, k1 - 12, l1 + 32, 0); + world.setBlock(j1 - 1, k1 - 13, l1 + 32, 0); + world.setBlock(j1 - 1, k1 - 12, l1 + 33, 0); + world.setBlock(j1 - 1, k1 - 13, l1 + 33, 0); + world.setBlock(j1, k1 - 10, l1 + 31, Block.blockLapis.blockID); + world.setBlock(j1, k1 - 10, l1 + 32, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 + 33, Block.blockLapis.blockID); + world.setBlock(j1 + 1, k1 - 10, l1 + 31, Block.blockLapis.blockID); + world.setBlock(j1 + 1, k1 - 10, l1 + 32, Block.blockLapis.blockID); + world.setBlock(j1 + 1, k1 - 10, l1 + 33, Block.blockLapis.blockID); + world.setBlock(j1 - 1, k1 - 10, l1 + 31, Block.blockLapis.blockID); + world.setBlock(j1 - 1, k1 - 10, l1 + 32, Block.blockLapis.blockID); + world.setBlock(j1 - 1, k1 - 10, l1 + 33, Block.blockLapis.blockID); + world.setBlock(j1, k1 - 11, l1 + 32, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1, k1 - 11, l1 + 32); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + } + j1++; + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 6, l1, 0); + j1++; + world.setBlock(j1, k1 - 4, l1, 0); + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 6, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + j1++; + world.setBlock(j1, k1 - 5, l1, 0); + world.setBlock(j1, k1 - 6, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + j1++; + world.setBlock(j1, k1 - 6, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + j1++; + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + j1++; + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + j1++; + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + j1++; + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + j1++; + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.stone.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 + 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 2, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 + 2, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1, Block.cobblestoneMossy.blockID); + int k6 = random.nextInt(100); + if(k6 <= 30) + { + world.setBlock(j1 - 1, k1 - 8, l1 + 3, Block.vine.blockID); + world.setBlock(j1 - 2, k1 - 8, l1, Block.vine.blockID); + world.setBlock(j1 - 2, k1 - 9, l1, Block.vine.blockID); + world.setBlock(j1 - 4, k1 - 8, l1 + 2, Block.vine.blockID); + world.setBlock(j1 - 6, k1 - 8, l1 - 1, Block.vine.blockID); + } + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 - 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + j1++; + world.setBlock(j1, k1 - 11, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 11, l1 - 2, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 11, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 10, l1, 0); + world.setBlock(j1, k1 - 9, l1, 0); + world.setBlock(j1, k1 - 8, l1, 0); + world.setBlock(j1, k1 - 7, l1, 0); + world.setBlock(j1, k1 - 10, l1 + 1, 0); + world.setBlock(j1, k1 - 10, l1 + 2, 0); + world.setBlock(j1, k1 - 10, l1 + 3, 0); + world.setBlock(j1, k1 - 10, l1 + 4, 0); + world.setBlock(j1, k1 - 10, l1 - 1, 0); + world.setBlock(j1, k1 - 10, l1 - 2, 0); + world.setBlock(j1, k1 - 10, l1 - 3, 0); + world.setBlock(j1, k1 - 10, l1 - 4, 0); + world.setBlock(j1, k1 - 9, l1 + 1, 0); + world.setBlock(j1, k1 - 9, l1 + 2, 0); + world.setBlock(j1, k1 - 9, l1 + 3, 0); + world.setBlock(j1, k1 - 9, l1 + 4, 0); + world.setBlock(j1, k1 - 9, l1 - 1, 0); + world.setBlock(j1, k1 - 9, l1 - 2, 0); + world.setBlock(j1, k1 - 9, l1 - 3, 0); + world.setBlock(j1, k1 - 9, l1 - 4, 0); + world.setBlock(j1, k1 - 8, l1 + 1, 0); + world.setBlock(j1, k1 - 8, l1 + 2, 0); + world.setBlock(j1, k1 - 8, l1 + 3, 0); + world.setBlock(j1, k1 - 8, l1 + 4, 0); + world.setBlock(j1, k1 - 8, l1 - 1, 0); + world.setBlock(j1, k1 - 8, l1 - 2, 0); + world.setBlock(j1, k1 - 8, l1 - 3, 0); + world.setBlock(j1, k1 - 8, l1 - 4, 0); + world.setBlock(j1, k1 - 7, l1 + 1, 0); + world.setBlock(j1, k1 - 7, l1 + 2, 0); + world.setBlock(j1, k1 - 7, l1 + 3, 0); + world.setBlock(j1, k1 - 7, l1 + 4, 0); + world.setBlock(j1, k1 - 7, l1 - 1, 0); + world.setBlock(j1, k1 - 7, l1 - 2, 0); + world.setBlock(j1, k1 - 7, l1 - 3, 0); + world.setBlock(j1, k1 - 7, l1 - 4, 0); + world.setBlock(j1, k1 - 10, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1, k1 - 9, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - 8, l1 + 5, Block.cobblestone.blockID); + int i8 = random.nextInt(2) + 1; + if(i8 == 1) + { + world.setBlock(j1 - 2, k1 - 10, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 2, k1 - 9, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 2, k1 - 8, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 2, k1 - 7, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 6, k1 - 10, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 6, k1 - 9, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 6, k1 - 8, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 6, k1 - 7, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 10, k1 - 10, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 10, k1 - 9, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 10, k1 - 8, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 10, k1 - 7, l1, Block.cobblestone.blockID); + int l8 = random.nextInt(100); + if(l8 <= 50) + { + world.setBlock(j1 - 1, k1 - 10, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 1, k1 - 9, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 1, k1 - 8, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 1, k1 - 10, l1 + 3, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 1, k1 - 9, l1 + 3, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 1, k1 - 8, l1 + 3, Block.stoneDoubleSlab.blockID); + } + int l9 = random.nextInt(100); + if(l9 <= 60) + { + world.setBlock(j1 - 2, k1 - 10, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 2, k1 - 9, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 2, k1 - 8, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 2, k1 - 10, l1 + 3, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 2, k1 - 9, l1 + 3, Block.stoneDoubleSlab.blockID); + } + int l10 = random.nextInt(100); + if(l10 <= 70) + { + world.setBlock(j1 - 3, k1 - 10, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 3, k1 - 9, l1 + 2, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 3, k1 - 10, l1 + 3, Block.stoneDoubleSlab.blockID); + world.setBlock(j1 - 3, k1 - 9, l1 + 3, Block.stoneDoubleSlab.blockID); + } + int l11 = random.nextInt(100); + if(l11 <= 40) + { + world.setBlock(j1 - 1, k1 - 10, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 1, k1 - 9, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 1, k1 - 8, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 1, k1 - 10, l1 - 3, Block.brick.blockID); + world.setBlock(j1 - 1, k1 - 9, l1 - 3, Block.brick.blockID); + } + int k12 = random.nextInt(100); + if(k12 <= 50) + { + world.setBlock(j1 - 2, k1 - 10, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 2, k1 - 9, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 2, k1 - 8, l1 - 2, Block.brick.blockID); + world.setBlock(j1 - 2, k1 - 10, l1 - 3, Block.brick.blockID); + world.setBlock(j1 - 2, k1 - 9, l1 - 3, Block.brick.blockID); + world.setBlock(j1 - 2, k1 - 8, l1 - 3, Block.brick.blockID); + } + int l12 = random.nextInt(100); + if(l12 <= 40) + { + world.setBlock(j1 - 4, k1 - 10, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 4, k1 - 9, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 4, k1 - 10, l1 - 3, Block.netherBrick.blockID); + world.setBlock(j1 - 4, k1 - 9, l1 - 3, Block.netherBrick.blockID); + } + int i13 = random.nextInt(100); + if(i13 <= 40) + { + world.setBlock(j1 - 5, k1 - 10, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 5, k1 - 9, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 5, k1 - 10, l1 - 3, Block.netherBrick.blockID); + world.setBlock(j1 - 5, k1 - 9, l1 - 3, Block.netherBrick.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 6, k1 - 9, l1 - 2, Block.netherBrick.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 - 3, Block.netherBrick.blockID); + } + int j13 = random.nextInt(100); + if(j13 <= 15) + { + world.setBlock(j1 - 9, k1 - 10, l1 + 2, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1 - 9, k1 - 10, l1 + 2); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + } + int k13 = random.nextInt(100); + if(k13 <= 15) + { + world.setBlock(j1 - 9, k1 - 10, l1 - 2, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1 - 9, k1 - 10, l1 - 2); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + } + } + if(i8 != 2) + { + continue; + } + world.setBlock(j1 - 1, k1 - 10, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 9, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 8, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 7, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 10, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 9, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 8, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 7, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 10, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 9, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 8, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 1, k1 - 7, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 10, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 9, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 8, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 7, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 10, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 9, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 8, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 7, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 10, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 9, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 8, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 3, k1 - 7, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 4, k1 - 10, l1, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1 - 4, k1 - 10, l1); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Zombie"); + } + + + world.setBlock(j1 - 8, k1 - 10, l1, Block.stoneSingleSlab.blockID); + world.setBlock(j1 - 8, k1 - 10, l1 + 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1 - 8, k1 - 10, l1 - 1, Block.stoneSingleSlab.blockID); + world.setBlock(j1 - 5, k1 - 10, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 5, k1 - 10, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1 - 5, k1 - 10, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 6, k1 - 10, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 6, k1 - 10, l1 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 7, k1 - 10, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 7, k1 - 10, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 7, k1 - 10, l1 - 1, Block.cobblestone.blockID); + int i9 = random.nextInt(100); + if(i9 <= 30) + { + world.setBlock(j1 - 6, k1 - 9, l1, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1 - 6, k1 - 9, l1); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + } + if(i9 <= 10) + { + world.setBlock(j1 - 6, k1 - 9, l1, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1 - 6, k1 - 9, l1); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + } + world.setBlock(j1 - 9, k1 - 10, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 9, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 8, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 7, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 10, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 9, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 8, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 7, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 10, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 9, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 8, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 9, k1 - 7, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 10, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 9, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 8, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 7, l1, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 10, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 9, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 8, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 7, l1 + 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 10, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 9, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 8, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 11, k1 - 7, l1 - 3, Block.blockNetherQuartz.blockID, 2, 2); + int i10 = random.nextInt(100); + if(i10 <= 20) + { + world.setBlock(j1 - 2, k1 - 10, l1 + 4, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1 - 2, k1 - 10, l1 + 4); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + } + int i11 = random.nextInt(100); + if(i11 <= 40) + { + world.setBlock(j1 - 3, k1 - 9, l1 + 3, 0); + world.setBlock(j1 - 3, k1 - 8, l1 + 3, 0); + world.setBlock(j1 - 3, k1 - 7, l1 + 3, 0); + world.setBlock(j1 - 1, k1 - 10, l1 + 4, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 2, k1 - 10, l1 + 4, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1, k1 - 10, l1 + 2, Block.blockNetherQuartz.blockID, 2, 2); + } + int i12 = random.nextInt(100); + if(i12 <= 40) + { + world.setBlock(j1 - 9, k1 - 9, l1 - 3, 0); + world.setBlock(j1 - 9, k1 - 8, l1 - 3, 0); + world.setBlock(j1 - 9, k1 - 7, l1 - 3, 0); + world.setBlock(j1 - 7, k1 - 10, l1 - 2, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 8, k1 - 10, l1 - 4, Block.blockNetherQuartz.blockID, 2, 2); + world.setBlock(j1 - 8, k1 - 10, l1 - 2, Block.blockNetherQuartz.blockID, 2, 2); + } + } + } + return true; + } +} diff --git a/common/MysticRuins/StructureRuin$1.java b/common/MysticRuins/StructureRuin$1.java new file mode 100644 index 0000000..b62e5cf --- /dev/null +++ b/common/MysticRuins/StructureRuin$1.java @@ -0,0 +1,553 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class StructureRuin$1 extends WorldGenerator +{ + + public StructureRuin$1() + { + } + + public boolean generate(World world, Random random, int i, int j, int k) + { + int l = random.nextInt(100); + if(l >= 10) + { + return false; + } + for(int i1 = 0; i1 < 1; i1++) + { + int j1 = (i + random.nextInt(8)) - random.nextInt(8); + int k1 = (j + random.nextInt(4)) - random.nextInt(4); + int l1 = (k + random.nextInt(8)) - random.nextInt(8); + if(!world.isAirBlock(j1, k1, l1) || world.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || !Block.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) + { + continue; + } + int i2 = random.nextInt(3) + 1; + if(i2 == 1) + { + int j2 = random.nextInt(8) + 5; + int i3 = random.nextInt(8) + 5; + int l3 = random.nextInt(8) + 5; + int k4 = random.nextInt(4) + 3; + int j5 = 1; + int i6 = 0; + int l6 = 1; + boolean flag = false; + int k7 = random.nextInt(100); + int j8 = random.nextInt(100); + if(j8 <= 20) + { + j5 = 0; + } else + { + j5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - j5, l1, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - j5) + 1, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 2, l1, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 3, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 4, l1 + 1, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - j5) + 5, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 2, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 3, l1 + 2, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - j5) + 4, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - j5, l1 + 3, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - j5) + 1, l1 + 3, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1 + 3, Block.stoneBrick.blockID); + + world.setBlock(j1, k1 - j5 - k4, l1 + 2, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1, k1 - j5 - k4, l1 + 2); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + + world.setBlock(j1, k1 - j5 - k4 - 1, l1 + 2, Block.dirt.blockID); + l6 = 1; + i6 = 0; + flag = false; + do + { + if(world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Block.waterStill.blockID) + { + i6++; + } else + { + flag = true; + } + } while(!flag && l6++ < 12); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3 + 1, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3 + 1, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + l3 + 3, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3 + 4, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Block.stoneBrick.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3, ((k1 - j5) + 3) - i6, l1 + l3 + 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Block.stoneBrick.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, Block.stoneBrick.blockID, 1, 2); + k7 = random.nextInt(100); + if(k7 <= 30) + { + world.setBlock(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Zombie"); + } + + + + + world.setBlock(j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Block.dirt.blockID); + } + l6 = 1; + i6 = 0; + flag = false; + do + { + if(world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 4) || world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 5) || world.isAirBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID || world.getBlockId(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID) + { + i6++; + } else + { + flag = true; + } + } while(!flag && l6++ < 12); + world.setBlock(j1 - i3, k1 - j5 - i6, l1 - 4, Block.stoneBrick.blockID); + world.setBlock(j1 - i3, ((k1 - j5) + 1) - i6, l1 - 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - i3, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - i3 - 1, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID); + world.setBlock(j1 - i3 - 1, ((k1 - j5) + 1) - i6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - i3 - 1, ((k1 - j5) + 2) - i6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - i3 - 2, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID); + k7 = random.nextInt(100); + if(k7 <= 60) + { + world.setBlock(j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Block.dirt.blockID); + world.setBlock(j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Block.dirt.blockID); + } + } + if(i2 == 2) + { + int k2 = random.nextInt(8) + 5; + int j3 = random.nextInt(8) + 5; + int i4 = random.nextInt(8) + 5; + int l4 = random.nextInt(4) + 3; + int k5 = 1; + int j6 = 0; + int i7 = 1; + boolean flag1 = false; + int l7 = random.nextInt(100); + int k8 = random.nextInt(100); + if(k8 <= 20) + { + k5 = 0; + } else + { + k5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - k5, l1, Block.stoneBrick.blockID); + world.setBlock(j1, k1 - k5, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - k5, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - k5, l1 + 3, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - k5, l1 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - k5) + 1, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - k5) + 2, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - k5) + 3, l1 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - k5) + 1, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + 1, k1 - k5, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + 2, k1 - k5, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - k5 - l4, l1 + 2, Block.dirt.blockID); + world.setBlock(j1, k1 - k5 - l4 - 1, l1 + 2, Block.dirt.blockID); + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 4) || world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 5) || world.isAirBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID || world.getBlockId(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 3, Block.stoneBrick.blockID); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 1) - j6, l1 - 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 2) - j6, l1 - 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 1) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 2) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 3) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2, ((k1 - k5) + 4) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2 - 1, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID); + world.setBlock(j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k2 - 2, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Block.dirt.blockID); + world.setBlock(j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 4) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 6) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 8) || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 6) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 8) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4 + 1, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4 + 1, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4 + 2, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4 + 3, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4 + 3, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4 + 4, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4 + 5, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 5, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 5, Block.stoneBrick.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 2) - j6, l1 + 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 7, Block.stoneBrick.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 2) - j6, l1 + 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 8, Block.stoneBrick.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 8, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 9, Block.stoneBrick.blockID, 1, 2); + l7 = random.nextInt(100); + if(l7 <= 60) + { + world.setBlock(j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Block.dirt.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 - j3, k1 - k5 - i7, l1 + i4) || world.isAirBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) || world.isAirBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) || world.getBlockId(j1 - j3, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID || world.getBlockId(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Block.waterStill.blockID || world.getBlockId((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock((j1 - j3) + 1, k1 - k5 - j6, l1 + i4, Block.stoneBrick.blockID); + world.setBlock((j1 - j3) + 1, ((k1 - k5) + 1) - j6, l1 + i4, Block.stoneBrick.blockID, 1, 2); + world.setBlock((j1 - j3) + 1, ((k1 - k5) + 2) - j6, l1 + i4, Block.stoneBrick.blockID, 1, 2); + world.setBlock((j1 - j3) + 2, k1 - k5 - j6, l1 + i4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, k1 - k5 - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 5) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - j3, k1 - k5 - j6, (l1 + i4) - 3, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID, 1, 2); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Block.dirt.blockID); + world.setBlock(j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) || world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) || world.isAirBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6, l1 - 6, Block.stoneBrick.blockID); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 2) - j6, l1 - 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 5, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID); + world.setBlock(j1 + j3 + 5, ((k1 - k5) + 1) - j6, l1 - 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 5, ((k1 - k5) + 2) - j6, l1 - 7, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + j3 + 6, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Block.dirt.blockID); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Block.dirt.blockID); + } + } + if(i2 != 3) + { + continue; + } + int l2 = random.nextInt(8) + 5; + int k3 = random.nextInt(8) + 5; + int j4 = random.nextInt(8) + 5; + int i5 = random.nextInt(4) + 3; + int l5 = 1; + int k6 = 0; + int j7 = 1; + boolean flag2 = false; + int i8 = random.nextInt(100); + int l8 = random.nextInt(100); + if(l8 <= 20) + { + l5 = 0; + } else + { + l5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - l5, l1, Block.stoneBrick.blockID); + world.setBlock(j1 - 1, k1 - l5, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 1, (k1 - l5) + 1, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 1, (k1 - l5) + 2, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 1, (k1 - l5) + 3, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - l5) + 1, l1, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - l5) + 2, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - l5) + 3, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - l5) + 4, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, (k1 - l5) + 5, l1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - l5, l1 + 1, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - l5) + 2, l1 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1, k1 - l5, l1 + 2, Block.stoneBrick.blockID); + world.setBlock(j1, (k1 - l5) + 1, l1 + 2, Block.stoneBrick.blockID, 1, 2); + + world.setBlock(j1, k1 - l5 - i5, l1 + 1, Block.dirt.blockID); + world.setBlock(j1, k1 - l5 - i5 - 1, l1 + 1, Block.dirt.blockID); + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2 + 3, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 1, Block.stoneBrick.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 3) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 2, Block.stoneBrick.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 3, Block.stoneBrick.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, Block.stoneBrick.blockID); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Block.dirt.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) || world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) || world.isAirBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Block.waterStill.blockID || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 1, Block.stoneBrick.blockID); + world.setBlock(j1 - k3, (k1 - l5 - k6) + 1, l1 - l2 - 1, Block.stoneBrick.blockID); + world.setBlock(j1 - k3, (k1 - l5 - k6) + 2, l1 - l2 - 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 3, Block.stoneBrick.blockID); + world.setBlock(j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 3, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3 - 1, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - k3 - 2, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID); + world.setBlock(j1 - k3 - 2, ((k1 - l5) + 1) - k6, l1 - l2 - 6, Block.stoneBrick.blockID); + world.setBlock(j1 - k3 - 3, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID); + i8 = random.nextInt(100); + if(i8 <= 60) + { + world.setBlock(j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Block.dirt.blockID); + world.setBlock(j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 + l2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) || world.getBlockId(j1 + l2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 + l2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 3) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + l2 + 2, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + l2 + 2, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 3, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID); + world.setBlock(j1 + l2 + 4, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 4, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 + l2 + 5, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1, 2); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Block.dirt.blockID); + world.setBlock(j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3, Block.stoneBrick.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 1, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 2, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 2, Block.stoneBrick.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 3, Block.stoneBrick.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 3, Block.stoneBrick.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 4, Block.stoneBrick.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 4, Block.stoneBrick.blockID, 1, 2); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 5, Block.stoneBrick.blockID, 1, 2); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + world.setBlock(j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Block.dirt.blockID); + } + } + + return true; + } +} diff --git a/common/MysticRuins/StructureRuin.java b/common/MysticRuins/StructureRuin.java new file mode 100644 index 0000000..9d76479 --- /dev/null +++ b/common/MysticRuins/StructureRuin.java @@ -0,0 +1,553 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class StructureRuin extends WorldGenerator +{ + + public StructureRuin() + { + } + + public boolean generate(World world, Random random, int i, int j, int k) + { + int l = random.nextInt(100); + if(l >= 10) + { + return false; + } + for(int i1 = 0; i1 < 1; i1++) + { + int j1 = (i + random.nextInt(8)) - random.nextInt(8); + int k1 = (j + random.nextInt(4)) - random.nextInt(4); + int l1 = (k + random.nextInt(8)) - random.nextInt(8); + if(!world.isAirBlock(j1, k1, l1) || world.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || !Block.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) + { + continue; + } + int i2 = random.nextInt(3) + 1; + if(i2 == 1) + { + int j2 = random.nextInt(8) + 5; + int i3 = random.nextInt(8) + 5; + int l3 = random.nextInt(8) + 5; + int k4 = random.nextInt(4) + 3; + int j5 = 1; + int i6 = 0; + int l6 = 1; + boolean flag = false; + int k7 = random.nextInt(100); + int j8 = random.nextInt(100); + if(j8 <= 20) + { + j5 = 0; + } else + { + j5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - j5, l1, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - j5) + 1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 3, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 4, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - j5) + 5, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 3, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - j5) + 4, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - j5, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - j5) + 1, l1 + 3, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - j5) + 2, l1 + 3, Block.cobblestone.blockID); + + world.setBlock(j1, k1 - j5 - k4, l1 + 2, Block.chest.blockID); + TileEntityChest tileentitychest = (TileEntityChest) world.getBlockTileEntity(j1, k1 - j5 - k4, l1 + 2); + Random rand = new Random(); + for(int slot = 0; slot < tileentitychest.getSizeInventory(); slot++) + { + int num = rand.nextInt(32); + + if(num == 1) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.pickaxeIron, 1, 0)); + } + + if(num == 2) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.axeIron, 1, 0)); + } + + if(num == 3) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.swordIron, 1, 0)); + } + + if(num == 4) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.shovelIron, 1, 0)); + } + + if(num == 5) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + tileentitychest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + + + world.setBlock(j1, k1 - j5 - k4 - 1, l1 + 2, Block.dirt.blockID); + l6 = 1; + i6 = 0; + flag = false; + do + { + if(world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Block.waterStill.blockID) + { + i6++; + } else + { + flag = true; + } + } while(!flag && l6++ < 12); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3 + 1, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3 + 1, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + l3 + 3, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3 + 4, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Block.cobblestone.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 3) - i6, l1 + l3 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3, k1 - j5 - i6, l1 + l3 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Block.cobblestone.blockID); + world.setBlock(j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, Block.cobblestoneMossy.blockID); + k7 = random.nextInt(100); + if(k7 <= 30) + { + world.setBlock(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Block.mobSpawner.blockID); + TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5); + if(spawner != null) + { + spawner.func_98049_a().setMobID("Zombie"); + } + + + + + world.setBlock(j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Block.dirt.blockID); + } + l6 = 1; + i6 = 0; + flag = false; + do + { + if(world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 4) || world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 5) || world.isAirBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID || world.getBlockId(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID) + { + i6++; + } else + { + flag = true; + } + } while(!flag && l6++ < 12); + world.setBlock(j1 - i3, k1 - j5 - i6, l1 - 4, Block.cobblestone.blockID); + world.setBlock(j1 - i3, ((k1 - j5) + 1) - i6, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - i3, k1 - j5 - i6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - i3 - 1, k1 - j5 - i6, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1 - i3 - 1, ((k1 - j5) + 1) - i6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - i3 - 1, ((k1 - j5) + 2) - i6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - i3 - 2, k1 - j5 - i6, l1 - 5, Block.cobblestone.blockID); + k7 = random.nextInt(100); + if(k7 <= 60) + { + world.setBlock(j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Block.dirt.blockID); + world.setBlock(j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Block.dirt.blockID); + } + } + if(i2 == 2) + { + int k2 = random.nextInt(8) + 5; + int j3 = random.nextInt(8) + 5; + int i4 = random.nextInt(8) + 5; + int l4 = random.nextInt(4) + 3; + int k5 = 1; + int j6 = 0; + int i7 = 1; + boolean flag1 = false; + int l7 = random.nextInt(100); + int k8 = random.nextInt(100); + if(k8 <= 20) + { + k5 = 0; + } else + { + k5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - k5, l1, Block.cobblestone.blockID); + world.setBlock(j1, k1 - k5, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - k5, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - k5, l1 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - k5, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - k5) + 1, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - k5) + 2, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - k5) + 3, l1 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - k5) + 1, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + 1, k1 - k5, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + 2, k1 - k5, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - k5 - l4, l1 + 2, Block.dirt.blockID); + world.setBlock(j1, k1 - k5 - l4 - 1, l1 + 2, Block.dirt.blockID); + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 4) || world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 5) || world.isAirBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID || world.getBlockId(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 3, Block.cobblestone.blockID); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 1) - j6, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 2) - j6, l1 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, k1 - k5 - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 1) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 2) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 3) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2, ((k1 - k5) + 4) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2 - 1, k1 - k5 - j6, l1 - 5, Block.cobblestone.blockID); + world.setBlock(j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k2 - 2, k1 - k5 - j6, l1 - 5, Block.cobblestone.blockID); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Block.dirt.blockID); + world.setBlock(j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 4) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 6) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 8) || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 6) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 8) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4 + 1, k1 - k5 - j6, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4 + 1, ((k1 - k5) + 1) - j6, l1 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4 + 2, k1 - k5 - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4 + 3, k1 - k5 - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4 + 3, ((k1 - k5) + 1) - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4 + 4, k1 - k5 - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4 + 5, k1 - k5 - j6, l1 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 5, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 5, Block.cobblestone.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 2) - j6, l1 + 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 7, Block.cobblestone.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 2) - j6, l1 + 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 8, Block.cobblestone.blockID); + world.setBlock(j1 + i4, ((k1 - k5) + 1) - j6, l1 + 8, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6, l1 + 9, Block.cobblestoneMossy.blockID); + l7 = random.nextInt(100); + if(l7 <= 60) + { + world.setBlock(j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Block.dirt.blockID); + world.setBlock(j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 - j3, k1 - k5 - i7, l1 + i4) || world.isAirBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) || world.isAirBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) || world.getBlockId(j1 - j3, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID || world.getBlockId(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Block.waterStill.blockID || world.getBlockId((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock((j1 - j3) + 1, k1 - k5 - j6, l1 + i4, Block.cobblestone.blockID); + world.setBlock((j1 - j3) + 1, ((k1 - k5) + 1) - j6, l1 + i4, Block.cobblestoneMossy.blockID); + world.setBlock((j1 - j3) + 1, ((k1 - k5) + 2) - j6, l1 + i4, Block.cobblestoneMossy.blockID); + world.setBlock((j1 - j3) + 2, k1 - k5 - j6, l1 + i4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, k1 - k5 - j6, (l1 + i4) - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 1, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 2, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 2, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 5) - j6, (l1 + i4) - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - j3, k1 - k5 - j6, (l1 + i4) - 3, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 3, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 3, Block.cobblestone.blockID); + world.setBlock(j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 3, Block.cobblestoneMossy.blockID); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Block.dirt.blockID); + world.setBlock(j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Block.dirt.blockID); + } + i7 = 1; + j6 = 0; + flag1 = false; + do + { + if(world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) || world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) || world.isAirBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID) + { + j6++; + } else + { + flag1 = true; + } + } while(!flag1 && i7++ < 12); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6, l1 - 6, Block.cobblestone.blockID); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 2) - j6, l1 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 5, k1 - k5 - j6, l1 - 7, Block.cobblestone.blockID); + world.setBlock(j1 + j3 + 5, ((k1 - k5) + 1) - j6, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 5, ((k1 - k5) + 2) - j6, l1 - 7, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + j3 + 6, k1 - k5 - j6, l1 - 7, Block.cobblestone.blockID); + l7 = random.nextInt(100); + if(l7 <= 30) + { + world.setBlock(j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Block.dirt.blockID); + world.setBlock(j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Block.dirt.blockID); + } + } + if(i2 != 3) + { + continue; + } + int l2 = random.nextInt(8) + 5; + int k3 = random.nextInt(8) + 5; + int j4 = random.nextInt(8) + 5; + int i5 = random.nextInt(4) + 3; + int l5 = 1; + int k6 = 0; + int j7 = 1; + boolean flag2 = false; + int i8 = random.nextInt(100); + int l8 = random.nextInt(100); + if(l8 <= 20) + { + l5 = 0; + } else + { + l5 = random.nextInt(4) + 5; + } + world.setBlock(j1, k1 - l5, l1, Block.cobblestone.blockID); + world.setBlock(j1 - 1, k1 - l5, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 1, (k1 - l5) + 1, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 1, (k1 - l5) + 2, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 1, (k1 - l5) + 3, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - l5) + 1, l1, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - l5) + 2, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - l5) + 3, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - l5) + 4, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, (k1 - l5) + 5, l1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - l5, l1 + 1, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - l5) + 2, l1 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1, k1 - l5, l1 + 2, Block.cobblestone.blockID); + world.setBlock(j1, (k1 - l5) + 1, l1 + 2, Block.cobblestoneMossy.blockID); + + world.setBlock(j1, k1 - l5 - i5, l1 + 1, Block.dirt.blockID); + world.setBlock(j1, k1 - l5 - i5 - 1, l1 + 1, Block.dirt.blockID); + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2 + 3, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 1, Block.cobblestone.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 3) - k6, l1 + j4 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 2, Block.cobblestone.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 3, Block.cobblestone.blockID); + world.setBlock(j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, Block.cobblestone.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, Block.cobblestone.blockID); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Block.dirt.blockID); + world.setBlock(j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) || world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) || world.isAirBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Block.waterStill.blockID || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 1, Block.cobblestone.blockID); + world.setBlock(j1 - k3, (k1 - l5 - k6) + 1, l1 - l2 - 1, Block.cobblestone.blockID); + world.setBlock(j1 - k3, (k1 - l5 - k6) + 2, l1 - l2 - 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 3, Block.cobblestone.blockID); + world.setBlock(j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 3, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3, k1 - l5 - k6, l1 - l2 - 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3 - 1, k1 - l5 - k6, l1 - l2 - 6, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - k3 - 2, k1 - l5 - k6, l1 - l2 - 6, Block.cobblestone.blockID); + world.setBlock(j1 - k3 - 2, ((k1 - l5) + 1) - k6, l1 - l2 - 6, Block.cobblestone.blockID); + world.setBlock(j1 - k3 - 3, k1 - l5 - k6, l1 - l2 - 6, Block.cobblestone.blockID); + i8 = random.nextInt(100); + if(i8 <= 60) + { + world.setBlock(j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Block.dirt.blockID); + world.setBlock(j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 + l2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) || world.getBlockId(j1 + l2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 + l2, k1 - l5 - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 2) - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + l2 + 1, ((k1 - l5) + 3) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + l2 + 2, ((k1 - l5) + 1) - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + l2 + 2, ((k1 - l5) + 2) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 3, ((k1 - l5) + 2) - k6, l1 + j4, Block.cobblestone.blockID); + world.setBlock(j1 + l2 + 4, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 4, ((k1 - l5) + 1) - k6, l1 + j4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 + l2 + 5, k1 - l5 - k6, l1 + j4, Block.cobblestoneMossy.blockID); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Block.dirt.blockID); + world.setBlock(j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Block.dirt.blockID); + } + j7 = 1; + k6 = 0; + flag2 = false; + do + { + if(world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Block.waterStill.blockID) + { + k6++; + } else + { + flag2 = true; + } + } while(!flag2 && j7++ < 12); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3, Block.cobblestone.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 1, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 2, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 2, Block.cobblestone.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 3, Block.cobblestone.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 3, Block.cobblestone.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 4, Block.cobblestone.blockID); + world.setBlock(j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 4, Block.cobblestoneMossy.blockID); + world.setBlock(j1 - 3, k1 - l5 - k6, l1 + k3 + 5, Block.cobblestoneMossy.blockID); + i8 = random.nextInt(100); + if(i8 <= 30) + { + world.setBlock(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Block.chest.blockID); + TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3); + Random rand = new Random(); + for(int slot = 0; slot < chest.getSizeInventory(); slot++) + { + int num = rand.nextInt(16); + + if(num == 1) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.enderPearl, 4, 0)); + } + + if(num == 2) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.diamond, 1, 0)); + } + + if(num == 3) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.emerald, 1, 0)); + } + + if(num == 4) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.appleGold, 1, 0)); + } + + if(num == 5) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotGold, 1, 0)); + } + + if(num == 6) + { + chest.setInventorySlotContents(slot, new ItemStack(Item.ingotIron, 1, 0)); + } + } + world.setBlock(j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Block.dirt.blockID); + } + } + + return true; + } +} diff --git a/common/MysticRuins/WorldGenMysticDungeon.java b/common/MysticRuins/WorldGenMysticDungeon.java new file mode 100644 index 0000000..32ca657 --- /dev/null +++ b/common/MysticRuins/WorldGenMysticDungeon.java @@ -0,0 +1,31 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenMysticDungeon implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.DunRarity; i++) + { + int Xcoord1 = blockX + random.nextInt(16) + 8; + int Ycoord1 = random.nextInt(9) + 28; + int Zcoord1 = blockZ + random.nextInt(16) + 8; + + (new StructureMysticDungeon()).generate(world, random, Xcoord1, Ycoord1, Zcoord1); + } + } +} \ No newline at end of file diff --git a/common/MysticRuins/WorldGenRuin$1.java b/common/MysticRuins/WorldGenRuin$1.java new file mode 100644 index 0000000..dc94a1f --- /dev/null +++ b/common/MysticRuins/WorldGenRuin$1.java @@ -0,0 +1,31 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenRuin$1 implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.RuinRarity; i++) + { + int Xcoord1 = blockX + random.nextInt(16) + 8; + int Ycoord1 = random.nextInt(11) + 60; + int Zcoord1 = blockZ + random.nextInt(16) + 8; + + (new StructureRuin$1()).generate(world, random, Xcoord1, Ycoord1, Zcoord1); + } + } +} \ No newline at end of file diff --git a/common/MysticRuins/WorldGenRuin.java b/common/MysticRuins/WorldGenRuin.java new file mode 100644 index 0000000..9b6503e --- /dev/null +++ b/common/MysticRuins/WorldGenRuin.java @@ -0,0 +1,31 @@ +package MysticRuins; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenRuin implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < Config.RuinRarity; i++) + { + int Xcoord1 = blockX + random.nextInt(16) + 8; + int Ycoord1 = random.nextInt(11) + 60; + int Zcoord1 = blockZ + random.nextInt(16) + 8; + + (new StructureRuin()).generate(world, random, Xcoord1, Ycoord1, Zcoord1); + } + } +} \ No newline at end of file diff --git a/common/MysticStones/BlockPlanks.java b/common/MysticStones/BlockPlanks.java new file mode 100644 index 0000000..ac2beb7 --- /dev/null +++ b/common/MysticStones/BlockPlanks.java @@ -0,0 +1,88 @@ +package MysticStones; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockPlanks extends Block { + + Icon[] textures; + + public BlockPlanks(int ID) { + super(ID, Material.wood); + setHardness(2F); + setResistance(5F); + setCreativeTab(MysticStones.MysticStonesTab); + } + + @Override + public int damageDropped(int j) + { + return j; + } + + public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) + { + int id = idPicked(world, x, y, z); + + if (id == 0) + { + return null; + } + + Item item = Item.itemsList[id]; + if (item == null) + { + return null; + } + + return new ItemStack(id, 1, getDamageValue(world, x, y, z)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 7; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "Planks_" + i); + } + } + + + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + list.add(new ItemStack(i,1,0)); + list.add(new ItemStack(i,1,1)); + list.add(new ItemStack(i,1,2)); + list.add(new ItemStack(i,1,3)); + list.add(new ItemStack(i,1,4)); + list.add(new ItemStack(i,1,5)); + list.add(new ItemStack(i,1,6)); + } + + +} diff --git a/common/MysticStones/BlockReinforced.java b/common/MysticStones/BlockReinforced.java new file mode 100644 index 0000000..e24c060 --- /dev/null +++ b/common/MysticStones/BlockReinforced.java @@ -0,0 +1,86 @@ +package MysticStones; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockReinforced extends Block { + + Icon[] textures; + + public BlockReinforced(int ID) { + super(ID, Material.iron); + setHardness(4F); + setResistance(2000F); + setCreativeTab(MysticStones.MysticStonesTab); + } + + @Override + public int damageDropped(int j) + { + return j; + } + + public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) + { + return (true); + } + + public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) + { + int id = idPicked(world, x, y, z); + + if (id == 0) + { + return null; + } + + Item item = Item.itemsList[id]; + if (item == null) + { + return null; + } + + return new ItemStack(id, 1, getDamageValue(world, x, y, z)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 8; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "ReinforcedBricks_" + i); + } + } + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + for(int k=0;k<8;k++) + { + list.add(new ItemStack(i,1,k)); + } + } +} diff --git a/common/MysticStones/BlockStoneBricks.java b/common/MysticStones/BlockStoneBricks.java new file mode 100644 index 0000000..585f1cf --- /dev/null +++ b/common/MysticStones/BlockStoneBricks.java @@ -0,0 +1,84 @@ +package MysticStones; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockStoneBricks extends Block { + + Icon[] textures; + + public BlockStoneBricks(int ID) { + super(ID, Material.rock); + setHardness(2F); + setResistance(5F); + setCreativeTab(MysticStones.MysticStonesTab); + } + + @Override + public int damageDropped(int j) + { + return j; + } + + public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) + { + int id = idPicked(world, x, y, z); + + if (id == 0) + { + return null; + } + + Item item = Item.itemsList[id]; + if (item == null) + { + return null; + } + + return new ItemStack(id, 1, getDamageValue(world, x, y, z)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 7; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "Bricks_" + i); + } + } + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + list.add(new ItemStack(i,1,0)); + list.add(new ItemStack(i,1,1)); + list.add(new ItemStack(i,1,2)); + list.add(new ItemStack(i,1,3)); + list.add(new ItemStack(i,1,4)); + list.add(new ItemStack(i,1,5)); + list.add(new ItemStack(i,1,6)); + } + + +} diff --git a/common/MysticStones/BlockStones.java b/common/MysticStones/BlockStones.java new file mode 100644 index 0000000..3897d53 --- /dev/null +++ b/common/MysticStones/BlockStones.java @@ -0,0 +1,93 @@ +package MysticStones; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockStones extends Block { + + Icon[] textures; + + public BlockStones(int ID) { + super(ID, Material.rock); + setHardness(1F); + setResistance(5F); + setCreativeTab(MysticStones.MysticStonesTab); + } + + @Override + public int damageDropped(int j) + { + switch(j) + { + case 0:return 1; + case 2:return 3; + case 4:return 5; + case 6:return 7; + case 8:return 9; + case 10:return 11; + case 12:return 13; + default:return j; + } + } + + protected boolean canSilkHarvest() + { + return true; + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) + { + int meta = world.getBlockMetadata(x, y, z); + + return new ItemStack(this, 1, meta); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 14; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "Stones_" + i); + } + } + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + list.add(new ItemStack(i,1,0)); + list.add(new ItemStack(i,1,1)); + list.add(new ItemStack(i,1,2)); + list.add(new ItemStack(i,1,3)); + list.add(new ItemStack(i,1,4)); + list.add(new ItemStack(i,1,5)); + list.add(new ItemStack(i,1,6)); + list.add(new ItemStack(i,1,7)); + list.add(new ItemStack(i,1,8)); + list.add(new ItemStack(i,1,9)); + list.add(new ItemStack(i,1,10)); + list.add(new ItemStack(i,1,11)); + list.add(new ItemStack(i,1,12)); + list.add(new ItemStack(i,1,13)); + } +} diff --git a/common/MysticStones/Config.java b/common/MysticStones/Config.java new file mode 100644 index 0000000..9b5aa62 --- /dev/null +++ b/common/MysticStones/Config.java @@ -0,0 +1,35 @@ +package MysticStones; + +import java.io.File; + +import net.minecraftforge.common.Configuration; + +public class Config +{ + public static Configuration config; + + public static int PlanksID; + public static int StonesID; + public static int StoneBricksID; + public static int ReinforcedBricksID; + + public static boolean Rare; + + public static void initialize(File file) + { + config = new Configuration(file); + + PlanksID = config.getBlock("Plank IDs", 509).getInt(); + StonesID = config.getBlock("Stone IDs", 510).getInt(); + StoneBricksID = config.getBlock("Stone Brick IDs", 511).getInt(); + ReinforcedBricksID = config.getBlock("Reinforced Brick IDs", 512).getInt(); + Rare = config.get("General", "Increase the Rarity of Stones?", false).getBoolean(Rare); + + config.save(); + } + + public static void save() + { + config.save(); + } +} \ No newline at end of file diff --git a/common/MysticStones/ItemBlockPlanks.java b/common/MysticStones/ItemBlockPlanks.java new file mode 100644 index 0000000..8e206ae --- /dev/null +++ b/common/MysticStones/ItemBlockPlanks.java @@ -0,0 +1,44 @@ +package MysticStones; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockPlanks extends ItemBlock { + + public ItemBlockPlanks(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "BlackPlank"; + case 1:return "RedPlank"; + case 2:return "GreenPlank"; + case 3:return "PurplePlank"; + case 4:return "BluePlank"; + case 5:return "LimePlank"; + case 6:return "YellowPlank"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return MysticStones.Planks.getIcon(2, par1); + } + +} diff --git a/common/MysticStones/ItemBlockReinforced.java b/common/MysticStones/ItemBlockReinforced.java new file mode 100644 index 0000000..65dd597 --- /dev/null +++ b/common/MysticStones/ItemBlockReinforced.java @@ -0,0 +1,56 @@ +package MysticStones; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockReinforced extends ItemBlock { + + public ItemBlockReinforced(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "MithrilBricks"; + case 1:return "VerditeBricks"; + case 2:return "IridiumBricks"; + case 3:return "AdamantineBricks"; + case 4:return "TourmalineBricks"; + case 5:return "TopazBricks"; + case 6:return "AmethystBricks"; + case 7:return "AgateBricks"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + if(par2EntityPlayer.isSneaking() == false) + { + par3List.add("Works As A Beacon Block Too!"); + } + } + + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return MysticStones.ReinforcedBricks.getIcon(2, par1); + } + +} diff --git a/common/MysticStones/ItemBlockStoneBricks.java b/common/MysticStones/ItemBlockStoneBricks.java new file mode 100644 index 0000000..30f8315 --- /dev/null +++ b/common/MysticStones/ItemBlockStoneBricks.java @@ -0,0 +1,46 @@ +package MysticStones; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockStoneBricks extends ItemBlock { + + public ItemBlockStoneBricks(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "AnorthositeBricks"; + case 1:return "LimestoneBricks"; + case 2:return "MarbleBricks"; + case 3:return "MigmatiteBricks"; + case 4:return "OrthogneissBricks"; + case 5:return "SlateBricks"; + case 6:return "TravertineBricks"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return MysticStones.StoneBricks.getIcon(2, par1); + } + + +} diff --git a/common/MysticStones/ItemBlockStones.java b/common/MysticStones/ItemBlockStones.java new file mode 100644 index 0000000..25f525d --- /dev/null +++ b/common/MysticStones/ItemBlockStones.java @@ -0,0 +1,51 @@ +package MysticStones; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockStones extends ItemBlock { + + public ItemBlockStones(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "AnorthositeSmooth"; + case 1:return "Anorthosite"; + case 2:return "LimestoneSmooth"; + case 3:return "Limestone"; + case 4:return "MarbleSmooth"; + case 5:return "Marble"; + case 6:return "MigmatiteSmooth"; + case 7:return "Migmatite"; + case 8:return "OrthogneissSmooth"; + case 9:return "Orthogneiss"; + case 10:return "SlateSmooth"; + case 11:return "Slate"; + case 12:return "TravertineSmooth"; + case 13:return "Travertine"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return MysticStones.Stones.getIcon(2, par1); + } + +} diff --git a/common/MysticStones/MysticStones.java b/common/MysticStones/MysticStones.java new file mode 100644 index 0000000..dbee7a0 --- /dev/null +++ b/common/MysticStones/MysticStones.java @@ -0,0 +1,123 @@ +package MysticStones; + +import java.io.File; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.DungeonHooks; +import net.minecraftforge.common.EnumHelper; +import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.Init; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.Mod.PostInit; +import cpw.mods.fml.common.Mod.PreInit; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; + +@Mod(modid = "Mystic Stones", name = "Mystic Stones", version = "0.1") +@NetworkMod(clientSideRequired = true, serverSideRequired = false) + +public class MysticStones +{ + public static Block Planks; + public static Block Stones; + public static Block StoneBricks; + public static Block ReinforcedBricks; + + public static CreativeTabs MysticStonesTab = new TabMysticStones(CreativeTabs.getNextID(), "MysticStonesTab"); + + private Configuration config; + + + @PreInit + public void preInit(FMLPreInitializationEvent event) + { + Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic Stones.cfg")); + Config.save(); + } + + @Init + public void load(FMLInitializationEvent event) + { + + Planks = new BlockPlanks(Config.PlanksID).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("ColoredPlanks"); + Stones = new BlockStones(Config.StonesID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticStones"); + StoneBricks = new BlockStoneBricks(Config.StoneBricksID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticStoneBricks"); + ReinforcedBricks = new BlockReinforced(Config.ReinforcedBricksID).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("ReinforcedBricks"); + + GameRegistry.registerBlock(Planks, ItemBlockPlanks.class, "Planks"); + GameRegistry.registerBlock(Stones, ItemBlockStones.class, "Stones"); + GameRegistry.registerBlock(StoneBricks, ItemBlockStoneBricks.class, "StoneBricks"); + GameRegistry.registerBlock(ReinforcedBricks, ItemBlockReinforced.class, "Reinforcedbricks"); + + + RecipeHandler.CraftPlanks(); + RecipeHandler.CraftStoneBricks(); + RecipeHandler.CraftElse(); + RecipeHandler.CraftReinforced(); + + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 0), "Smooth Anorthosite"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 1), "Anorthosite"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 2), "Smooth Limestone"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 3), "Limestone"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 4), "Smooth Marble"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 5), "Marble"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 6), "Smooth Migmatite"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 7), "Migmatite"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 8), "Smooth Orthogneiss"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 9), "Orthogneiss"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 10), "Smooth Slate"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 11), "Slate"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 12), "Smooth Travertine"); + LanguageRegistry.instance().addName(new ItemStack(Stones, 1, 13), "Travertine"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 0), "Anorthosite Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 1), "Limestone Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 2), "Marble Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 3), "Migmatite Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 4), "Orthogneiss Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 5), "Slate Bricks"); + LanguageRegistry.instance().addName(new ItemStack(StoneBricks, 1, 6), "Travertine Bricks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 0), "Purple Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 1), "Green Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 2), "Black Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 3), "Orange Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 4), "Red Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 5), "Blue Planks"); + LanguageRegistry.instance().addName(new ItemStack(Planks, 1, 6), "Yellow Planks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 0), "Reinforced Mithril Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 1), "Reinforced Verdite Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 2), "Reinforced Iridium Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 3), "Reinforced Adamantine Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 4), "Reinforced Tourmaline Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 5), "Reinforced Topaz Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 6), "Reinforced Amethyst Bricks"); + LanguageRegistry.instance().addName(new ItemStack(ReinforcedBricks, 1, 7), "Reinforced Agate Bricks"); + + LanguageRegistry.instance().addStringLocalization("itemGroup.MysticStonesTab", "en_US", "Mystic Stones!"); + + GameRegistry.registerWorldGenerator(new WorldgenSmoothAnorthosite()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothLimestone()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothMarble()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothMigmatite()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothOrthogneiss()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothSlate()); + GameRegistry.registerWorldGenerator(new WorldgenSmoothTravertine()); + + } + @PostInit + public void postInit(FMLPostInitializationEvent event) + { + + } +} diff --git a/common/MysticStones/RecipeHandler.java b/common/MysticStones/RecipeHandler.java new file mode 100644 index 0000000..28da5e7 --- /dev/null +++ b/common/MysticStones/RecipeHandler.java @@ -0,0 +1,179 @@ +package MysticStones; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; + +public class RecipeHandler +{ + public static void CraftPlanks() + { + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 0)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 0), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 1)})); + + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 2)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 1), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 3)})); + + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 4)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 2), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 5)})); + + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 6)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 3), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 7)})); + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 8)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 4), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 9)})); + + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 10)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 5), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 11)})); + + + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 12)})); + + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MysticStones.Planks, 1, 6), + new Object[]{"plankWood", new ItemStack(MysticStones.Stones, 1, 13)})); + } + + public static void CraftReinforced() + { + if(Loader.isModLoaded("MysticOres")) + { + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "ingotMithril", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "ingotVerdite", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "ingotIridium", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "ingotAdamantine", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "gemTourmaline", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "gemTopaz", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "gemAmethyst", Character.valueOf('X'), Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), new Object[] { + "X#X", "###", "X#X", Character.valueOf('#'), "gemAgate", Character.valueOf('X'), Block.stone})); + } + + } + + public static void CraftStoneBricks() + { + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 0), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 0) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 1), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 2) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 2), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 4) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 3), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 6) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 4), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 8) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 5), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 10) + }); + + GameRegistry.addRecipe(new ItemStack(MysticStones.StoneBricks, 4, 6), new Object[] { + "##", "##", '#', new ItemStack(MysticStones.Stones, 1, 12) + }); + } + + public static void CraftElse() + { + + if(Loader.isModLoaded("Mystic Ores") == true) + { + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 0), + true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotMithril", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 1), + true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotVerdite", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 2), + true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotIridium", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 3), + true, new Object[]{"#$#", "$$$", "#$#", '$', "ingotAdamantine", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 4), + true, new Object[]{"#$#", "$$$", "#$#", '$', "gemTourmaline", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 5), + true, new Object[]{"#$#", "$$$", "#$#", '$', "gemTopaz", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 6), + true, new Object[]{"#$#", "$$$", "#$#", '$', "gemAmethyst", '#', Block.stone})); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, 7), + true, new Object[]{"#$#", "$$$", "#$#", '$', "gemAgate", '#', Block.stone})); + } + + //smelting + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 1, new ItemStack(MysticStones.Stones, 1, 0), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 3, new ItemStack(MysticStones.Stones, 1, 2), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 5, new ItemStack(MysticStones.Stones, 1, 4), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 7, new ItemStack(MysticStones.Stones, 1, 6), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 9, new ItemStack(MysticStones.Stones, 1, 8), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 11, new ItemStack(MysticStones.Stones, 1, 10), 0.1F); + FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, 13, new ItemStack(MysticStones.Stones, 1, 12), 0.1F); + + for (int i=0;i<7;i++) + { + OreDictionary.registerOre("plankWood", new ItemStack(MysticStones.Planks, 1, i)); + } + + + } +} diff --git a/common/MysticStones/TabMysticStones.java b/common/MysticStones/TabMysticStones.java new file mode 100644 index 0000000..b42fdbf --- /dev/null +++ b/common/MysticStones/TabMysticStones.java @@ -0,0 +1,19 @@ +package MysticStones; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; + +public class TabMysticStones extends CreativeTabs { + + public TabMysticStones(int par1, String par2Str) { + super(par1, par2Str); + // TODO Auto-generated constructor stub + } + + @Override + public ItemStack getIconItemStack() { + return new ItemStack(MysticStones.ReinforcedBricks, 1, 4); + } + +} diff --git a/common/MysticStones/WorldgenSmoothAnorthosite.java b/common/MysticStones/WorldgenSmoothAnorthosite.java new file mode 100644 index 0000000..5edc4de --- /dev/null +++ b/common/MysticStones/WorldgenSmoothAnorthosite.java @@ -0,0 +1,47 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothAnorthosite implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 0, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 0, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothLimestone.java b/common/MysticStones/WorldgenSmoothLimestone.java new file mode 100644 index 0000000..081ab67 --- /dev/null +++ b/common/MysticStones/WorldgenSmoothLimestone.java @@ -0,0 +1,50 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothLimestone implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 2, 48, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 2, 48, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothMarble.java b/common/MysticStones/WorldgenSmoothMarble.java new file mode 100644 index 0000000..b29c87e --- /dev/null +++ b/common/MysticStones/WorldgenSmoothMarble.java @@ -0,0 +1,48 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothMarble implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 4, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 4, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothMigmatite.java b/common/MysticStones/WorldgenSmoothMigmatite.java new file mode 100644 index 0000000..ef192cb --- /dev/null +++ b/common/MysticStones/WorldgenSmoothMigmatite.java @@ -0,0 +1,48 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothMigmatite implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 6, 48, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 6, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothOrthogneiss.java b/common/MysticStones/WorldgenSmoothOrthogneiss.java new file mode 100644 index 0000000..2050ab3 --- /dev/null +++ b/common/MysticStones/WorldgenSmoothOrthogneiss.java @@ -0,0 +1,48 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothOrthogneiss implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 8, 48, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 8, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothSlate.java b/common/MysticStones/WorldgenSmoothSlate.java new file mode 100644 index 0000000..2eb4500 --- /dev/null +++ b/common/MysticStones/WorldgenSmoothSlate.java @@ -0,0 +1,48 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothSlate implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 10, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 10, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticStones/WorldgenSmoothTravertine.java b/common/MysticStones/WorldgenSmoothTravertine.java new file mode 100644 index 0000000..409a2cc --- /dev/null +++ b/common/MysticStones/WorldgenSmoothTravertine.java @@ -0,0 +1,48 @@ +package MysticStones; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldgenSmoothTravertine implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + if(Config.Rare == false){ + for(int i=0; i<3; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 12, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + + if(Config.Rare == true){ + for(int i=0; i<2; i++) + { + int Xcoord = blockX + random.nextInt(16); + int Ycoord = random.nextInt(40) + 20; + int Zcoord = blockZ + random.nextInt(16); + + (new WorldGenMinable(MysticStones.Stones.blockID, 12, 24, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord); + } + } + } +} \ No newline at end of file diff --git a/common/MysticWorld/Biome/BiomeGenBasic.java b/common/MysticWorld/Biome/BiomeGenBasic.java new file mode 100644 index 0000000..0b8d7b1 --- /dev/null +++ b/common/MysticWorld/Biome/BiomeGenBasic.java @@ -0,0 +1,25 @@ +package MysticWorld.Biome; + +import java.util.Random; + +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityGiantZombie; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenBasic extends BiomeGenBase { + + public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) { + super(id); + this.topBlock = (byte) blockTop; + this.fillerBlock = (byte) blockFiller; + this.theBiomeDecorator.treesPerChunk = treesChunk; + this.theBiomeDecorator.grassPerChunk = grassChunk; + this.theBiomeDecorator.flowersPerChunk = flowerChunk; + this.theBiomeDecorator.reedsPerChunk = reedsChunk;; + } + +} + diff --git a/common/MysticWorld/Biome/BiomeGenGlacier.java b/common/MysticWorld/Biome/BiomeGenGlacier.java new file mode 100644 index 0000000..50dfc60 --- /dev/null +++ b/common/MysticWorld/Biome/BiomeGenGlacier.java @@ -0,0 +1,29 @@ +package MysticWorld.Biome; + +import java.util.Random; + +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityGiantZombie; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenGlacier extends BiomeGenBase { + + public BiomeGenGlacier(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) { + super(id); + this.topBlock = (byte) blockTop; + this.fillerBlock = (byte) blockFiller; + this.theBiomeDecorator.treesPerChunk = treesChunk; + this.theBiomeDecorator.grassPerChunk = grassChunk; + this.theBiomeDecorator.flowersPerChunk = flowerChunk; + this.theBiomeDecorator.reedsPerChunk = reedsChunk;; + this.spawnableCreatureList.clear(); + this.spawnableMonsterList.clear(); + this.spawnableWaterCreatureList.clear(); + this.spawnableCreatureList.add(new SpawnListEntry(net.minecraft.entity.passive.EntityWolf.class, 5, 4, 4)); + this.waterColorMultiplier = 15397370; + } +} + diff --git a/common/MysticWorld/Biome/BiomeGenJungle.java b/common/MysticWorld/Biome/BiomeGenJungle.java new file mode 100644 index 0000000..3de2e7f --- /dev/null +++ b/common/MysticWorld/Biome/BiomeGenJungle.java @@ -0,0 +1,58 @@ +package MysticWorld.Biome; + +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityOcelot; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import net.minecraft.world.gen.feature.WorldGenHugeTrees; +import net.minecraft.world.gen.feature.WorldGenShrub; +import net.minecraft.world.gen.feature.WorldGenTallGrass; +import net.minecraft.world.gen.feature.WorldGenTrees; +import net.minecraft.world.gen.feature.WorldGenVines; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenJungle extends BiomeGenBase +{ + public BiomeGenJungle(int par1) + { + super(par1); + this.theBiomeDecorator.treesPerChunk = 50; + this.theBiomeDecorator.grassPerChunk = 25; + this.theBiomeDecorator.flowersPerChunk = 4; + this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); + this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4)); + } + + /** + * Gets a WorldGen appropriate for this biome. + */ + public WorldGenerator getRandomWorldGenForTrees(Random par1Random) + { + return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false, 4 + par1Random.nextInt(7), 3, 3, true))); + } + + /** + * Gets a WorldGen appropriate for this biome. + */ + public WorldGenerator getRandomWorldGenForGrass(Random par1Random) + { + return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1); + } + + public void decorate(World par1World, Random par2Random, int par3, int par4) + { + super.decorate(par1World, par2Random, par3, par4); + WorldGenVines worldgenvines = new WorldGenVines(); + + for (int k = 0; k < 50; ++k) + { + int l = par3 + par2Random.nextInt(16) + 8; + byte b0 = 64; + int i1 = par4 + par2Random.nextInt(16) + 8; + worldgenvines.generate(par1World, par2Random, l, b0, i1); + } + } +} diff --git a/common/MysticWorld/Biome/BiomeGenMountain.java b/common/MysticWorld/Biome/BiomeGenMountain.java new file mode 100644 index 0000000..e615d6a --- /dev/null +++ b/common/MysticWorld/Biome/BiomeGenMountain.java @@ -0,0 +1,23 @@ +package MysticWorld.Biome; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityGiantZombie; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenMountain extends BiomeGenBase { + + public BiomeGenMountain(int id, int blockTop, int blockFiller) + { + super(id); + this.topBlock = (byte) blockTop; + this.fillerBlock = (byte) blockFiller; + } +} + diff --git a/common/MysticWorld/Biome/BiomeGenTundra.java b/common/MysticWorld/Biome/BiomeGenTundra.java new file mode 100644 index 0000000..5bcba34 --- /dev/null +++ b/common/MysticWorld/Biome/BiomeGenTundra.java @@ -0,0 +1,28 @@ +package MysticWorld.Biome; + +import java.util.Random; + +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityGiantZombie; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenTundra extends BiomeGenBase { + + public BiomeGenTundra(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) { + super(id); + this.topBlock = (byte) blockTop; + this.fillerBlock = (byte) blockFiller; + this.theBiomeDecorator.treesPerChunk = treesChunk; + this.theBiomeDecorator.grassPerChunk = grassChunk; + this.theBiomeDecorator.flowersPerChunk = flowerChunk; + this.theBiomeDecorator.reedsPerChunk = reedsChunk;; + this.spawnableCreatureList.clear(); + this.spawnableMonsterList.clear(); + this.spawnableWaterCreatureList.clear(); + this.spawnableCreatureList.add(new SpawnListEntry(net.minecraft.entity.passive.EntityWolf.class, 5, 4, 4)); + } +} + diff --git a/common/MysticWorld/Biome/BiomeHandler.java b/common/MysticWorld/Biome/BiomeHandler.java new file mode 100644 index 0000000..bb0793d --- /dev/null +++ b/common/MysticWorld/Biome/BiomeHandler.java @@ -0,0 +1,63 @@ +package MysticWorld.Biome; + +import cpw.mods.fml.common.registry.GameRegistry; +import MysticOres.Blocks.BlockHandler; +import net.minecraft.block.Block; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.BiomeManager; + +public class BiomeHandler +{ + public static BiomeGenBase Mountain; + public static BiomeGenBase Tundra; + public static BiomeGenBase Steppe; + public static BiomeGenBase Glacier; + public static BiomeGenBase Jungle; + + public static void init() + { + initializeBiomes(); + registerBiomes(); + addSpawnBiomes(); + addStructureBiomes(); + } + + public static void initializeBiomes() + { + Mountain = new BiomeGenMountain(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.5F, 1.0F); + Tundra = new BiomeGenTundra(24, 0, 0, 0, 0, Block.blockSnow.blockID, Block.blockSnow.blockID).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.8F, 0.4F); + Steppe = new BiomeGenBasic(25, 0, 2, 2, 3, Block.grass.blockID, Block.dirt.blockID).setColor(5470985).setBiomeName("Steppe").setMinMaxHeight(0.1F, 0.1F); + Glacier = new BiomeGenGlacier(26, 0, 0, 0, 0, Block.ice.blockID, Block.ice.blockID).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.5F, 0.7F); + Jungle = new BiomeGenJungle(27).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.2F, 0.4F);; + } + + public static void registerBiomes() + { + GameRegistry.removeBiome(BiomeGenBase.jungle); + GameRegistry.removeBiome(BiomeGenBase.jungleHills); + GameRegistry.addBiome(Mountain); + GameRegistry.addBiome(Tundra); + GameRegistry.addBiome(Steppe); + GameRegistry.addBiome(Glacier); + GameRegistry.addBiome(Jungle); + } + + public static void addSpawnBiomes() + { + BiomeManager.addSpawnBiome(Steppe); + BiomeManager.addSpawnBiome(Mountain); + BiomeManager.addSpawnBiome(Jungle); + } + + public static void addStructureBiomes() + { + BiomeManager.addVillageBiome(Steppe, true); + + BiomeManager.addStrongholdBiome(Glacier); + BiomeManager.addStrongholdBiome(Mountain); + BiomeManager.addStrongholdBiome(Steppe); + BiomeManager.addStrongholdBiome(Tundra); + BiomeManager.addStrongholdBiome(Jungle); + } +} diff --git a/common/MysticWorld/Blocks/BlockBush.java b/common/MysticWorld/Blocks/BlockBush.java new file mode 100644 index 0000000..370a059 --- /dev/null +++ b/common/MysticWorld/Blocks/BlockBush.java @@ -0,0 +1,196 @@ +package MysticWorld.Blocks; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import MysticWorld.MysticWorld; +import MysticWorld.Items.ItemHandler$1; +import MysticWorld.Lib.BlockIds; +import MysticWorld.Lib.Strings; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityPotion; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.ColorizerFoliage; +import net.minecraft.world.ColorizerGrass; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.IShearable; + +public class BlockBush extends Block implements IPlantable{ + + Icon[] textures; + + public BlockBush(int id) { + super(id, Material.leaves); + setCreativeTab(MysticWorld.MysticWorldTab); + setHardness(0.3F); + setResistance(0.1F); + setStepSound(Block.soundGrassFootstep); + setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 12; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "Bush_" + i); + } + } + + //Plant Specific Stuff + + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4); + } + + protected boolean canThisPlantGrowOnThisBlockID(int par1) + { + return par1 == Block.grass.blockID || par1 == Block.dirt.blockID; + } + + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) + { + super.onNeighborBlockChange(par1World, par2, par3, par4, par5); + this.checkBushChange(par1World, par2, par3, par4); + } + + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + this.checkBushChange(par1World, par2, par3, par4); + } + + protected final void checkBushChange(World par1World, int par2, int par3, int par4) + { + if (!this.canBlockStay(par1World, par2, par3, par4)) + { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlockToAir(par2, par3, par4); + } + } + + public boolean canBlockStay(World par1World, int par2, int par3, int par4) + { + Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; + return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && + (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this)); + } + + public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) + { + super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); + } + + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public EnumPlantType getPlantType(World world, int x, int y, int z) + { + return EnumPlantType.Plains; + } + + @Override + public int getPlantID(World world, int x, int y, int z) + { + return 0; + } + + @Override + public int getPlantMetadata(World world, int x, int y, int z) + { + return 0; + } + + //Sprite Inits + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + public boolean isOpaqueCube() + { + return false; + } + + @SideOnly(Side.CLIENT) + public int getBlockColor() + { + double d0 = 0.5D; + double d1 = 1.0D; + return ColorizerGrass.getGrassColor(d0, d1); + } + + @SideOnly(Side.CLIENT) + public int getRenderColor(int par1) + { + return par1 == -1 ? 16777215 : ColorizerFoliage.getFoliageColorBasic(); + } + + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4); + return l == -1 ? 16777215 : par1IBlockAccess.getBiomeGenForCoords(par2, par4).getBiomeGrassColor(); + } + + //Meta Inits + + public int quantityDroppedWithBonus(int par1, Random par2Random) + { + return 1 + par2Random.nextInt(par1 * 2 + 1); + } + + public int idDropped(int par1, Random par2Random, int par3) + { + return ItemHandler$1.bushFruit.itemID; + } + + @Override + public int damageDropped(int j) + { + return j; + } + + public int idPicked(World par1World, int par2, int par3, int par4) + { + return blockID; + } + + public int getDamageValue(World par1World, int par2, int par3, int par4) + { + return par1World.getBlockMetadata(par2, par3, par4); + } + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + for(int j=0;j<12;j++) + { + list.add(new ItemStack(i,1,j)); + } + } + + +} diff --git a/common/MysticWorld/Blocks/BlockHandler.java b/common/MysticWorld/Blocks/BlockHandler.java new file mode 100644 index 0000000..bd9f1bb --- /dev/null +++ b/common/MysticWorld/Blocks/BlockHandler.java @@ -0,0 +1,46 @@ +package MysticWorld.Blocks; + +import MysticWorld.Lib.BlockIds; +import MysticWorld.Lib.Strings; +import MysticWorld.WorldGen.StonesGen; +import MysticWorld.WorldGen.WorldGenBushes; +import MysticWorld.WorldGen.WorldGenStones; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.common.MinecraftForge; + +public class BlockHandler { + + public static Block OreImbuedStone; + public static Block bush; + + public static void init() { + + OreImbuedStone = new BlockImbuedStone(BlockIds.ORE_STONE_1).setUnlocalizedName(Strings.IMBUED_STONE_NAME); + bush = new BlockBush(BlockIds.BUSH).setUnlocalizedName(Strings.BUSH_NAME); + + registerBlocks(); + setBlockHarvestLevels(); + } + + private static void registerBlocks() { + GameRegistry.registerBlock(OreImbuedStone, ItemBlockImbuedStone.class, Strings.IMBUED_STONE_NAME); + GameRegistry.registerBlock(bush, ItemBlockBush.class, Strings.BUSH_NAME); + + GameRegistry.registerWorldGenerator(new WorldGenBushes()); + GameRegistry.registerWorldGenerator(new WorldGenStones()); + + } + + private static void setBlockHarvestLevels() { + MinecraftForge.setBlockHarvestLevel(OreImbuedStone, 0, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(OreImbuedStone, 1, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(OreImbuedStone, 2, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(OreImbuedStone, 3, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(OreImbuedStone, 4, "pickaxe", 2); + } +} diff --git a/common/MysticWorld/Blocks/BlockImbuedStone.java b/common/MysticWorld/Blocks/BlockImbuedStone.java new file mode 100644 index 0000000..8485e3c --- /dev/null +++ b/common/MysticWorld/Blocks/BlockImbuedStone.java @@ -0,0 +1,133 @@ +package MysticWorld.Blocks; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockBreakable; +import net.minecraft.block.BlockFence; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import MysticWorld.MysticWorld; +import MysticWorld.Items.ItemHandler$1; + +public class BlockImbuedStone extends Block { + + Icon[] textures; + + public BlockImbuedStone(int ID) { + super(ID, Material.rock); + setHardness(0.5F); + setResistance(5F); + setCreativeTab(MysticWorld.MysticWorldTab); + setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.125F, 0.75F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[16]; + + for (int i = 0; i < 5; i++) + { + textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "OreStone_" + i); + } + } + + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4); + } + + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) + { + boolean flag = false; + + if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4))) + { + flag = true; + } + + if (flag) + { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlockToAir(par2, par3, par4); + } + } + + @Override + public Icon getIcon(int side, int meta) + { + return textures[meta]; + } + + public int idDropped(int par1, Random par2Random, int par3) + { + return ItemHandler$1.imbuedShard.itemID; + } + + @Override + public int damageDropped(int j) + { + return j; + } + + public int xpDropAmount(int j) + { + return 5; + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public boolean isOpaqueCube() + { + return false; + } + + protected boolean canSilkHarvest() + { + return true; + } + + public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) + { + this.dropXpOnBlockBreak(world, x, y, z, xpDropAmount(meta)); + } + + //meta specific stuff + public int idPicked(World par1World, int par2, int par3, int par4) + { + return this.blockID; + } + + public ItemStack getPickBlock(MovingObjectPosition target,World world, int x, int y, int z) + { + return null; + } + + public void getSubBlocks(int i,CreativeTabs tab, List list) + { + for(int j=0;j<5;j++) + { + list.add(new ItemStack(i,1,j)); + } + } +} \ No newline at end of file diff --git a/common/MysticWorld/Blocks/ItemBlockBush.java b/common/MysticWorld/Blocks/ItemBlockBush.java new file mode 100644 index 0000000..62690da --- /dev/null +++ b/common/MysticWorld/Blocks/ItemBlockBush.java @@ -0,0 +1,53 @@ +package MysticWorld.Blocks; + +import java.util.List; + +import MysticWorld.Lib.Strings; + + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockBush extends ItemBlock { + + public ItemBlockBush(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return Strings.BUSH_NAME; + case 1:return Strings.POISON_BUSH_NAME; + case 2:return Strings.WEAKNESS_BUSH_NAME; + case 3:return Strings.SLOWNESS_BUSH_NAME; + case 4:return Strings.HARMING_BUSH_NAME; + case 5:return Strings.WITHER_BUSH_NAME; + case 6:return Strings.HEALTH_BUSH_NAME; + case 7:return Strings.SPEED_BUSH_NAME; + case 8:return Strings.FIRE_RESISTANCE_BUSH_NAME; + case 9:return Strings.REGEN_BUSH_NAME; + case 10:return Strings.NIGHT_VISION_BUSH_NAME; + case 11:return Strings.INVISIBILITY_BUSH_NAME; + default:return ""; + } + } + + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return BlockHandler.bush.getIcon(2, par1); + } + +} diff --git a/common/MysticWorld/Blocks/ItemBlockImbuedStone.java b/common/MysticWorld/Blocks/ItemBlockImbuedStone.java new file mode 100644 index 0000000..77b1794 --- /dev/null +++ b/common/MysticWorld/Blocks/ItemBlockImbuedStone.java @@ -0,0 +1,43 @@ +package MysticWorld.Blocks; + +import java.util.List; + + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBlockImbuedStone extends ItemBlock { + + public ItemBlockImbuedStone(int par1) { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + public String getUnlocalizedName(ItemStack i){ + switch(i.getItemDamage()){ + case 0:return "Fire"; + case 1:return "Water"; + case 2:return "Earth"; + case 3:return "Air"; + case 4:return "Energy"; + default:return ""; + } + } + + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int par1) + { + return BlockHandler.OreImbuedStone.getIcon(2, par1); + } + +} diff --git a/common/MysticWorld/Client/ClientProxy.java b/common/MysticWorld/Client/ClientProxy.java new file mode 100644 index 0000000..9b48a1a --- /dev/null +++ b/common/MysticWorld/Client/ClientProxy.java @@ -0,0 +1,75 @@ +package MysticWorld.Client; + +import cpw.mods.fml.client.registry.RenderingRegistry; +import net.minecraft.client.renderer.entity.RenderFireball; +import net.minecraft.item.Item; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; +import MysticWorld.CommonProxy; +import MysticWorld.Client.FX.AirFX; +import MysticWorld.Client.FX.EarthFX; +import MysticWorld.Client.FX.EnergyFX; +import MysticWorld.Client.FX.FireFX; +import MysticWorld.Client.FX.WaterFX; +import MysticWorld.Entity.EntityChargeAir; +import MysticWorld.Entity.EntityChargeEarth; +import MysticWorld.Entity.EntityChargeEnergy; +import MysticWorld.Entity.EntityChargeFire; +import MysticWorld.Entity.EntityChargeWater; +import MysticWorld.Items.ItemHandler$1; +import MysticWorld.Renderer.RenderStaffPower; + +public class ClientProxy extends CommonProxy { + + @Override + public void registerRenders() + { + RenderingRegistry.registerEntityRenderingHandler(EntityChargeFire.class, new RenderStaffPower(0)); + RenderingRegistry.registerEntityRenderingHandler(EntityChargeWater.class, new RenderStaffPower(1)); + RenderingRegistry.registerEntityRenderingHandler(EntityChargeEarth.class, new RenderStaffPower(2)); + RenderingRegistry.registerEntityRenderingHandler(EntityChargeAir.class, new RenderStaffPower(3)); + RenderingRegistry.registerEntityRenderingHandler(EntityChargeEnergy.class, new RenderStaffPower(4)); + } + + public int addArmor(String armor) + { + return RenderingRegistry.addNewArmourRendererPrefix(armor); + } + + //particles + @Override + public void airFX(World worldObj, double x, double y, double z, float scale) + { + AirFX airFX = new AirFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(airFX); + } + + @Override + public void earthFX(World worldObj, double x, double y, double z, float scale) + { + EarthFX earthFX = new EarthFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(earthFX); + } + + @Override + public void energyFX(World worldObj, double x, double y, double z, float scale) + { + EnergyFX energyFX = new EnergyFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(energyFX); + } + + @Override + public void fireFX(World worldObj, double x, double y, double z, float scale) + { + FireFX fireFX = new FireFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(fireFX); + } + + @Override + public void waterFX(World worldObj, double x, double y, double z, float scale) + { + WaterFX waterFX = new WaterFX(worldObj, x, y, z, scale); + ModLoader.getMinecraftInstance().effectRenderer.addEffect(waterFX); + } + +} diff --git a/common/MysticWorld/Client/FX/AirFX.java b/common/MysticWorld/Client/FX/AirFX.java new file mode 100644 index 0000000..e6a379d --- /dev/null +++ b/common/MysticWorld/Client/FX/AirFX.java @@ -0,0 +1,85 @@ +package MysticWorld.Client.FX; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; + +public class AirFX extends EntityFX +{ + public AirFX(World world, double x, double y, double z) + { + super(world, x, y, z); + } + + public AirFX(World world, double x, double y, double z, float scale){ + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } + + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.99D; + this.motionY *= 0.99D; + this.motionZ *= 0.99D; + + if (this.particleMaxAge-- <= 0) + { + this.setDead(); + } + } + + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) + { + tessellator.draw(); + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/MysticTextures/textures/misc/airFX.png"); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); + + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + + tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); + tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); + + tessellator.draw(); + + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/particles.png"); + tessellator.startDrawingQuads(); + } +} \ No newline at end of file diff --git a/common/MysticWorld/Client/FX/EarthFX.java b/common/MysticWorld/Client/FX/EarthFX.java new file mode 100644 index 0000000..86507fc --- /dev/null +++ b/common/MysticWorld/Client/FX/EarthFX.java @@ -0,0 +1,85 @@ +package MysticWorld.Client.FX; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; + +public class EarthFX extends EntityFX +{ + public EarthFX(World world, double x, double y, double z) + { + super(world, x, y, z); + } + + public EarthFX(World world, double x, double y, double z, float scale){ + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } + + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.99D; + this.motionY *= 0.99D; + this.motionZ *= 0.99D; + + if (this.particleMaxAge-- <= 0) + { + this.setDead(); + } + } + + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) + { + tessellator.draw(); + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/MysticTextures/textures/misc/earthFX.png"); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); + + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + + tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); + tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); + + tessellator.draw(); + + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/particles.png"); + tessellator.startDrawingQuads(); + } +} diff --git a/common/MysticWorld/Client/FX/EnergyFX.java b/common/MysticWorld/Client/FX/EnergyFX.java new file mode 100644 index 0000000..d85398d --- /dev/null +++ b/common/MysticWorld/Client/FX/EnergyFX.java @@ -0,0 +1,85 @@ +package MysticWorld.Client.FX; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; + +public class EnergyFX extends EntityFX +{ + public EnergyFX(World world, double x, double y, double z) + { + super(world, x, y, z); + } + + public EnergyFX(World world, double x, double y, double z, float scale){ + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } + + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.99D; + this.motionY *= 0.99D; + this.motionZ *= 0.99D; + + if (this.particleMaxAge-- <= 0) + { + this.setDead(); + } + } + + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) + { + tessellator.draw(); + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/MysticTextures/textures/misc/energyFX.png"); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); + + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + + tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); + tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); + + tessellator.draw(); + + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/particles.png"); + tessellator.startDrawingQuads(); + } +} diff --git a/common/MysticWorld/Client/FX/FireFX.java b/common/MysticWorld/Client/FX/FireFX.java new file mode 100644 index 0000000..4f56459 --- /dev/null +++ b/common/MysticWorld/Client/FX/FireFX.java @@ -0,0 +1,86 @@ +package MysticWorld.Client.FX; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; + +public class FireFX extends EntityFX +{ + public FireFX(World world, double x, double y, double z) + { + super(world, x, y, z); + } + + public FireFX(World world, double x, double y, double z, float scale){ + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } + + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.99D; + this.motionY *= 0.99D; + this.motionZ *= 0.99D; + + if (this.particleMaxAge-- <= 0) + { + this.setDead(); + } + } + + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) + { + tessellator.draw(); + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/MysticTextures/textures/misc/fireFX.png"); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); + + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + + tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); + tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); + + tessellator.draw(); + + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/particles.png"); + tessellator.startDrawingQuads(); + } +} + diff --git a/common/MysticWorld/Client/FX/WaterFX.java b/common/MysticWorld/Client/FX/WaterFX.java new file mode 100644 index 0000000..71e1cba --- /dev/null +++ b/common/MysticWorld/Client/FX/WaterFX.java @@ -0,0 +1,85 @@ +package MysticWorld.Client.FX; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.FMLClientHandler; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; + +public class WaterFX extends EntityFX +{ + public WaterFX(World world, double x, double y, double z) + { + super(world, x, y, z); + } + + public WaterFX(World world, double x, double y, double z, float scale){ + super(world, x, y, z); + this.motionX *= 0.019999999552965164D; + this.motionY *= 0.019999999552965164D; + this.motionZ *= 0.019999999552965164D; + this.particleRed = 1.0F; + this.particleGreen = 1.0F; + this.particleBlue = 1.0F; + this.particleScale = scale; + this.noClip = true; + this.particleMaxAge = 15; + } + + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.99D; + this.motionY *= 0.99D; + this.motionZ *= 0.99D; + + if (this.particleMaxAge-- <= 0) + { + this.setDead(); + } + } + + public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) + { + tessellator.draw(); + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/MysticTextures/textures/misc/waterFX.png"); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + + float scale = 0.1F * this.particleScale; + float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); + float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); + float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); + + tessellator.startDrawingQuads(); + tessellator.setBrightness(240); + + tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue); + + tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D); + tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D); + tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D); + + tessellator.draw(); + + GL11.glDisable(3042); + GL11.glDepthMask(true); + GL11.glPopMatrix(); + + FMLClientHandler.instance().getClient().renderEngine.bindTexture("/particles.png"); + tessellator.startDrawingQuads(); + } +} diff --git a/common/MysticWorld/CommonProxy.java b/common/MysticWorld/CommonProxy.java new file mode 100644 index 0000000..1700297 --- /dev/null +++ b/common/MysticWorld/CommonProxy.java @@ -0,0 +1,33 @@ +package MysticWorld; + +import net.minecraft.src.ModLoader; +import net.minecraft.world.World; +import MysticWorld.Client.FX.AirFX; + +public class CommonProxy { + + public int addArmor(String armor) + { + return 0; + } + + public void registerRenders(){ + } + + //particles + public void airFX(World worldObj, double x, double y, double z, float scale){ + } + + public void earthFX(World worldObj, double x, double y, double z, float scale){ + } + + public void energyFX(World worldObj, double x, double y, double z, float scale){ + } + + public void fireFX(World worldObj, double x, double y, double z, float scale){ + } + + public void waterFX(World worldObj, double x, double y, double z, float scale){ + } + +} diff --git a/common/MysticWorld/Config.java b/common/MysticWorld/Config.java new file mode 100644 index 0000000..60e7076 --- /dev/null +++ b/common/MysticWorld/Config.java @@ -0,0 +1,65 @@ +package MysticWorld; + +import java.io.File; + +import MysticWorld.Lib.BlockIds; +import MysticWorld.Lib.EntityIds; +import MysticWorld.Lib.ItemIds; +import MysticWorld.Lib.Strings; + +import net.minecraftforge.common.Configuration; + +public class Config +{ + public static Configuration config; + + public static void initialize(File file) + { + config = new Configuration(file); + + //Block Configuration + BlockIds.ORE_STONE_1 = config.getBlock(Strings.IMBUED_STONE_NAME, BlockIds.ORE_STONE_1_DEFAULT).getInt(BlockIds.ORE_STONE_1); + BlockIds.BUSH = config.getBlock(Strings.BUSH_NAME, BlockIds.BUSH_DEFAULT).getInt(BlockIds.BUSH_DEFAULT); + + //Item Configuration + + ItemIds.IMBUED_SHARD = config.getItem(Strings.IMBUED_SHARD_NAME, ItemIds.IMBUED_SHARD_DEFAULT).getInt(ItemIds.IMBUED_SHARD_DEFAULT); + + ItemIds.STAFF_PARTS = config.getItem(Strings.STAFF_NAME, ItemIds.STAFF_PARTS_DEFAULT).getInt(ItemIds.STAFF_PARTS_DEFAULT); + ItemIds.FIRE_STAFF = config.getItem(Strings.FIRE_STAFF_NAME, ItemIds.FIRE_STAFF_DEFAULT).getInt(ItemIds.FIRE_STAFF_DEFAULT); + ItemIds.WATER_STAFF = config.getItem(Strings.WATER_STAFF_NAME, ItemIds.WATER_STAFF_DEFAULT).getInt(ItemIds.WATER_STAFF_DEFAULT); + ItemIds.EARTH_STAFF = config.getItem(Strings.EARTH_STAFF_NAME, ItemIds.EARTH_STAFF_DEFAULT).getInt(ItemIds.EARTH_STAFF_DEFAULT); + ItemIds.AIR_STAFF = config.getItem(Strings.AIR_STAFF_NAME, ItemIds.AIR_STAFF_DEFAULT).getInt(ItemIds.AIR_STAFF_DEFAULT); + ItemIds.ENERGY_STAFF = config.getItem(Strings.ENERGY_STAFF_NAME, ItemIds.ENERGY_STAFF_DEFAULT).getInt(ItemIds.ENERGY_STAFF_DEFAULT); + ItemIds.STAFF_POWER = config.getItem(Strings.POWER_STAFF_NAME, ItemIds.STAFF_POWER_DEFAULT).getInt(ItemIds.STAFF_POWER_DEFAULT); + + ItemIds.BUSH_FRUIT = config.getItem(Strings.BUSH_FRUIT_NAME, ItemIds.BUSH_FRUIT_DEFAULT).getInt(ItemIds.BUSH_FRUIT_DEFAULT); + + ItemIds.VERDITE_HELMET = config.getItem(Strings.VERDITE_HELMET_NAME, ItemIds.VERDITE_HELMET_DEFAULT).getInt(ItemIds.VERDITE_HELMET_DEFAULT); + ItemIds.VERDITE_CHESTPLATE = config.getItem(Strings.VERDITE_CHESTPLATE_NAME, ItemIds.VERDITE_CHESTPLATE_DEFAULT).getInt(ItemIds.VERDITE_CHESTPLATE_DEFAULT); + ItemIds.VERDITE_LEGGINGS = config.getItem(Strings.VERDITE_LEGGINGS_NAME, ItemIds.VERDITE_LEGGINGS_DEFAULT).getInt(ItemIds.VERDITE_LEGGINGS_DEFAULT); + ItemIds.VERDITE_BOOTS = config.getItem(Strings.VERDITE_BOOTS_NAME, ItemIds.VERDITE_BOOTS_DEFAULT).getInt(ItemIds.VERDITE_BOOTS_DEFAULT); + + ItemIds.MITHRIL_HELMET = config.getItem(Strings.MITHRIL_HELMET_NAME, ItemIds.MITHRIL_HELMET_DEFAULT).getInt(ItemIds.MITHRIL_HELMET_DEFAULT); + ItemIds.MITHRIL_CHESTPLATE = config.getItem(Strings.MITHRIL_CHESTPLATE_NAME, ItemIds.MITHRIL_CHESTPLATE_DEFAULT).getInt(ItemIds.MITHRIL_CHESTPLATE_DEFAULT); + ItemIds.MITHRIL_LEGGINGS = config.getItem(Strings.MITHRIL_LEGGINGS_NAME, ItemIds.MITHRIL_LEGGINGS_DEFAULT).getInt(ItemIds.MITHRIL_LEGGINGS_DEFAULT); + ItemIds.MITHRIL_BOOTS = config.getItem(Strings.MITHRIL_BOOTS_NAME, ItemIds.MITHRIL_BOOTS_DEFAULT).getInt(ItemIds.MITHRIL_BOOTS_DEFAULT); + + ItemIds.ADAMANTINE_HELMET = config.getItem(Strings.ADAMANTINE_HELMET_NAME, ItemIds.ADAMANTINE_HELMET_DEFAULT).getInt(ItemIds.ADAMANTINE_HELMET_DEFAULT); + ItemIds.ADAMANTINE_CHESTPLATE = config.getItem(Strings.ADAMANTINE_CHESTPLATE_NAME, ItemIds.ADAMANTINE_CHESTPLATE_DEFAULT).getInt(ItemIds.ADAMANTINE_CHESTPLATE_DEFAULT); + ItemIds.ADAMANTINE_LEGGINGS = config.getItem(Strings.ADAMANTINE_LEGGINGS_NAME, ItemIds.ADAMANTINE_LEGGINGS_DEFAULT).getInt(ItemIds.ADAMANTINE_LEGGINGS_DEFAULT); + ItemIds.ADAMANTINE_BOOTS = config.getItem(Strings.ADAMANTINE_BOOTS_NAME, ItemIds.ADAMANTINE_BOOTS_DEFAULT).getInt(ItemIds.ADAMANTINE_BOOTS_DEFAULT); + + ItemIds.IRIDIUM_HELMET = config.getItem(Strings.IRIDIUM_HELMET_NAME, ItemIds.IRIDIUM_HELMET_DEFAULT).getInt(ItemIds.IRIDIUM_HELMET_DEFAULT); + ItemIds.IRIDIUM_CHESTPLATE = config.getItem(Strings.IRIDIUM_CHESTPLATE_NAME, ItemIds.IRIDIUM_CHESTPLATE_DEFAULT).getInt(ItemIds.IRIDIUM_CHESTPLATE_DEFAULT); + ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS_DEFAULT).getInt(ItemIds.IRIDIUM_LEGGINGS_DEFAULT); + ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS_DEFAULT).getInt(ItemIds.IRIDIUM_BOOTS_DEFAULT); + + config.save(); + } + + public static void save() + { + config.save(); + } +} \ No newline at end of file diff --git a/common/MysticWorld/Entity/EntityChargeAir.java b/common/MysticWorld/Entity/EntityChargeAir.java new file mode 100644 index 0000000..69c8f46 --- /dev/null +++ b/common/MysticWorld/Entity/EntityChargeAir.java @@ -0,0 +1,239 @@ +package MysticWorld.Entity; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.boss.EntityDragon; +import net.minecraft.entity.boss.EntityWither; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySmallFireball; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.FakePlayerFactory; +import net.minecraftforge.common.ForgeHooks; + +import MysticWorld.MysticWorld; + +public class EntityChargeAir extends Entity { + + public EntityLiving shootingEntity; + public EntityPlayer entityPlayer; + public EntityDragon entityDragon; + public EntityWither entityWither; + private boolean inGround = false; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private int inTile = 0; + private int ticksAlive; + private int ticksInAir = 0; + + public EntityChargeAir(World par1World) + { + super(par1World); + } + + public EntityChargeAir(World par1World, EntityLiving par2EntityLiving) + { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); + this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.shootingEntity = par2EntityLiving; + } + + public void onUpdate() + { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) + { + this.setDead(); + } + else + { + super.onUpdate(); + + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = (Entity)list.get(j); + + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) + { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) + { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) + { + this.onImpact(movingobjectposition); + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + float f2 = this.getMotionFactor(); + + if (this.isInWater()) + { + for (int k = 0; k < 4; ++k) + { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + MysticWorld.proxy.airFX(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } + + protected float getMotionFactor() + { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) + { + Random rand = new Random(); + + if (!this.worldObj.isRemote) + { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + + if (par1MovingObjectPosition.entityHit != entityPlayer && par1MovingObjectPosition.entityHit != entityDragon && par1MovingObjectPosition.entityHit != entityWither) + { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f3 > 0.0F) + { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)2 * 0.6000000238418579D / (double)f3, 2.5, this.motionZ * (double)2 * 0.6000000238418579D / (double)f3); + } + } + else + { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + + switch (par1MovingObjectPosition.sideHit) + { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + + this.setDead(); + } + } + + @Override + protected void entityInit() { + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { + } + + public boolean canBeCollidedWith() + { + return true; + } + + public float getCollisionBorderSize() + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public float getBrightness(float par1) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) + { + return 15728880; + } +} \ No newline at end of file diff --git a/common/MysticWorld/Entity/EntityChargeEarth.java b/common/MysticWorld/Entity/EntityChargeEarth.java new file mode 100644 index 0000000..77f5d69 --- /dev/null +++ b/common/MysticWorld/Entity/EntityChargeEarth.java @@ -0,0 +1,251 @@ +package MysticWorld.Entity; + +import java.util.List; +import java.util.Random; + +import MysticWorld.MysticWorld; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.boss.EntityDragon; +import net.minecraft.entity.boss.EntityWither; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySmallFireball; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.FakePlayerFactory; +import net.minecraftforge.common.ForgeHooks; + +public class EntityChargeEarth extends Entity { + + public EntityLiving shootingEntity; + public EntityPlayer entityPlayer; + public EntityDragon entityDragon; + public EntityWither entityWither; + private boolean inGround = false; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private int inTile = 0; + private int ticksAlive; + private int ticksInAir = 0; + + public EntityChargeEarth(World par1World) + { + super(par1World); + } + + public EntityChargeEarth(World par1World, EntityLiving par2EntityLiving) + { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); + this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.shootingEntity = par2EntityLiving; + } + + public void onUpdate() + { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) + { + this.setDead(); + } + else + { + super.onUpdate(); + + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = (Entity)list.get(j); + + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) + { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) + { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) + { + this.onImpact(movingobjectposition); + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + float f2 = this.getMotionFactor(); + + if (this.isInWater()) + { + for (int k = 0; k < 4; ++k) + { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + MysticWorld.proxy.earthFX(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } + + protected float getMotionFactor() + { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) + { + Random rand = new Random(); + + if (!this.worldObj.isRemote) + { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + + if (par1MovingObjectPosition.entityHit != null) + { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f3 > 0.0F) + { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); + } + + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); + + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.seeds, rand.nextInt(4)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.mushroomBrown, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.appleRed, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 0))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.pumpkinSeeds, rand.nextInt(2)))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 1))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 2))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 3))); + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.melonSeeds, rand.nextInt(3)))); + } + else + { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + + switch (par1MovingObjectPosition.sideHit) + { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + + this.setDead(); + } + } + + @Override + protected void entityInit() { + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { + } + + public boolean canBeCollidedWith() + { + return true; + } + + public float getCollisionBorderSize() + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public float getBrightness(float par1) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) + { + return 15728880; + } +} diff --git a/common/MysticWorld/Entity/EntityChargeEnergy.java b/common/MysticWorld/Entity/EntityChargeEnergy.java new file mode 100644 index 0000000..5e366f3 --- /dev/null +++ b/common/MysticWorld/Entity/EntityChargeEnergy.java @@ -0,0 +1,230 @@ +package MysticWorld.Entity; + +import java.util.List; + +import MysticWorld.MysticWorld; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySmallFireball; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityChargeEnergy extends Entity { + + public EntityLiving shootingEntity; + private boolean inGround = false; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private int inTile = 0; + private int ticksAlive; + private int ticksInAir = 0; + + public EntityChargeEnergy(World par1World) + { + super(par1World); + } + + public EntityChargeEnergy(World par1World, EntityLiving par2EntityLiving) + { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); + this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.shootingEntity = par2EntityLiving; + } + + public void onUpdate() + { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) + { + this.setDead(); + } + else + { + super.onUpdate(); + + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = (Entity)list.get(j); + + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) + { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) + { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) + { + this.onImpact(movingobjectposition); + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + float f2 = this.getMotionFactor(); + + if (this.isInWater()) + { + for (int k = 0; k < 4; ++k) + { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + MysticWorld.proxy.energyFX(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } + + protected float getMotionFactor() + { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) + { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + + if (!this.worldObj.isRemote) + { + if (par1MovingObjectPosition.entityHit != null) + { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f3 > 0.0F) + { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); + } + + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, par1MovingObjectPosition.entityHit.posX, par1MovingObjectPosition.entityHit.posY, par1MovingObjectPosition.entityHit.posZ)); + } + else + { + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, i, j, k)); + + switch (par1MovingObjectPosition.sideHit) + { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + + this.setDead(); + } + } + + @Override + protected void entityInit() { + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { + } + + public boolean canBeCollidedWith() + { + return true; + } + + public float getCollisionBorderSize() + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public float getBrightness(float par1) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) + { + return 15728880; + } + +} \ No newline at end of file diff --git a/common/MysticWorld/Entity/EntityChargeFire.java b/common/MysticWorld/Entity/EntityChargeFire.java new file mode 100644 index 0000000..d787dff --- /dev/null +++ b/common/MysticWorld/Entity/EntityChargeFire.java @@ -0,0 +1,239 @@ +package MysticWorld.Entity; + +import java.util.List; + +import MysticWorld.MysticWorld; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySmallFireball; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityChargeFire extends Entity { + + public EntityLiving shootingEntity; + private boolean inGround = false; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private int inTile = 0; + private int ticksAlive; + private int ticksInAir = 0; + + public EntityChargeFire(World par1World) + { + super(par1World); + } + + public EntityChargeFire(World par1World, EntityLiving par2EntityLiving) + { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); + this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.shootingEntity = par2EntityLiving; + } + + public void onUpdate() + { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) + { + this.setDead(); + } + else + { + super.onUpdate(); + + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = (Entity)list.get(j); + + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) + { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) + { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) + { + this.onImpact(movingobjectposition); + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + float f2 = this.getMotionFactor(); + + if (this.isInWater()) + { + for (int k = 0; k < 4; ++k) + { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + MysticWorld.proxy.fireFX(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } + + protected float getMotionFactor() + { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) + { + if (!this.worldObj.isRemote) + { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + + if (par1MovingObjectPosition.entityHit != null) + { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f3 > 0.0F) + { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); + } + + if (!par1MovingObjectPosition.entityHit.isImmuneToFire()) + { + par1MovingObjectPosition.entityHit.setFire(5); + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 7); + } + } + else + { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + + switch (par1MovingObjectPosition.sideHit) + { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + + if (this.worldObj.isAirBlock(i, j, k)) + { + this.worldObj.setBlock(i, j, k, Block.fire.blockID); + } + + } + + this.setDead(); + } + } + + @Override + protected void entityInit() { + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { + } + + public boolean canBeCollidedWith() + { + return true; + } + + public float getCollisionBorderSize() + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public float getBrightness(float par1) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) + { + return 15728880; + } + +} diff --git a/common/MysticWorld/Entity/EntityChargeWater.java b/common/MysticWorld/Entity/EntityChargeWater.java new file mode 100644 index 0000000..a91cd78 --- /dev/null +++ b/common/MysticWorld/Entity/EntityChargeWater.java @@ -0,0 +1,233 @@ +package MysticWorld.Entity; + +import java.util.List; + +import MysticWorld.MysticWorld; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySmallFireball; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityChargeWater extends Entity { + + public EntityLiving shootingEntity; + private boolean inGround = false; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private int inTile = 0; + private int ticksAlive; + private int ticksInAir = 0; + + public EntityChargeWater(World par1World) + { + super(par1World); + } + + public EntityChargeWater(World par1World, EntityLiving par2EntityLiving) + { + super(par1World); + this.setSize(0.25F, 0.25F); + this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); + this.setPosition(this.posX, this.posY, this.posZ); + this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI)); + this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); + this.shootingEntity = par2EntityLiving; + } + + public void onUpdate() + { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) + { + this.setDead(); + } + else + { + super.onUpdate(); + + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = (Entity)list.get(j); + + if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) + { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) + { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) + { + this.onImpact(movingobjectposition); + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + + float f2 = this.getMotionFactor(); + + if (this.isInWater()) + { + for (int k = 0; k < 4; ++k) + { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + MysticWorld.proxy.waterFX(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, 1.0F); + this.setPosition(this.posX, this.posY, this.posZ); + } + } + + protected float getMotionFactor() + { + return 0.95F; + } + + protected void onImpact(MovingObjectPosition par1MovingObjectPosition) + { + if (!this.worldObj.isRemote) + { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + + if (par1MovingObjectPosition.entityHit != null) + { + double f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f3 > 0.0F) + { + par1MovingObjectPosition.entityHit.addVelocity(this.motionX * (double)1 * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)1 * 0.6000000238418579D / (double)f3); + } + + if (par1MovingObjectPosition.entityHit.isImmuneToFire()) + { + par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20); + } + } + else + { + int i = par1MovingObjectPosition.blockX; + int j = par1MovingObjectPosition.blockY; + int k = par1MovingObjectPosition.blockZ; + + switch (par1MovingObjectPosition.sideHit) + { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + } + + this.setDead(); + } + } + + @Override + protected void entityInit() { + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { + } + + public boolean canBeCollidedWith() + { + return true; + } + + public float getCollisionBorderSize() + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public float getBrightness(float par1) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float par1) + { + return 15728880; + } + +} + diff --git a/common/MysticWorld/Entity/EntityHandler.java b/common/MysticWorld/Entity/EntityHandler.java new file mode 100644 index 0000000..2a8af25 --- /dev/null +++ b/common/MysticWorld/Entity/EntityHandler.java @@ -0,0 +1,30 @@ +package MysticWorld.Entity; + +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.BiomeDictionary; +import cpw.mods.fml.common.registry.EntityRegistry; +import MysticWorld.MysticWorld; +import MysticWorld.Lib.EntityIds; +import MysticWorld.Lib.Strings; + +public class EntityHandler { + + public static void init(){ + registerEntities(); + } + + public static void registerEntities(){ + EntityRegistry.registerModEntity(EntityChargeAir.class, Strings.ENTITY_AIR_CHARGE_NAME, EntityIds.ENTITY_AIR_CHARGE, MysticWorld.instance, 80, 3, false); + EntityRegistry.registerModEntity(EntityChargeFire.class, Strings.ENTITY_FIREBALL_NAME, EntityIds.ENTITY_FIREBALL, MysticWorld.instance, 80, 3, false); + EntityRegistry.registerModEntity(EntityChargeEarth.class, Strings.ENTITY_EARTH_CHARGE_NAME, EntityIds.ENTITY_EARTH_CHARGE, MysticWorld.instance, 80, 3, false); + EntityRegistry.registerModEntity(EntityChargeEnergy.class, Strings.ENTITY_ENERGY_CHARGE_NAME, EntityIds.ENTITY_ENERGY_CHARGE, MysticWorld.instance, 80, 3, false); + EntityRegistry.registerModEntity(EntityChargeWater.class, Strings.ENTITY_WATER_CHARGE_NAME, EntityIds.ENTITY_WATER_CHARGE, MysticWorld.instance, 80, 3, false); + + EntityRegistry.registerModEntity(EntityPigman.class, Strings.ENTITY_PIGMAN_NAME, EntityIds.ENTITY_PIGMAN, MysticWorld.instance, 80, 3, false); + + BiomeGenBase[] overworldbiomes = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS.DESERT.MAGICAL.MOUNTAIN.FOREST.HILLS); + + EntityRegistry.addSpawn(EntityPigman.class, 10, 2, 12, EnumCreatureType.creature, overworldbiomes); + } +} diff --git a/common/MysticWorld/Entity/EntityPigman.java b/common/MysticWorld/Entity/EntityPigman.java new file mode 100644 index 0000000..e25bb7d --- /dev/null +++ b/common/MysticWorld/Entity/EntityPigman.java @@ -0,0 +1,133 @@ +package MysticWorld.Entity; + +import net.minecraft.entity.EntityAgeable; +import net.minecraft.entity.ai.EntityAIControlledByPlayer; +import net.minecraft.entity.ai.EntityAIFollowParent; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIMate; +import net.minecraft.entity.ai.EntityAIPanic; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAITempt; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.stats.AchievementList; +import net.minecraft.world.World; + +public class EntityPigman extends EntityAnimal +{ + public EntityPigman(World par1World) + { + super(par1World); + this.texture = "/mob/pigman.png"; + this.setSize(0.9F, 0.9F); + this.getNavigator().setAvoidsWater(true); + float f = 0.25F; + this.tasks.addTask(0, new EntityAISwimming(this)); + this.tasks.addTask(1, new EntityAIPanic(this, 0.38F)); + this.tasks.addTask(3, new EntityAIMate(this, f)); + this.tasks.addTask(4, new EntityAITempt(this, 0.3F, Item.carrot.itemID, false)); + this.tasks.addTask(5, new EntityAIFollowParent(this, 0.28F)); + this.tasks.addTask(6, new EntityAIWander(this, f)); + this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + this.tasks.addTask(8, new EntityAILookIdle(this)); + } + + + public boolean isAIEnabled() + { + return true; + } + + public int getMaxHealth() + { + return 20; + } + + protected void updateAITasks() + { + super.updateAITasks(); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + protected String getLivingSound() + { + return "mob.pig.say"; + } + + protected String getHurtSound() + { + return "mob.pig.say"; + } + + protected String getDeathSound() + { + return "mob.pig.death"; + } + + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.pig.step", 0.15F, 1.0F); + } + + protected int getDropItemId() + { + return this.isBurning() ? Item.porkCooked.itemID : Item.porkRaw.itemID; + } + + protected void dropFewItems(boolean par1, int par2) + { + int j = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + par2); + + for (int k = 0; k < j; ++k) + { + if (this.isBurning()) + { + this.dropItem(Item.porkCooked.itemID, 1); + } + else + { + this.dropItem(Item.porkRaw.itemID, 1); + } + } + + + } + + public void onStruckByLightning(EntityLightningBolt par1EntityLightningBolt) + { + if (!this.worldObj.isRemote) + { + EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj); + entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.worldObj.spawnEntityInWorld(entitypigzombie); + this.setDead(); + } + } + + public EntityPigman spawnBabyAnimal(EntityAgeable par1EntityAgeable) + { + return new EntityPigman(this.worldObj); + } + + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return par1ItemStack != null && par1ItemStack.itemID == Item.carrot.itemID; + } + + public EntityAgeable createChild(EntityAgeable par1EntityAgeable) + { + return this.spawnBabyAnimal(par1EntityAgeable); + } +} diff --git a/common/MysticWorld/Items/EnumArmor.java b/common/MysticWorld/Items/EnumArmor.java new file mode 100644 index 0000000..3a92ceb --- /dev/null +++ b/common/MysticWorld/Items/EnumArmor.java @@ -0,0 +1,12 @@ +package MysticWorld.Items; + +import net.minecraft.item.EnumArmorMaterial; +import net.minecraftforge.common.EnumHelper; + +public class EnumArmor +{ + static EnumArmorMaterial Verdite = EnumHelper.addArmorMaterial("Verdite", 262, new int[]{2, 5, 4, 1}, 5); + static EnumArmorMaterial Mithril = EnumHelper.addArmorMaterial("Mithril", 500, new int[]{2, 7, 6, 2}, 9); + static EnumArmorMaterial Adamantine = EnumHelper.addArmorMaterial("Adamantine", 3000, new int[]{4, 9, 6, 4}, 13); + static EnumArmorMaterial Iridium = EnumHelper.addArmorMaterial("Iridium", 4000, new int[]{4, 10, 7, 5}, 15); +} diff --git a/common/MysticWorld/Items/ItemAdamantineArmor.java b/common/MysticWorld/Items/ItemAdamantineArmor.java new file mode 100644 index 0000000..2fb9f39 --- /dev/null +++ b/common/MysticWorld/Items/ItemAdamantineArmor.java @@ -0,0 +1,58 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.IArmorTextureProvider; + +public class ItemAdamantineArmor extends ItemArmor implements IArmorTextureProvider +{ + int ArmorType; + + String ArmorFile_1; + String ArmorFile_2; + + public ItemAdamantineArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { + + super(par1, par2EnumArmorMaterial,par3,par4); + this.ArmorType=par4; + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/mods/MysticTextures/textures/armor/adamantine_1.png"; + this.ArmorFile_2 = "/mods/MysticTextures/textures/armor/adamantine_2.png"; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + switch (ArmorType){ + case 0: + itemIcon = iconRegister.registerIcon("MysticTextures:item.helmetAdamantine"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticTextures:item.chestplateAdamantine"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticTextures:item.leggingsAdamantine"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticTextures:item.bootsAdamantine"); + break; + } + } + + public String getArmorTextureFile(ItemStack par1){ + if(par1.itemID == ItemHandler$1.adamantineHelmet.itemID||par1.itemID == ItemHandler$1.adamantineChestplate.itemID||par1.itemID == ItemHandler$1.adamantineBoots.itemID) + { + return ArmorFile_1; + } + if(par1.itemID == ItemHandler$1.adamantineLeggings.itemID) + { + return ArmorFile_2; + } + return ArmorFile_2; + + } +} diff --git a/common/MysticWorld/Items/ItemBushFruit.java b/common/MysticWorld/Items/ItemBushFruit.java new file mode 100644 index 0000000..ec7c90b --- /dev/null +++ b/common/MysticWorld/Items/ItemBushFruit.java @@ -0,0 +1,179 @@ +package MysticWorld.Items; + +import java.util.List; + +import MysticWorld.MysticWorld; +import MysticWorld.Reference; +import MysticWorld.Lib.Strings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class ItemBushFruit extends ItemFood { + + private Icon[] icons; + + private static final String[] FRUIT_TYPES = new String[] {"Mundane", "Poison", "Weakness", "Slowness", "Harming", "Wither", "Health", "Speed", "Fire Resistance", "Regen", "Night Vision", "Invisibility"}; + + + public ItemBushFruit(int id, int health) + { + super(id, health, 0.6F, false); + this.setHasSubtypes(true); + this.setUnlocalizedName(Strings.BUSH_FRUIT_NAME); + this.setCreativeTab(MysticWorld.MysticWorldTab); + maxStackSize = 64; + setAlwaysEdible(); + } + + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player) + { + if ((player.canEat(true)) && (player.getFoodStats().getSaturationLevel() < 20.0F)) + { + player.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack)); + } + + return par1ItemStack; + } + + protected void onFoodEaten(ItemStack itemstack, World world, EntityPlayer player) + { + if (!world.isRemote) + { + int duration = 0; + PotionEffect potion; + switch(itemstack.getItemDamage()) + { + case 1:potion = player.getActivePotionEffect(Potion.poison); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.poison.id, duration + 160, 0)); + break; + case 2:potion = player.getActivePotionEffect(Potion.weakness); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.weakness.id, duration + 160, 0)); + break; + case 3:potion = player.getActivePotionEffect(Potion.moveSlowdown); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration + 160, 0)); + break; + case 4:potion = player.getActivePotionEffect(Potion.harm); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.harm.id, duration + 1, 0)); + break; + case 5:potion = player.getActivePotionEffect(Potion.wither); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.wither.id, duration + 160, 0)); + break; + case 6:potion = player.getActivePotionEffect(Potion.heal); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.heal.id, duration + 1, 0)); + break; + case 7:potion = player.getActivePotionEffect(Potion.moveSpeed); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, duration + 160, 0)); + break; + case 8:potion = player.getActivePotionEffect(Potion.fireResistance); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, duration + 160, 0)); + break; + case 9:potion = player.getActivePotionEffect(Potion.regeneration); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, duration + 160, 0)); + break; + case 10:potion = player.getActivePotionEffect(Potion.nightVision); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, duration + 160, 0)); + break; + case 11:potion = player.getActivePotionEffect(Potion.invisibility); + if(potion != null) + { + duration = potion.duration; + } + player.addPotionEffect(new PotionEffect(Potion.invisibility.id, duration + 160, 0)); + break; + } + } + } + + public int getMaxItemUseDuration(ItemStack itemstack) + { + return 24; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + FRUIT_TYPES[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + icons = new Icon[FRUIT_TYPES.length]; + + for (int i = 0; i < FRUIT_TYPES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticTextures" + ":" + "item.fruit_" + i); + } + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + + int j = MathHelper.clamp_int(meta, 0, FRUIT_TYPES.length); + return icons[j]; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) + { + for (int var4 = 0; var4 < FRUIT_TYPES.length; var4++) + { + par3List.add(new ItemStack(par1, 1, var4)); + } + } +} + diff --git a/common/MysticWorld/Items/ItemHandler$1.java b/common/MysticWorld/Items/ItemHandler$1.java new file mode 100644 index 0000000..3fdcb15 --- /dev/null +++ b/common/MysticWorld/Items/ItemHandler$1.java @@ -0,0 +1,96 @@ +package MysticWorld.Items; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import MysticWorld.MysticWorld; +import MysticWorld.Blocks.BlockHandler; +import MysticWorld.Lib.ItemIds; +import MysticWorld.Lib.Strings; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.EnumHelper; +import net.minecraftforge.liquids.LiquidDictionary; +import net.minecraftforge.liquids.LiquidStack; + +public class ItemHandler$1 { + + public static Item verditeHelmet; + public static Item verditeChestplate; + public static Item verditeLeggings; + public static Item verditeBoots; + + public static Item adamantineHelmet; + public static Item adamantineChestplate; + public static Item adamantineLeggings; + public static Item adamantineBoots; + + public static Item mithrilHelmet; + public static Item mithrilChestplate; + public static Item mithrilLeggings; + public static Item mithrilBoots; + + public static Item iridiumHelmet; + public static Item iridiumChestplate; + public static Item iridiumLeggings; + public static Item iridiumBoots; + + public static Item staffParts; + + public static Item imbuedShard; + + public static Item fireStaff; + public static Item waterStaff; + public static Item earthStaff; + public static Item airStaff; + public static Item energyStaff; + + public static Item fireStaffPower; + public static Item waterStaffPower; + public static Item earthStaffPower; + public static Item airStaffPower; + public static Item energyStaffPower; + + public static Item ItemStaffPower; + + public static Item bushFruit; + + public static void init(){ + + staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS).setUnlocalizedName(Strings.STAFF_NAME); + + imbuedShard = new ItemImbuedShard(ItemIds.IMBUED_SHARD).setUnlocalizedName(Strings.IMBUED_SHARD_NAME); + + fireStaff = new ItemStaffFire(ItemIds.FIRE_STAFF).setUnlocalizedName(Strings.FIRE_STAFF_NAME); + waterStaff = new ItemStaffWater(ItemIds.WATER_STAFF).setUnlocalizedName(Strings.WATER_STAFF_NAME); + earthStaff = new ItemStaffEarth(ItemIds.EARTH_STAFF).setUnlocalizedName(Strings.EARTH_STAFF_NAME); + airStaff = new ItemStaffAir(ItemIds.AIR_STAFF).setUnlocalizedName(Strings.AIR_STAFF_NAME); + energyStaff = new ItemStaffEnegy(ItemIds.ENERGY_STAFF).setUnlocalizedName(Strings.ENERGY_STAFF_NAME); + + ItemStaffPower = new ItemStaffPower(ItemIds.STAFF_POWER); + + bushFruit = new ItemBushFruit(ItemIds.BUSH_FRUIT, 2).setUnlocalizedName(Strings.BUSH_FRUIT_NAME); + + verditeHelmet = new ItemVerditeArmor(ItemIds.VERDITE_HELMET, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 0).setUnlocalizedName(Strings.VERDITE_HELMET_NAME); + verditeChestplate = new ItemVerditeArmor(ItemIds.VERDITE_CHESTPLATE, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 1).setUnlocalizedName(Strings.VERDITE_CHESTPLATE_NAME); + verditeLeggings = new ItemVerditeArmor(ItemIds.VERDITE_LEGGINGS, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 2).setUnlocalizedName(Strings.VERDITE_LEGGINGS_NAME); + verditeBoots = new ItemVerditeArmor(ItemIds.VERDITE_BOOTS, EnumArmor.Verdite, MysticWorld.proxy.addArmor(EnumArmor.Verdite.name()), 3).setUnlocalizedName(Strings.VERDITE_BOOTS_NAME); + + mithrilHelmet = new ItemMithrilArmor(ItemIds.MITHRIL_HELMET, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 0).setUnlocalizedName(Strings.MITHRIL_HELMET_NAME); + mithrilChestplate = new ItemMithrilArmor(ItemIds.MITHRIL_CHESTPLATE, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 1).setUnlocalizedName(Strings.MITHRIL_CHESTPLATE_NAME); + mithrilLeggings = new ItemMithrilArmor(ItemIds.MITHRIL_LEGGINGS, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 2).setUnlocalizedName(Strings.MITHRIL_LEGGINGS_NAME); + mithrilBoots = new ItemMithrilArmor(ItemIds.MITHRIL_BOOTS, EnumArmor.Mithril, MysticWorld.proxy.addArmor(EnumArmor.Mithril.name()), 3).setUnlocalizedName(Strings.MITHRIL_BOOTS_NAME); + + adamantineHelmet = new ItemAdamantineArmor(ItemIds.ADAMANTINE_HELMET, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 0).setUnlocalizedName(Strings.ADAMANTINE_HELMET_NAME); + adamantineChestplate = new ItemAdamantineArmor(ItemIds.ADAMANTINE_CHESTPLATE, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 1).setUnlocalizedName(Strings.ADAMANTINE_CHESTPLATE_NAME); + adamantineLeggings = new ItemAdamantineArmor(ItemIds.ADAMANTINE_LEGGINGS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 2).setUnlocalizedName(Strings.ADAMANTINE_LEGGINGS_NAME); + adamantineBoots = new ItemAdamantineArmor(ItemIds.ADAMANTINE_BOOTS, EnumArmor.Adamantine, MysticWorld.proxy.addArmor(EnumArmor.Adamantine.name()), 3).setUnlocalizedName(Strings.ADAMANTINE_BOOTS_NAME); + + iridiumHelmet = new ItemIridiumArmor(ItemIds.IRIDIUM_HELMET, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 0).setUnlocalizedName(Strings.IRIDIUM_HELMET_NAME); + iridiumChestplate = new ItemIridiumArmor(ItemIds.IRIDIUM_CHESTPLATE, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 1).setUnlocalizedName(Strings.IRIDIUM_CHESTPLATE_NAME); + iridiumLeggings = new ItemIridiumArmor(ItemIds.IRIDIUM_LEGGINGS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 2).setUnlocalizedName(Strings.IRIDIUM_LEGGINGS_NAME); + iridiumBoots = new ItemIridiumArmor(ItemIds.IRIDIUM_BOOTS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 3).setUnlocalizedName(Strings.IRIDIUM_BOOTS_NAME); + } +} diff --git a/common/MysticWorld/Items/ItemImbuedShard.java b/common/MysticWorld/Items/ItemImbuedShard.java new file mode 100644 index 0000000..016a830 --- /dev/null +++ b/common/MysticWorld/Items/ItemImbuedShard.java @@ -0,0 +1,62 @@ +package MysticWorld.Items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import MysticWorld.MysticWorld; +import MysticWorld.Lib.Strings; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemImbuedShard extends ItemMysticWorld { + + private Icon[] icons; + + private static final String[] SHARD_TYPES = new String[] {"Fire", "Water", "Earth", "Air", "Energy"}; + + public ItemImbuedShard(int id) { + super(id); + this.setHasSubtypes(true); + this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + SHARD_TYPES[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[SHARD_TYPES.length]; + + for (int i = 0; i < SHARD_TYPES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticTextures" + ":" + "item.shard_" + i); + } + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, 5); + return icons[j]; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int var4 = 0; var4 < SHARD_TYPES.length; var4++){ + par3List.add(new ItemStack(par1, 1, var4)); + } + } + +} diff --git a/common/MysticWorld/Items/ItemIridiumArmor.java b/common/MysticWorld/Items/ItemIridiumArmor.java new file mode 100644 index 0000000..0a1407a --- /dev/null +++ b/common/MysticWorld/Items/ItemIridiumArmor.java @@ -0,0 +1,104 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import net.minecraftforge.common.IArmorTextureProvider; + +public class ItemIridiumArmor extends ItemArmor implements IArmorTextureProvider +{ + int ArmorType; + + String ArmorFile_1; + String ArmorFile_2; + + public ItemIridiumArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { + + super(par1, par2EnumArmorMaterial,par3,par4); + this.ArmorType=par4; + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/mods/MysticTextures/textures/armor/iridium_1.png"; + this.ArmorFile_2 = "/mods/MysticTextures/textures/armor/iridium_2.png"; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + switch (ArmorType){ + case 0: + itemIcon = iconRegister.registerIcon("MysticTextures:item.helmetIridium"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticTextures:item.chestplateIridium"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticTextures:item.leggingsIridium"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticTextures:item.bootsIridium"); + break; + } + } + + public String getArmorTextureFile(ItemStack par1){ + if(par1.itemID == ItemHandler$1.iridiumHelmet.itemID||par1.itemID == ItemHandler$1.iridiumChestplate.itemID||par1.itemID == ItemHandler$1.iridiumBoots.itemID) + { + return ArmorFile_1; + } + if(par1.itemID == ItemHandler$1.iridiumLeggings.itemID) + { + return ArmorFile_2; + } + return ArmorFile_2; + } + + @Override + public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) + { + ItemStack helmet = player.getCurrentItemOrArmor(4); + ItemStack plate = player.getCurrentItemOrArmor(3); + ItemStack legs = player.getCurrentItemOrArmor(2); + ItemStack boots = player.getCurrentItemOrArmor(1); + if (helmet != null) + { + if(helmet.itemID == ItemHandler$1.iridiumHelmet.itemID) + { + player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0))); + } + } + + if (plate != null) + { + if(plate.itemID == ItemHandler$1.iridiumChestplate.itemID) + { + player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0))); + } + } + + if (legs != null) + { + if(legs.itemID == ItemHandler$1.iridiumLeggings.itemID) + { + player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2))); + player.addVelocity(0.0005, 0, 0.0005); + player.stepHeight = 1.001F; + } + } + + if (boots != null) + { + if(boots.itemID == ItemHandler$1.iridiumBoots.itemID) + { + player.fallDistance = 0.0F; + player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 200, 2))); + } + } + } +} \ No newline at end of file diff --git a/common/MysticWorld/Items/ItemMithrilArmor.java b/common/MysticWorld/Items/ItemMithrilArmor.java new file mode 100644 index 0000000..08a68de --- /dev/null +++ b/common/MysticWorld/Items/ItemMithrilArmor.java @@ -0,0 +1,57 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.IArmorTextureProvider; + +public class ItemMithrilArmor extends ItemArmor implements IArmorTextureProvider +{ + int ArmorType; + + String ArmorFile_1; + String ArmorFile_2; + + public ItemMithrilArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { + + super(par1, par2EnumArmorMaterial,par3,par4); + this.ArmorType=par4; + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/mods/MysticTextures/textures/armor/mithril_1.png"; + this.ArmorFile_2 = "/mods/MysticTextures/textures/armor/mithril_2.png"; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + switch (ArmorType){ + case 0: + itemIcon = iconRegister.registerIcon("MysticTextures:item.helmetMithril"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticTextures:item.chestplateMithril"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticTextures:item.leggingsMithril"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticTextures:item.bootsMithril"); + break; + } + } + + public String getArmorTextureFile(ItemStack par1){ + if(par1.itemID == ItemHandler$1.mithrilHelmet.itemID||par1.itemID == ItemHandler$1.mithrilChestplate.itemID||par1.itemID == ItemHandler$1.mithrilBoots.itemID) + { + return ArmorFile_1; + } + if(par1.itemID == ItemHandler$1.mithrilLeggings.itemID) + { + return ArmorFile_2; + } + return ArmorFile_2; + } +} diff --git a/common/MysticWorld/Items/ItemMysticWorld.java b/common/MysticWorld/Items/ItemMysticWorld.java new file mode 100644 index 0000000..deb290a --- /dev/null +++ b/common/MysticWorld/Items/ItemMysticWorld.java @@ -0,0 +1,25 @@ +package MysticWorld.Items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemMysticWorld extends Item +{ + public ItemMysticWorld(int i) + { + super(i); + maxStackSize = 64; + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + this.getUnlocalizedName()); + } +} \ No newline at end of file diff --git a/common/MysticWorld/Items/ItemStaffAir.java b/common/MysticWorld/Items/ItemStaffAir.java new file mode 100644 index 0000000..2df5501 --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffAir.java @@ -0,0 +1,40 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import MysticWorld.Entity.EntityChargeAir; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemStaffAir extends Item { + + public ItemStaffAir(int id) { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(64); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + "item.AirStaff"); + } + + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeAir(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; + } +} diff --git a/common/MysticWorld/Items/ItemStaffEarth.java b/common/MysticWorld/Items/ItemStaffEarth.java new file mode 100644 index 0000000..1186a79 --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffEarth.java @@ -0,0 +1,46 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import MysticWorld.Entity.EntityChargeEarth; +import MysticWorld.Entity.EntityChargeFire; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.entity.player.UseHoeEvent; + +public class ItemStaffEarth extends Item { + + public ItemStaffEarth(int id) { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(64); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + "item.EarthStaff"); + } + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; + } +} diff --git a/common/MysticWorld/Items/ItemStaffEnegy.java b/common/MysticWorld/Items/ItemStaffEnegy.java new file mode 100644 index 0000000..91e9ce2 --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffEnegy.java @@ -0,0 +1,41 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import MysticWorld.Entity.EntityChargeEnergy; +import MysticWorld.Entity.EntityChargeFire; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemStaffEnegy extends Item{ + + public ItemStaffEnegy(int id) { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(64); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + "item.EnergyStaff"); + } + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; + } + +} diff --git a/common/MysticWorld/Items/ItemStaffFire.java b/common/MysticWorld/Items/ItemStaffFire.java new file mode 100644 index 0000000..27c261f --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffFire.java @@ -0,0 +1,41 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import MysticWorld.Entity.EntityChargeFire; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemStaffFire extends Item{ + + public ItemStaffFire(int id) { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(64); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + "item.FireStaff"); + } + + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; + } + +} diff --git a/common/MysticWorld/Items/ItemStaffParts.java b/common/MysticWorld/Items/ItemStaffParts.java new file mode 100644 index 0000000..2d8789a --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffParts.java @@ -0,0 +1,62 @@ +package MysticWorld.Items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import MysticWorld.MysticWorld; +import MysticWorld.Lib.Strings; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemStaffParts extends ItemMysticWorld { + + private Icon[] icons; + + private static final String[] STAFF_PARTS = new String[] {"Staff", "Hilt", "Handle", "Head"}; + + public ItemStaffParts(int id) { + super(id); + this.setHasSubtypes(true); + this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + STAFF_PARTS[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) { + icons = new Icon[STAFF_PARTS.length]; + + for (int i = 0; i < STAFF_PARTS.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticTextures" + ":" + "item.staff_" + i); + } + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + int j = MathHelper.clamp_int(meta, 0, STAFF_PARTS.length); + return icons[j]; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int var4 = 0; var4 < STAFF_PARTS.length; var4++){ + par3List.add(new ItemStack(par1, 1, var4)); + } + } + +} diff --git a/common/MysticWorld/Items/ItemStaffPower.java b/common/MysticWorld/Items/ItemStaffPower.java new file mode 100644 index 0000000..8e3d803 --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffPower.java @@ -0,0 +1,57 @@ +package MysticWorld.Items; + +import java.util.List; + +import MysticWorld.Reference; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; + +public class ItemStaffPower extends Item { + + private Icon[] icons; + + private static final String[] CHARGE_NAMES = new String[] { "Fire", "Water", "Earth", "Air", "Energy"}; + + public ItemStaffPower(int id) + { + super(id); + this.setHasSubtypes(true); + this.setUnlocalizedName("charge"); + this.setCreativeTab(null); + maxStackSize = 64; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) { + + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5); + return super.getUnlocalizedName() + CHARGE_NAMES[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + icons = new Icon[CHARGE_NAMES.length]; + + for (int i = 0; i < CHARGE_NAMES.length; ++i) { + icons[i] = iconRegister.registerIcon("MysticTextures" + ":" + "item.charge_" + i); + } + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIconFromDamage(int meta) { + + int j = MathHelper.clamp_int(meta, 0, 5); + return icons[j]; + } +} + diff --git a/common/MysticWorld/Items/ItemStaffWater.java b/common/MysticWorld/Items/ItemStaffWater.java new file mode 100644 index 0000000..ed3b61b --- /dev/null +++ b/common/MysticWorld/Items/ItemStaffWater.java @@ -0,0 +1,47 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import MysticWorld.Entity.EntityChargeEarth; +import MysticWorld.Entity.EntityChargeFire; +import MysticWorld.Entity.EntityChargeWater; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.entity.player.UseHoeEvent; + +public class ItemStaffWater extends Item { + + public ItemStaffWater(int id) { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(64); + this.setCreativeTab(MysticWorld.MysticWorldTab); + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("MysticTextures" + ":" + "item.WaterStaff"); + } + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer){ + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeWater(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; + } +} \ No newline at end of file diff --git a/common/MysticWorld/Items/ItemVerditeArmor.java b/common/MysticWorld/Items/ItemVerditeArmor.java new file mode 100644 index 0000000..326c38d --- /dev/null +++ b/common/MysticWorld/Items/ItemVerditeArmor.java @@ -0,0 +1,58 @@ +package MysticWorld.Items; + +import MysticWorld.MysticWorld; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.IArmorTextureProvider; + +public class ItemVerditeArmor extends ItemArmor implements IArmorTextureProvider +{ + int ArmorType; + + String ArmorFile_1; + String ArmorFile_2; + + public ItemVerditeArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { + + super(par1, par2EnumArmorMaterial,par3,par4); + this.ArmorType=par4; + this.setCreativeTab(MysticWorld.MysticWorldTab); + this.ArmorFile_1 = "/mods/MysticTextures/textures/armor/verdite_1.png"; + this.ArmorFile_2 = "/mods/MysticTextures/textures/armor/verdite_2.png"; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + switch (ArmorType){ + case 0: + itemIcon = iconRegister.registerIcon("MysticTextures:item.helmetVerdite"); + break; + case 1: + itemIcon = iconRegister.registerIcon("MysticTextures:item.chestplateVerdite"); + break; + case 2: + itemIcon = iconRegister.registerIcon("MysticTextures:item.leggingsVerdite"); + break; + case 3: + itemIcon = iconRegister.registerIcon("MysticTextures:item.bootsVerdite"); + break; + } + } + + public String getArmorTextureFile(ItemStack par1){ + if(par1.itemID == ItemHandler$1.verditeHelmet.itemID||par1.itemID == ItemHandler$1.verditeChestplate.itemID||par1.itemID == ItemHandler$1.verditeBoots.itemID) + { + return ArmorFile_1; + } + if(par1.itemID == ItemHandler$1.verditeLeggings.itemID) + { + return ArmorFile_2; + } + return ArmorFile_2; + + } +} diff --git a/common/MysticWorld/Lang.java b/common/MysticWorld/Lang.java new file mode 100644 index 0000000..616fe97 --- /dev/null +++ b/common/MysticWorld/Lang.java @@ -0,0 +1,79 @@ +package MysticWorld; + +import MysticWorld.Blocks.BlockHandler; +import MysticWorld.Items.ItemHandler$1; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.registry.LanguageRegistry; + +public class Lang +{ + public static void init() + { + //Creative Tab Name + LanguageRegistry.instance().addStringLocalization("itemGroup.MysticWorldTab", "en_US", "Mystic World!"); + + //Blocks + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.OreImbuedStone, 1, 0), "Charred Stone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.OreImbuedStone, 1, 1), "Moistened Stone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.OreImbuedStone, 1, 2), "Mossified Stone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.OreImbuedStone, 1, 3), "Oxygenated Stone"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.OreImbuedStone, 1, 4), "Energized Stone"); + + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 0), "Bush"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 1), "Poisonous Bush"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 2), "Bush of Weakness"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 3), "Bush of Slowness"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 4), "Bush of Harming"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 5), "Withering Bush"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 6), "Bush of Health"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 7), "Bush of Speed"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 8), "Bush of Flames"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 9), "Bush of Regen"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 10), "Bush of Vision"); + LanguageRegistry.instance().addName(new ItemStack(BlockHandler.bush, 1, 11), "Bush of Invisibility"); + + //Items + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.staffParts, 1, 0), "Staff"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.staffParts, 1, 1), "Staff Hilt"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.staffParts, 1, 2), "Staff Handle"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.staffParts, 1, 3), "Staff Topper"); + + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.imbuedShard, 1, 0), "Charred Shard"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.imbuedShard, 1, 1), "Moistened Shard"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.imbuedShard, 1, 2), "Mossified Shard"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.imbuedShard, 1, 3), "Oxygenated Shard"); + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.imbuedShard, 1, 4), "Energized Shard"); + + LanguageRegistry.instance().addName(ItemHandler$1.fireStaff, "Fire Staff"); + LanguageRegistry.instance().addName(ItemHandler$1.waterStaff, "Water Staff"); + LanguageRegistry.instance().addName(ItemHandler$1.earthStaff, "Earth Staff"); + LanguageRegistry.instance().addName(ItemHandler$1.airStaff, "Air Staff"); + LanguageRegistry.instance().addName(ItemHandler$1.energyStaff, "Energy Staff"); + + LanguageRegistry.instance().addName(ItemHandler$1.verditeHelmet, "Verdite Helmet"); + LanguageRegistry.instance().addName(ItemHandler$1.verditeChestplate, "Verdite Chestplate"); + LanguageRegistry.instance().addName(ItemHandler$1.verditeLeggings, "Verdite Leggings"); + LanguageRegistry.instance().addName(ItemHandler$1.verditeBoots, "Verdite Boots"); + + LanguageRegistry.instance().addName(ItemHandler$1.mithrilHelmet, "Mithril Helmet"); + LanguageRegistry.instance().addName(ItemHandler$1.mithrilChestplate, "Mithril Chestplate"); + LanguageRegistry.instance().addName(ItemHandler$1.mithrilLeggings, "Mithril Leggings"); + LanguageRegistry.instance().addName(ItemHandler$1.mithrilBoots, "Mithril Boots"); + + LanguageRegistry.instance().addName(ItemHandler$1.adamantineHelmet, "Adamantine Helmet"); + LanguageRegistry.instance().addName(ItemHandler$1.adamantineChestplate, "Adamantine Chestplate"); + LanguageRegistry.instance().addName(ItemHandler$1.adamantineLeggings, "Adamantine Leggings"); + LanguageRegistry.instance().addName(ItemHandler$1.adamantineBoots, "Adamantine Boots"); + + LanguageRegistry.instance().addName(ItemHandler$1.iridiumHelmet, "Iridium Helmet"); + LanguageRegistry.instance().addName(ItemHandler$1.iridiumChestplate, "Iridium Chestplate"); + LanguageRegistry.instance().addName(ItemHandler$1.iridiumLeggings, "Iridium Leggings"); + LanguageRegistry.instance().addName(ItemHandler$1.iridiumBoots, "Iridium Boots"); + + + for(int i=0;i<12;i++) + { + LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.bushFruit, 1, i), "Strange Fruit"); + } + } +} diff --git a/common/MysticWorld/Lib/BlockIds.java b/common/MysticWorld/Lib/BlockIds.java new file mode 100644 index 0000000..217d65e --- /dev/null +++ b/common/MysticWorld/Lib/BlockIds.java @@ -0,0 +1,37 @@ +package MysticWorld.Lib; + +public class BlockIds { + + //Default Block IDs + public static int ORE_STONE_1_DEFAULT = 600; + + public static int BUSH_DEFAULT = 601; + public static int POISON_BUSH_DEFAULT = 602; + public static int WEAKNESS_BUSH_DEFAULT = 603; + public static int SLOWNESS_BUSH_DEFAULT = 604; + public static int HARMING_BUSH_DEFAULT = 605; + public static int WITHER_BUSH_DEFAULT = 606; + public static int HEALTH_BUSH_DEFAULT = 607; + public static int SPEED_BUSH_DEFAULT = 608; + public static int FIRE_RESISTANCE_BUSH_DEFAULT = 609; + public static int REGEN_BUSH_DEFAULT = 610; + public static int NIGHT_VISION_BUSH_DEFAULT = 611; + public static int INVISIBILITY_BUSH_DEFAULT = 612; + + //Current Block IDs + public static int ORE_STONE_1; + + public static int BUSH; + public static int POISON_BUSH; + public static int WEAKNESS_BUSH; + public static int SLOWNESS_BUSH; + public static int HARMING_BUSH; + public static int WITHER_BUSH; + public static int HEALTH_BUSH; + public static int SPEED_BUSH; + public static int FIRE_RESISTANCE_BUSH; + public static int REGEN_BUSH; + public static int NIGHT_VISION_BUSH; + public static int INVISIBILITY_BUSH; + +} diff --git a/common/MysticWorld/Lib/EntityIds.java b/common/MysticWorld/Lib/EntityIds.java new file mode 100644 index 0000000..78b89ef --- /dev/null +++ b/common/MysticWorld/Lib/EntityIds.java @@ -0,0 +1,14 @@ +package MysticWorld.Lib; + +public class EntityIds { + + //Entity IDs + public static int ENTITY_AIR_CHARGE = 1; + public static int ENTITY_FIREBALL = 2; + public static int ENTITY_EARTH_CHARGE = 3; + public static int ENTITY_ENERGY_CHARGE = 4; + public static int ENTITY_WATER_CHARGE = 5; + + public static int ENTITY_PIGMAN = 6; + +} diff --git a/common/MysticWorld/Lib/ItemIds.java b/common/MysticWorld/Lib/ItemIds.java new file mode 100644 index 0000000..f942054 --- /dev/null +++ b/common/MysticWorld/Lib/ItemIds.java @@ -0,0 +1,68 @@ +package MysticWorld.Lib; + +public class ItemIds { + + //Default Item IDs + public static int STAFF_PARTS_DEFAULT = 5503; + + public static int IMBUED_SHARD_DEFAULT = 5504; + + public static int FIRE_STAFF_DEFAULT = 5505; + public static int WATER_STAFF_DEFAULT = 5506; + public static int EARTH_STAFF_DEFAULT = 5507; + public static int AIR_STAFF_DEFAULT = 5508; + public static int ENERGY_STAFF_DEFAULT = 5509; + public static int STAFF_POWER_DEFAULT = 5510; + + public static int BUSH_FRUIT_DEFAULT = 5511; + + public static int VERDITE_HELMET_DEFAULT = 5512; + public static int VERDITE_CHESTPLATE_DEFAULT = 5513; + public static int VERDITE_LEGGINGS_DEFAULT = 5514; + public static int VERDITE_BOOTS_DEFAULT = 5515; + public static int MITHRIL_HELMET_DEFAULT = 5516; + public static int MITHRIL_CHESTPLATE_DEFAULT = 5517; + public static int MITHRIL_LEGGINGS_DEFAULT = 5518; + public static int MITHRIL_BOOTS_DEFAULT = 5519; + public static int ADAMANTINE_HELMET_DEFAULT = 5520; + public static int ADAMANTINE_CHESTPLATE_DEFAULT = 5521; + public static int ADAMANTINE_LEGGINGS_DEFAULT = 5522; + public static int ADAMANTINE_BOOTS_DEFAULT = 5523; + public static int IRIDIUM_HELMET_DEFAULT = 5524; + public static int IRIDIUM_CHESTPLATE_DEFAULT = 5525; + public static int IRIDIUM_LEGGINGS_DEFAULT = 5526; + public static int IRIDIUM_BOOTS_DEFAULT = 5527; + + + //Current Item IDs + public static int STAFF_PARTS; + + public static int IMBUED_SHARD; + + public static int FIRE_STAFF; + public static int WATER_STAFF; + public static int EARTH_STAFF; + public static int AIR_STAFF; + public static int ENERGY_STAFF; + public static int STAFF_POWER; + + public static int BUSH_FRUIT; + + public static int VERDITE_HELMET; + public static int VERDITE_CHESTPLATE; + public static int VERDITE_LEGGINGS; + public static int VERDITE_BOOTS; + public static int MITHRIL_HELMET; + public static int MITHRIL_CHESTPLATE; + public static int MITHRIL_LEGGINGS; + public static int MITHRIL_BOOTS; + public static int ADAMANTINE_HELMET; + public static int ADAMANTINE_CHESTPLATE; + public static int ADAMANTINE_LEGGINGS; + public static int ADAMANTINE_BOOTS; + public static int IRIDIUM_HELMET; + public static int IRIDIUM_CHESTPLATE; + public static int IRIDIUM_LEGGINGS; + public static int IRIDIUM_BOOTS; + +} diff --git a/common/MysticWorld/Lib/Strings.java b/common/MysticWorld/Lib/Strings.java new file mode 100644 index 0000000..95a0380 --- /dev/null +++ b/common/MysticWorld/Lib/Strings.java @@ -0,0 +1,69 @@ +package MysticWorld.Lib; + +public class Strings { + + //Block Names + public static final String IMBUED_STONE_NAME = "imbuedStone"; + + public static final String BUSH_NAME = "bush"; + public static final String POISON_BUSH_NAME = "poisonBush"; + public static final String WEAKNESS_BUSH_NAME = "weaknessBush"; + public static final String SLOWNESS_BUSH_NAME = "slownessBush"; + public static final String HARMING_BUSH_NAME = "harmingBush"; + public static final String WITHER_BUSH_NAME = "witherBush"; + public static final String HEALTH_BUSH_NAME = "healthBush"; + public static final String SPEED_BUSH_NAME = "speedBush"; + public static final String FIRE_RESISTANCE_BUSH_NAME = "fireResistanceBush"; + public static final String REGEN_BUSH_NAME = "regenBush"; + public static final String NIGHT_VISION_BUSH_NAME = "nightVisionBush"; + public static final String INVISIBILITY_BUSH_NAME = "invisibilityBush"; + + //Item Names + public static final String STAFF_HILT_NAME = "staffHilt"; + public static final String STAFF_HANDLE_NAME = "staffHandle"; + public static final String STAFF_HEAD_NAME = "staffHead"; + public static final String STAFF_NAME = "staff"; + + public static final String IMBUED_SHARD_NAME = "imbuedShard"; + + public static final String FIRE_STAFF_NAME = "fireStaff"; + public static final String WATER_STAFF_NAME = "waterStaff"; + public static final String EARTH_STAFF_NAME = "earthStaff"; + public static final String AIR_STAFF_NAME = "airStaff"; + public static final String ENERGY_STAFF_NAME = "energyStaff"; + + public static final String BUSH_FRUIT_NAME = "bushFruit"; + public static final String POWER_STAFF_NAME = "staffPoweredItem"; + + public static final String VERDITE_HELMET_NAME = "verditeHelmet"; + public static final String VERDITE_CHESTPLATE_NAME = "verditeChestplate"; + public static final String VERDITE_LEGGINGS_NAME = "verditeLeggings"; + public static final String VERDITE_BOOTS_NAME = "verditeBoots"; + + public static final String MITHRIL_HELMET_NAME = "mithrilHelmet"; + public static final String MITHRIL_CHESTPLATE_NAME = "mithrilChestplate"; + public static final String MITHRIL_LEGGINGS_NAME = "mithrilLeggings"; + public static final String MITHRIL_BOOTS_NAME = "mithrilBoots"; + + public static final String ADAMANTINE_HELMET_NAME = "adamantineHelmet"; + public static final String ADAMANTINE_CHESTPLATE_NAME = "adamantineChestplate"; + public static final String ADAMANTINE_LEGGINGS_NAME = "adamantineLeggings"; + public static final String ADAMANTINE_BOOTS_NAME = "adamantineBoots"; + + public static final String IRIDIUM_HELMET_NAME = "iridiumHelmet"; + public static final String IRIDIUM_CHESTPLATE_NAME = "iridiumChestplate"; + public static final String IRIDIUM_LEGGINGS_NAME = "iridiumLeggings"; + public static final String IRIDIUM_BOOTS_NAME = "iridiumBoots"; + + //Entity Names + public static final String ENTITY_AIR_CHARGE_NAME = "entityAirCharge"; + public static final String ENTITY_FIREBALL_NAME = "entityFireball"; + public static final String ENTITY_EARTH_CHARGE_NAME = "entityEarthCharge"; + public static final String ENTITY_ENERGY_CHARGE_NAME = "entityEnergyCharge"; + public static final String ENTITY_WATER_CHARGE_NAME = "entityWaterCharge"; + + public static final String ENTITY_PIGMAN_NAME = "entityPigman"; + + //Config Category Names + public static final String ENTITY_CATEGORY = "entity"; +} diff --git a/common/MysticWorld/MysticWorld.java b/common/MysticWorld/MysticWorld.java new file mode 100644 index 0000000..c7181db --- /dev/null +++ b/common/MysticWorld/MysticWorld.java @@ -0,0 +1,82 @@ +package MysticWorld; + +import java.io.File; +import java.util.Random; + +import MysticWorld.Biome.BiomeHandler; +import MysticWorld.Blocks.BlockHandler; +import MysticWorld.Entity.EntityHandler; +import MysticWorld.Items.ItemHandler$1; +import MysticWorld.Lib.Strings; +import MysticWorld.WorldGen.*; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.DimensionManager; + +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.Init; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.Mod.PostInit; +import cpw.mods.fml.common.Mod.PreInit; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.TickRegistry; +import cpw.mods.fml.common.registry.VillagerRegistry; +import cpw.mods.fml.relauncher.Side; + +@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION_NUMBER) +@NetworkMod(clientSideRequired = true, serverSideRequired = false) + +public class MysticWorld +{ + @Instance(Reference.MOD_ID) + public static MysticWorld instance; + + @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) + public static CommonProxy proxy; + + private TickHandler tickHandler; + + public static CreativeTabs MysticWorldTab = new TabMysticWorld(CreativeTabs.getNextID(), "MysticWorldTab"); + + @PreInit + public void preInit(FMLPreInitializationEvent event) + { + Config.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic World.cfg")); + Config.save(); + BiomeHandler.init(); + instance = this; + } + + @Init + public void load(FMLInitializationEvent event) + { + proxy.registerRenders(); + + this.tickHandler = new TickHandler(); + + TickRegistry.registerTickHandler(this.tickHandler, Side.SERVER); + VillagerRegistry.instance().registerVillagerType(98943, "/mods/MysticTextures/textures/mob/MysticVillager.png"); + VillagerRegistry.instance().registerVillageTradeHandler(98943, new MysticVillagerTrades()); + VillagerRegistry.instance().registerVillageCreationHandler(new VillageHutHandler()); + BlockHandler.init(); + ItemHandler$1.init(); + EntityHandler.init(); + RecipeHandler.init(); + MysticHutUtil.addLoot(); + Lang.init(); + } + + @PostInit + public void postInit(FMLPostInitializationEvent event) + { + } +} diff --git a/common/MysticWorld/RecipeHandler.java b/common/MysticWorld/RecipeHandler.java new file mode 100644 index 0000000..bc10ed3 --- /dev/null +++ b/common/MysticWorld/RecipeHandler.java @@ -0,0 +1,122 @@ +package MysticWorld; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import MysticOres.Items.ItemHandler; +import MysticWorld.Blocks.BlockHandler; +import MysticWorld.Items.ItemHandler$1; +import cpw.mods.fml.common.registry.GameRegistry; + +public class RecipeHandler { + + public static void init(){ + itemRecipes(); + itemSmelting(); + } + + private static void itemRecipes(){ + + //Staff Hilt Recipe + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 1), new Object[] { + " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.diamond + }); + + //Staff Handle Recipe + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 2), new Object[] { + "#", "$", "S", '#', Item.goldNugget, '$', Item.stick, 'S', Item.dyePowder + }); + + //Staff Topper Recipe + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 3), new Object[] { + " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.netherStar + }); + + //Staff Recipe + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.staffParts, 1, 0), new Object[] { + " #", " X ", "Y ", '#', new ItemStack(ItemHandler$1.staffParts, 1, 3), 'X', new ItemStack(ItemHandler$1.staffParts, 1, 2), 'Y', new ItemStack(ItemHandler$1.staffParts, 1, 1) + }); + + staffRecipe(ItemHandler$1.fireStaff, new ItemStack(ItemHandler$1.imbuedShard, 1, 0)); + staffRecipe(ItemHandler$1.waterStaff, new ItemStack(ItemHandler$1.imbuedShard, 1, 1)); + staffRecipe(ItemHandler$1.earthStaff, new ItemStack(ItemHandler$1.imbuedShard, 1, 2)); + staffRecipe(ItemHandler$1.airStaff, new ItemStack(ItemHandler$1.imbuedShard, 1, 3)); + staffRecipe(ItemHandler$1.energyStaff, new ItemStack(ItemHandler$1.imbuedShard, 1, 4)); + + /*----------------------------------Verdite--------------------------------------*/ + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.verditeHelmet), new Object[] { + "###", "# #", '#', ItemHandler.VerditeIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.verditeChestplate), new Object[] { + "# #", "###", "###", '#', ItemHandler.VerditeIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.verditeLeggings), new Object[] { + "###", "# #", "# #", '#', ItemHandler.VerditeIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.verditeBoots), new Object[] { + "# #", "# #", '#', ItemHandler.VerditeIngot + }); + + /*----------------------------------Mithril--------------------------------------*/ + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.mithrilHelmet), new Object[] { + "###", "# #", '#', ItemHandler.MithrilIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.mithrilChestplate), new Object[] { + "# #", "###", "###", '#', ItemHandler.MithrilIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.mithrilLeggings), new Object[] { + "###", "# #", "# #", '#', ItemHandler.MithrilIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.mithrilBoots), new Object[] { + "# #", "# #", '#', ItemHandler.MithrilIngot + }); + + /*----------------------------------Adamantine--------------------------------------*/ + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.adamantineHelmet), new Object[] { + "###", "# #", '#', ItemHandler.AdamantineIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.adamantineChestplate), new Object[] { + "# #", "###", "###", '#', ItemHandler.AdamantineIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.adamantineLeggings), new Object[] { + "###", "# #", "# #", '#', ItemHandler.AdamantineIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.adamantineBoots), new Object[] { + "# #", "# #", '#', ItemHandler.AdamantineIngot + }); + + /*----------------------------------Iridium--------------------------------------*/ + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.iridiumHelmet), new Object[] { + "###", "# #", '#', ItemHandler.IridiumIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.iridiumChestplate), new Object[] { + "# #", "###", "###", '#', ItemHandler.IridiumIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.iridiumLeggings), new Object[] { + "###", "# #", "# #", '#', ItemHandler.IridiumIngot + }); + + GameRegistry.addRecipe(new ItemStack(ItemHandler$1.iridiumBoots), new Object[] { + "# #", "# #", '#', ItemHandler.IridiumIngot + }); + + } + + private static void itemSmelting(){ + + } + + private static void staffRecipe(Item outputItem, ItemStack inputBlock){ + GameRegistry.addShapelessRecipe(new ItemStack(outputItem, 1), inputBlock, new ItemStack(ItemHandler$1.staffParts, 1, 0)); + } +} diff --git a/common/MysticWorld/Reference.java b/common/MysticWorld/Reference.java new file mode 100644 index 0000000..b94beef --- /dev/null +++ b/common/MysticWorld/Reference.java @@ -0,0 +1,11 @@ +package MysticWorld; + +public class Reference { + + public static final String MOD_ID = "MysticWorld"; + public static final String MOD_NAME = "Mystic World"; + public static final String VERSION_NUMBER = "0.1a"; + public static final String SERVER_PROXY_CLASS = "MysticWorld.CommonProxy"; + public static final String CLIENT_PROXY_CLASS = "MysticWorld.Client.ClientProxy"; + +} \ No newline at end of file diff --git a/common/MysticWorld/Renderer/RenderStaffPower.java b/common/MysticWorld/Renderer/RenderStaffPower.java new file mode 100644 index 0000000..7c73a19 --- /dev/null +++ b/common/MysticWorld/Renderer/RenderStaffPower.java @@ -0,0 +1,80 @@ +package MysticWorld.Renderer; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import MysticWorld.Items.ItemHandler$1; +import MysticWorld.Items.ItemStaffPower; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.entity.projectile.EntityPotion; +import net.minecraft.item.Item; +import net.minecraft.item.ItemPotion; +import net.minecraft.potion.PotionHelper; +import net.minecraft.util.Icon; + +public class RenderStaffPower extends Render { + + private Item item; + private int meta = 0; + + public RenderStaffPower(int par1){ + this.item = ItemHandler$1.ItemStaffPower; + this.meta = par1; + } + + @Override + public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { + Icon icon = ItemHandler$1.ItemStaffPower.getIconFromDamage(this.meta); + + if (icon != null) + { + GL11.glPushMatrix(); + GL11.glTranslatef((float)d0, (float)d1, (float)d2); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(0.5F, 0.5F, 0.5F); + this.loadTexture("/gui/items.png"); + Tessellator tessellator = Tessellator.instance; + + if (icon == ItemPotion.func_94589_d("potion_splash")) + { + int i = PotionHelper.func_77915_a(((EntityPotion)entity).getPotionDamage(), false); + float f2 = (float)(i >> 16 & 255) / 255.0F; + float f3 = (float)(i >> 8 & 255) / 255.0F; + float f4 = (float)(i & 255) / 255.0F; + GL11.glColor3f(f2, f3, f4); + GL11.glPushMatrix(); + this.func_77026_a(tessellator, ItemPotion.func_94589_d("potion_contents")); + GL11.glPopMatrix(); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } + + this.func_77026_a(tessellator, icon); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + } + + private void func_77026_a(Tessellator par1Tessellator, Icon par2Icon) + { + float f = par2Icon.getMinU(); + float f1 = par2Icon.getMaxU(); + float f2 = par2Icon.getMinV(); + float f3 = par2Icon.getMaxV(); + float f4 = 1.0F; + float f5 = 0.5F; + float f6 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + par1Tessellator.startDrawingQuads(); + par1Tessellator.setNormal(0.0F, 1.0F, 0.0F); + par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3); + par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3); + par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2); + par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2); + par1Tessellator.draw(); + } + +} diff --git a/common/MysticWorld/TabMysticWorld.java b/common/MysticWorld/TabMysticWorld.java new file mode 100644 index 0000000..53724b1 --- /dev/null +++ b/common/MysticWorld/TabMysticWorld.java @@ -0,0 +1,19 @@ +package MysticWorld; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import MysticWorld.Items.ItemHandler$1; + +public class TabMysticWorld extends CreativeTabs { + + public TabMysticWorld(int par1, String par2Str) { + super(par1, par2Str); + } + + @Override + public ItemStack getIconItemStack() { + return new ItemStack(ItemHandler$1.earthStaff, 1); + } + +} \ No newline at end of file diff --git a/common/MysticWorld/TickHandler.java b/common/MysticWorld/TickHandler.java new file mode 100644 index 0000000..55feb4d --- /dev/null +++ b/common/MysticWorld/TickHandler.java @@ -0,0 +1,51 @@ +package MysticWorld; + +import java.util.EnumSet; +import java.util.List; + +import MysticWorld.Blocks.BlockBush; +import MysticWorld.Blocks.BlockHandler; +import MysticWorld.Items.ItemHandler$1; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityPotion; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import cpw.mods.fml.common.IScheduledTickHandler; +import cpw.mods.fml.common.TickType; + +public class TickHandler implements IScheduledTickHandler +{ + private EnumSet ticks; + + public TickHandler(){ + this.ticks = EnumSet.of(TickType.PLAYER); + } + + public void tickStart(EnumSet type, Object... tickData){ + EntityPlayer player = (EntityPlayer)tickData[0]; + World world = player.worldObj; + } + + public void tickEnd(EnumSet type, Object... tickData){ + EntityPlayer player = (EntityPlayer)tickData[0]; + World world = player.worldObj; + } + + public EnumSet ticks(){ + return this.ticks; + } + + public String getLabel(){ + return "mystic world tick"; + } + + public int nextTickSpacing(){ + return 10; + } +} \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/BushesGen.java b/common/MysticWorld/WorldGen/BushesGen.java new file mode 100644 index 0000000..7c532bd --- /dev/null +++ b/common/MysticWorld/WorldGen/BushesGen.java @@ -0,0 +1,28 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import MysticWorld.Blocks.BlockHandler; +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BushesGen extends WorldGenerator +{ + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + for (int l = 0; l < 20; ++l) + { + int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); + int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); + int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); + + if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.bush.canPlaceBlockAt(par1World, i1, j1, k1)) + { + par1World.setBlock(i1, j1, k1, BlockHandler.bush.blockID, par2Random.nextInt(12), 2); + } + } + + return true; + } +} diff --git a/common/MysticWorld/WorldGen/ComponentVillagerHut.java b/common/MysticWorld/WorldGen/ComponentVillagerHut.java new file mode 100644 index 0000000..8f1d7b5 --- /dev/null +++ b/common/MysticWorld/WorldGen/ComponentVillagerHut.java @@ -0,0 +1,116 @@ +package MysticWorld.WorldGen; + +import java.util.List; +import java.util.Random; + +import MysticOres.Blocks.BlockHandler; +import MysticStones.MysticStones; +import net.minecraft.block.Block; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraft.world.gen.structure.ComponentVillage; +import net.minecraft.world.gen.structure.ComponentVillageStartPiece; +import net.minecraft.world.gen.structure.StructureBoundingBox; +import net.minecraft.world.gen.structure.StructureComponent; + +public class ComponentVillagerHut extends ComponentVillage +{ + private int averageGroundLevel = -1; + + public ComponentVillagerHut(ComponentVillageStartPiece par1ComponentVillageStartPiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5) + { + super(par1ComponentVillageStartPiece, par2); + this.coordBaseMode = par5; + this.boundingBox = par4StructureBoundingBox; + } + public static ComponentVillagerHut buildComponent (ComponentVillageStartPiece villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5) + { + StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 7, 6, 7, p4); + return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentVillagerHut(villagePiece, p5, random, + structureboundingbox, p4) : null; + } + public boolean addComponentParts (World world, Random random, StructureBoundingBox sbb) + { + if (this.averageGroundLevel < 0) + { + this.averageGroundLevel = this.getAverageGroundLevel(world, sbb); + if (this.averageGroundLevel < 0) + { + return true; + } + this.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + 4, 0); + } + /*------------------------------------------------------------------Base------------------------------------------------------------------------*/ + this.fillWithMetadataBlocks(world, sbb, 0, 0, 0, 6, 0, 6, MysticStones.StoneBricks.blockID, 2, MysticStones.StoneBricks.blockID, 2, false); + this.fillWithBlocks(world, sbb, 0, 5, 0, 6, 5, 6, Block.cobblestoneWall.blockID, Block.cobblestoneWall.blockID, false); + this.fillWithMetadataBlocks(world, sbb, 1, 0, 1, 5, 0, 5, MysticStones.StoneBricks.blockID, 2, MysticStones.StoneBricks.blockID, 2, false); + this.fillWithMetadataBlocks(world, sbb, 2, 0, 2, 4, 0, 4, MysticStones.ReinforcedBricks.blockID, 4, MysticStones.ReinforcedBricks.blockID, 4, false); + /*------------------------------------------------------------------Edges-------------------------------------------------------------------------*/ + this.fillWithMetadataBlocks(world, sbb, 0, 1, 0, 0, 4, 0, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 0, 1, 6, 0, 4, 6, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 6, 1, 0, 6, 4, 0, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 6, 1, 6, 6, 4, 6, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + /*-------------------------------------------------------------------Walls------------------------------------------------------------------------*/ + this.fillWithMetadataBlocks(world, sbb, 0, 1, 1, 0, 1, 5, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 1, 1, 0, 5, 1, 0, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 6, 1, 1, 6, 1, 5, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 1, 1, 6, 5, 1, 6, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 0, 3, 1, 0, 3, 5, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 1, 3, 0, 5, 3, 0, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 6, 3, 1, 6, 3, 5, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 1, 3, 6, 5, 3, 6, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + this.fillWithMetadataBlocks(world, sbb, 0, 4, 1, 0, 4, 5, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 1, 4, 0, 5, 4, 0, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 6, 4, 1, 6, 4, 5, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithMetadataBlocks(world, sbb, 1, 4, 6, 5, 4, 6, Block.stoneBrick.blockID, 0, Block.stoneBrick.blockID, 0, false); + this.fillWithBlocks(world, sbb, 1, 1, 1, 5, 5, 5, 0, 0, false); + this.fillWithMetadataBlocks(world, sbb, 1, 4, 1, 5, 4, 5, MysticStones.Planks.blockID, 5, MysticStones.Planks.blockID, 5, false); + /*---------------------------------------------------------Glass and Door--------------------------------------------------------------------------*/ + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 1, 2, 0, sbb); + this.placeBlockAtCurrentPosition(world, MysticStones.Planks.blockID, 5, 2, 2, 0, sbb); + this.placeDoorAtCurrentPosition(world, sbb, random, 3, 1, 0, this.getMetadataWithOffset(Block.doorWood.blockID, 1)); + this.placeBlockAtCurrentPosition(world, MysticStones.Planks.blockID, 5, 4, 2, 0, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 5, 2, 0, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 1, 2, 6, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 2, 2, 6, sbb); + this.placeBlockAtCurrentPosition(world, MysticStones.Planks.blockID, 5, 3, 2, 6, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 4, 2, 6, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 5, 2, 6, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 0, 2, 1, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 0, 2, 2, sbb); + this.placeBlockAtCurrentPosition(world, MysticStones.Planks.blockID, 5, 0, 2, 3, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 0, 2, 4, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 0, 2, 5, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 6, 2, 1, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 6, 2, 2, sbb); + this.placeBlockAtCurrentPosition(world, MysticStones.Planks.blockID, 5, 6, 2, 3, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 6, 2, 4, sbb); + this.placeBlockAtCurrentPosition(world, BlockHandler.ReinforcedGlass.blockID, 0, 6, 2, 5, sbb); + /*-------------------------------------------------------------Ladders---------------------------------------------------------------------------*/ + int i = this.getMetadataWithOffset(Block.ladder.blockID, 3); + this.placeBlockAtCurrentPosition(world, Block.ladder.blockID, i, 3, 1, 5, sbb); + this.placeBlockAtCurrentPosition(world, Block.ladder.blockID, i, 3, 2, 5, sbb); + this.placeBlockAtCurrentPosition(world, Block.ladder.blockID, i, 3, 3, 5, sbb); + this.placeBlockAtCurrentPosition(world, Block.ladder.blockID, i, 3, 4, 5, sbb); + /*---------------------------------------------------------------Inside--------------------------------------------------------------------------*/ + this.placeBlockAtCurrentPosition(world, Block.furnaceIdle.blockID, 0, 1, 1, 1, sbb); + this.placeBlockAtCurrentPosition(world, Block.workbench.blockID, 0, 1, 1, 4, sbb); + this.placeBlockAtCurrentPosition(world, Block.anvil.blockID, 2, 1, 1, 5, sbb); + this.generateStructureChestContents(world, sbb, random, 4, 1, 5, MysticHutUtil.MysticHutChest.getItems(random), MysticHutUtil.MysticHutChest.getCount(random)); + + for (int l = 0; l < 6; ++l) + { + for (int i1 = 0; i1 < 9; ++i1) + { + this.clearCurrentPositionBlocksUpwards(world, i1, 9, l, sbb); + this.fillCurrentPositionBlocksDownwards(world, MysticStones.StoneBricks.blockID, 2, i1, -1, l, sbb); + } + } + this.spawnVillagers(world, sbb, 3, 1, 3, 1); + return true; + } + protected int getVillagerType (int par1) + { + return 98943; + } +} \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/MysticHutUtil.java b/common/MysticWorld/WorldGen/MysticHutUtil.java new file mode 100644 index 0000000..e7dd2af --- /dev/null +++ b/common/MysticWorld/WorldGen/MysticHutUtil.java @@ -0,0 +1,27 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import MysticOres.Items.ItemHandler; +import MysticWorld.Items.ItemHandler$1; + +public class MysticHutUtil +{ + public MysticHutUtil() + { + addLoot(); + } + + public static ChestGenHooks MysticHutChest; + + public static void addLoot() + { + MysticHutChest = new ChestGenHooks("MysticHutChest", new WeightedRandomChestContent[0], 3, 27); + MysticHutChest.addItem(new WeightedRandomChestContent(new ItemStack(ItemHandler.ObsidianRod, 1, 0), 1, 1, 1)); + MysticHutChest.addItem(new WeightedRandomChestContent(new ItemStack(ItemHandler.MysticPowder, 1, 0), 1, 1, 1)); + MysticHutChest.addItem(new WeightedRandomChestContent(new ItemStack(ItemHandler.IridiumNugget, 1, 0), 1, 1, 1)); + } +} diff --git a/common/MysticWorld/WorldGen/MysticVillagerTrades.java b/common/MysticWorld/WorldGen/MysticVillagerTrades.java new file mode 100644 index 0000000..8f66344 --- /dev/null +++ b/common/MysticWorld/WorldGen/MysticVillagerTrades.java @@ -0,0 +1,30 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import MysticWorld.*; +import MysticWorld.Items.ItemHandler$1; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; + +public class MysticVillagerTrades implements IVillageTradeHandler +{ + + @Override + public void manipulateTradesForVillager (EntityVillager villager, MerchantRecipeList recipeList, Random random) + { + if (villager.getProfession() == 98943) + { + recipeList.addToListWithCheck(new MerchantRecipe(new ItemStack(ItemHandler$1.imbuedShard, 19, 0), new ItemStack(Item.emerald, 1, 0))); + recipeList.addToListWithCheck(new MerchantRecipe(new ItemStack(ItemHandler$1.imbuedShard, 16, 1), new ItemStack(Item.emerald, 1, 0))); + recipeList.addToListWithCheck(new MerchantRecipe(new ItemStack(ItemHandler$1.imbuedShard, 17, 2), new ItemStack(Item.emerald, 1, 0))); + recipeList.addToListWithCheck(new MerchantRecipe(new ItemStack(ItemHandler$1.imbuedShard, 13, 3), new ItemStack(Item.emerald, 1, 0))); + recipeList.addToListWithCheck(new MerchantRecipe(new ItemStack(ItemHandler$1.imbuedShard, 11, 4), new ItemStack(Item.emerald, 1, 0))); + } + } + +} \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/StonesGen.java b/common/MysticWorld/WorldGen/StonesGen.java new file mode 100644 index 0000000..0afc0cc --- /dev/null +++ b/common/MysticWorld/WorldGen/StonesGen.java @@ -0,0 +1,28 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import MysticWorld.Blocks.BlockHandler; +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class StonesGen extends WorldGenerator +{ + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + for (int l = 0; l < 1; ++l) + { + int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); + int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); + int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); + + if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.OreImbuedStone.canPlaceBlockAt(par1World, i1, j1, k1)) + { + par1World.setBlock(i1, j1, k1, BlockHandler.OreImbuedStone.blockID, par2Random.nextInt(5), 2); + } + } + + return true; + } +} diff --git a/common/MysticWorld/WorldGen/VillageHutHandler.java b/common/MysticWorld/WorldGen/VillageHutHandler.java new file mode 100644 index 0000000..571d0db --- /dev/null +++ b/common/MysticWorld/WorldGen/VillageHutHandler.java @@ -0,0 +1,31 @@ +package MysticWorld.WorldGen; + +import java.util.List; +import java.util.Random; + +import net.minecraft.world.gen.structure.ComponentVillageStartPiece; +import net.minecraft.world.gen.structure.StructureVillagePieceWeight; +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler; + +public class VillageHutHandler implements IVillageCreationHandler +{ + + @Override + public StructureVillagePieceWeight getVillagePieceWeight (Random random, int i) + { + return new StructureVillagePieceWeight(ComponentVillagerHut.class, 30, i + random.nextInt(4)); + } + + @Override + public Class getComponentClass () + { + return ComponentVillagerHut.class; + } + + @Override + public Object buildComponent (StructureVillagePieceWeight villagePiece, ComponentVillageStartPiece startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5) + { + return ComponentVillagerHut.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5); + } + +} \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/WorldGenBushes.java b/common/MysticWorld/WorldGen/WorldGenBushes.java new file mode 100644 index 0000000..f4c2c12 --- /dev/null +++ b/common/MysticWorld/WorldGen/WorldGenBushes.java @@ -0,0 +1,31 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenBushes implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < 1; i++) + { + int Xcoord1 = blockX + random.nextInt(16) + 8; + int Ycoord1 = random.nextInt(11) + 60; + int Zcoord1 = blockZ + random.nextInt(16) + 8; + + (new BushesGen()).generate(world, random, Xcoord1, Ycoord1, Zcoord1); + } + } +} \ No newline at end of file diff --git a/common/MysticWorld/WorldGen/WorldGenStones.java b/common/MysticWorld/WorldGen/WorldGenStones.java new file mode 100644 index 0000000..96a01c2 --- /dev/null +++ b/common/MysticWorld/WorldGen/WorldGenStones.java @@ -0,0 +1,31 @@ +package MysticWorld.WorldGen; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import cpw.mods.fml.common.IWorldGenerator; + +public class WorldGenStones implements IWorldGenerator +{ + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch (world.provider.dimensionId) + { + case 0: generateSurface(world, random, chunkX*16, chunkZ*16); + } + } + + private void generateSurface(World world, Random random, int blockX, int blockZ) + { + for (int i = 0; i < 1; i++) + { + int Xcoord1 = blockX + random.nextInt(16) + 8; + int Ycoord1 = random.nextInt(11) + 60; + int Zcoord1 = blockZ + random.nextInt(16) + 8; + + (new StonesGen()).generate(world, random, Xcoord1, Ycoord1, Zcoord1); + } + } +} \ No newline at end of file diff --git a/common/thaumcraft/api/EnumTag.java b/common/thaumcraft/api/EnumTag.java new file mode 100644 index 0000000..6bb8018 --- /dev/null +++ b/common/thaumcraft/api/EnumTag.java @@ -0,0 +1,106 @@ +package thaumcraft.api; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +public enum EnumTag { + UNKNOWN (63,"Obscurus","Unknown, Obscured",1,false,0x282828), + + WIND (0,"Aura","Air, Wind, Breath, Movement",1,false,0xc0c0d7), + FIRE (6,"Ignis","Fire, Heat, Burn, Light",2,true,0xff5a01), + ROCK (11,"Saxum","Earth, Stone, Ground, Foundation",4,false,0x5c4842), + WATER (21,"Aqua","Water, Fluid, Cold",3,false,0x3cd4fc), + + PLANT (36,"Herba","Herb, Plant, Grass",4,false,0x01ac00), + BEAST (53,"Bestia","Animal, Beast",3,true,0x9f6409), + FLESH (54,"Corpus","Body, Flesh, Physique",3,false,0xee478d), + METAL (12,"Metallum","Metal, Mine, Ore",4,false,0xd8d8d8), + CRYSTAL (20,"Vitreus","Glass, Crystal, Gem, Transparent",1,false,0x80ffff), + SOUND (24,"Sonus","Sound, Noise, Din",3,false,0x10c9c0), + + EXCHANGE (14,"Permutatio","Exchange, Change, Barter",4,false,0x578357), + LIFE (26,"Victus","Life force, Food, Sustenance",3,false,0xde0005), + DEATH (27,"Mortuus","Death, Decay, Undead",6,true,0x404040), + SPIRIT (30,"Animus","Soul, Spirit",1,false,0xe0e0e0), + VOID (2,"Vacuos","Empty, Void, Insubstantial",1,true,0xc0c0d7), + VISION (3,"Visum","Sight, Vision, Appearance",3,false,0xd5d4ec), + KNOWLEDGE (4,"Cognitio","Learning, Knowledge, Inquiry",1,false,0x8080ee), + DESTRUCTION (7,"Fractus","Destruction, Fragmented, Shattered",2,true,0x506050), + POWER (9,"Potentia","Power, Energy, Strength",2,true,0xc0ffff), + MECHANISM (10,"Machina","Mechanism, Machine, Device",2,false,0x8080a0), + ARMOR (17,"Tutamen","Defense, Protection, Security",4,false,0x00c0c0), + WEAPON (18,"Telum","Arrow, Sword, Weapon",2,true,0xc05050), + TOOL (19,"Instrumentum","Instrument, Tool, Implement",4,false,0x4040ee), + POISON (29,"Venenum","Poison, Drug, Impure",3,true,0x89f000), + VALUABLE (31,"Carus","Expensive, Precious, Valuable",4,false,0xe6be44), + PURE (37,"Purus","Pure, Clean, Stainless",3,false,0xa5fffd), + MAGIC (40,"Praecantatio","Magic, Sorcery",5,false,0x9700c0), + TIME (41,"Tempus","Time, Moment, Season",5,false,0x9070e0), + CONTROL (48,"Imperito","Control, Command, Dominate",5,false,0x98994b), + DARK (49,"Tenebris","Dark, Night, Blindness",5,true,0x252525), + CRAFT (50,"Fabrico","Create, Construct, Work",2,false,0x809d80), + EVIL (56,"Malum","Evil, The Nether, Malice",5,true,0x700000), + FLUX (57,"Mutatio","Flux, Chaos",5,true,0xb80bb9), + ELDRITCH (58,"Alienis","Eldritch, The End, Strange, Alien",5,true,0x805080), + + + //TOREMOVE + TRAP (28,"Vinculum","Bind, Imprison, Trap",4,true,0x9a8080), + INSECT (55,"Bestiola","Spider, Web, Insects",3,false,0x808880), + MOTION (1,"Motus","Motion, Movement, Speed",1,false,0xcdccf4), + FLIGHT (5,"Volito","Flight, Leap",1,false,0xe7e7d7), + LIGHT (8,"Lux","Light, Brightness, Day",2,false,0xfff663), + CLOTH (15,"Pannus","Cloth, Fabric, Garment, Thread",3,false,0xeaeac2), + EARTH (16,"Solum","Earth, Soil, Ground, Foundation",4,false,0x713f2d), + WEATHER (22,"Aer","Weather, Mist, Climate",3,false,0xc0ffff), + COLD (23,"Gelum","Cold, Ice, Frost",3,true,0xe1ffff), + HEAL (25,"Sano","Heal, Repair, Make Sound",3,false, 0xff8184), + WOOD (32,"Lignum","Wood, Forest, Tree",4,false,0x058105), + FLOWER (33,"Flos","Flower, Bloom, Blossom",4,false,0xffff40), + FUNGUS (34,"Fungus","Mushroom, Toadstool, Fungi",4,false,0xf7e5c7), + CROP (35,"Messis","Crops, Harvest",4,false,0xe3ff80), + ; + + // Attributes + public final int id; + public final String name; + public final String meaning; + + /** + * rough categories for the aspect types. Mostly just used to determine the common aspect type in certain biomes. + */ + public final int element; //1-air, 2-fire, 3-water, 4-earth, 5-mystical, 6-dead/aggressive, 999-deprecated + + /** + * will wisps spawned from this fluxtype be aggressive? + */ + public final boolean aggro; + + public final int color; + + private EnumTag(int id, String name, String meaning, int element,boolean aggro, int color ) { + this.id = id; + this.name = name; + this.meaning = meaning; + this.element = element; + this.color = color; + this.aggro = aggro; + + } + + // Lookup + private static final Map lookup = new HashMap(); + + static { for(EnumTag s : EnumSet.allOf(EnumTag.class)) lookup.put(s.getId(), s); } + + public int getId() { return id; } + + public static EnumTag get(int id) { + if (lookup.get(id)==null||lookup.get(id).element==999) + return EnumTag.FLUX; + else + return lookup.get(id); + } + +} diff --git a/common/thaumcraft/api/IAspectSource.java b/common/thaumcraft/api/IAspectSource.java new file mode 100644 index 0000000..2936aba --- /dev/null +++ b/common/thaumcraft/api/IAspectSource.java @@ -0,0 +1,63 @@ +package thaumcraft.api; + + +/** + * @author Azanor + * + * This interface is implemented by tile entites (or possibly anything else) like jars, alembics and the + * crucible so that they can act as an essentia source for blocks like the infusion altar. + * + */ +public interface IAspectSource { + + /** + * This method is used to add a certain amount of an aspect to the tile entity. + * @param tag + * @param amount + * @return the amount of aspect left over that could not be added. + */ + public int addToSource(EnumTag tag, int amount); + + /** + * Removes a certain amount of a specific aspect from the tile entity + * @param tag + * @param amount + * @return true if that amount of aspect was available and was removed + */ + public boolean takeFromSource(EnumTag tag, int amount); + + /** + * removes a bunch of different aspects and amounts from the tile entity. + * @param ot the ObjectTags object that contains the aspects and their amounts. + * @return true if all the aspects and their amounts were available and successfully removed + */ + public boolean takeFromSource(ObjectTags ot); + + /** + * Checks if the tile entity contains the listed amount (or more) of the aspect + * @param tag + * @param amount + * @return + */ + public boolean doesSourceContainAmount(EnumTag tag,int amount); + + /** + * Checks if the tile entity contains all the listed aspects and their amounts + * @param ot the ObjectTags object that contains the aspects and their amounts. + * @return + */ + public boolean doesSourceContain(ObjectTags ot); + + /** + * Returns how much of the aspect this tile entity contains + * @param tag + * @return the amount of that aspect found + */ + public int sourceContains(EnumTag tag); + + /** + * Returns all the aspects and their amounts that this tile entity contains + * @return + */ + public ObjectTags getSourceTags(); +} diff --git a/common/thaumcraft/api/IVisDiscounter.java b/common/thaumcraft/api/IVisDiscounter.java new file mode 100644 index 0000000..737bcf7 --- /dev/null +++ b/common/thaumcraft/api/IVisDiscounter.java @@ -0,0 +1,15 @@ +package thaumcraft.api; + + + +/** + * @author Azanor + * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. + * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but + * individual items really shouldn't have a discount more than 5% + */ +public interface IVisDiscounter { + + int getVisDiscount(); + +} diff --git a/common/thaumcraft/api/IVisRepairable.java b/common/thaumcraft/api/IVisRepairable.java new file mode 100644 index 0000000..6606095 --- /dev/null +++ b/common/thaumcraft/api/IVisRepairable.java @@ -0,0 +1,27 @@ +package thaumcraft.api; + +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; + + +/** + * @author Azanor + * Items and tools with this interface can receive the Repair enchantment. + * Armor, weapons and tools are handled automatically. + * Usually 1 vis equals 1 point of durability every 2 seconds (1 second for repair II) + * Repair enchant values over II also grants a reduction in speed, but at a much + * reduced rate (about 2 ticks per rating over II) + * Some sample code:

+ * + * public void doRepair(ItemStack is, Entity e) {
+ * if (AuraManager.decreaseClosestAura(e.worldObj,e.posX, e.posY, e.posZ, 1)) {
+ * is.damageItem(-1,(EntityLiving) e);
+ * }
+ * }

+ *
+ */ +public interface IVisRepairable { + + void doRepair(ItemStack stack, Entity e); + +} diff --git a/common/thaumcraft/api/ItemApi.java b/common/thaumcraft/api/ItemApi.java new file mode 100644 index 0000000..cbb8b86 --- /dev/null +++ b/common/thaumcraft/api/ItemApi.java @@ -0,0 +1,58 @@ +package thaumcraft.api; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.FMLLog; + +/** + * @author Azanor + * + * This is used to gain access to the items in my mod. + * I only give some examples and it will probably still + * require a bit of work for you to get hold of everything you need. + * + */ +public class ItemApi { + + public static ItemStack getItem(String itemString, int meta) { + ItemStack item = null; + + try { + String itemClass = "thaumcraft.common.Config"; + Object obj = Class.forName(itemClass).getField(itemString).get(null); + if (obj instanceof Item) { + item = new ItemStack((Item) obj,1,meta); + } else if (obj instanceof Block) { + item = new ItemStack((Block) obj,1,meta); + } else if (obj instanceof ItemStack) { + item = (ItemStack) obj; + } + } catch (Exception ex) { + FMLLog.warning("[Thaumcraft] Could not retrieve item or block identified by: " + itemString); + } + + return item; + } + + /** + * + * Some examples + * + * Casting Wands: + * itemWandCastingApprentice, itemWandCastingAdept, itemWandCastingMage + * + * Elemental Wands: + * itemWandFire, itemWandLightning, itemWandFrost, itemWandTrade, itemWandExcavation, itemHellrod + * + * Resources: + * itemEssence, itemWispEssence, itemResource, itemShard, itemNugget, + * itemNuggetChicken, itemNuggetBeef, itemNuggetPork, itemTripleMeatTreat, + * blockWooden, blockMarker + * + * Research: + * itemResearchNotes, itemInkwell, itemThaumonomicon + * + */ + +} diff --git a/common/thaumcraft/api/ObjectTags.java b/common/thaumcraft/api/ObjectTags.java new file mode 100644 index 0000000..da7c8a7 --- /dev/null +++ b/common/thaumcraft/api/ObjectTags.java @@ -0,0 +1,171 @@ +package thaumcraft.api; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.item.ItemStack; + +public class ObjectTags implements Serializable { + + public Map tags = new HashMap();//aspects associated with this object + + + /** + * this creates a new aspect list with preloaded values based off the aspects of the given item. + * @param id the item/block id of an existing item + * @param meta the damage value of an existing item + */ + public ObjectTags(int id, int meta) { + ObjectTags temp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id,1,meta)); + if (temp!=null) + for (EnumTag tag:temp.getAspects()) { + add(tag,temp.getAmount(tag)); + } + } + + public ObjectTags() { + } + + /** + * @return the amount of different aspects in this collection + */ + public int size() { + return tags.size(); + } + + /** + * @return an array of all the aspects in this collection + */ + public EnumTag[] getAspects() { + EnumTag[] q = new EnumTag[1]; + return tags.keySet().toArray(q); + } + + /** + * @return an array of all the aspects in this collection sorted by name + */ + public EnumTag[] getAspectsSorted() { + EnumTag[] out = tags.keySet().toArray(new EnumTag[1]); + boolean change=false; + do { + change=false; + for(int a=0;a0) { + out[a] = e2; + out[a+1] = e1; + change = true; + break; + } + } + } while (change==true); + return out; + } + + /** + * @return an array of all the aspects in this collection sorted by name + */ + public EnumTag[] getAspectsSortedAmount() { + EnumTag[] out = tags.keySet().toArray(new EnumTag[1]); + boolean change=false; + do { + change=false; + for(int a=0;a0 && e2>0 && e2>e1) { + EnumTag ea = out[a]; + EnumTag eb = out[a+1]; + out[a] = eb; + out[a+1] = ea; + change = true; + break; + } + } + } while (change==true); + return out; + } + + /** + * @param key + * @return the amount associated with the given aspect in this collection + */ + public int getAmount(EnumTag key) { + return tags.get(key)==null?0:tags.get(key); + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * If reduced below 0 the aspect will be removed completely. + * @param key + * @param amount + * @return + */ + public boolean reduceAmount(EnumTag key, int amount) { + if (getAmount(key)>=amount) { + int am = getAmount(key)-amount; + if (am<=0) tags.remove(key); else + tags.put(key, am); + return true; + } + return false; + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * If reduced below 0 the aspect will be removed completely. + * If the aspect does not exist then a negative value will be added. + * Only used by aura internals for flux management. + * @param key + * @param amount + * @return + */ + public ObjectTags remove(EnumTag key, int amount) { + if (getAmount(key)>=amount) { + int am = getAmount(key)-amount; + if (am<=0) tags.remove(key); else + this.tags.put(key, am); + } else if (getAmount(key)==0) { + this.tags.put(key, -amount); + } + return this; + } + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then its value will be increased by the given amount. + * @param aspect + * @param amount + * @return + */ + public ObjectTags add(EnumTag aspect, int amount) { + if (this.tags.containsKey(aspect)) { + int oldamount = this.tags.get(aspect); + amount+=oldamount; + } + this.tags.put( aspect, amount ); + return this; + } + + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then only the highest of the old or new amount will be used. + * @param aspect + * @param amount + * @return + */ + public ObjectTags merge(EnumTag aspect, int amount) { + if (this.tags.containsKey(aspect)) { + int oldamount = this.tags.get(aspect); + if (amount portableHoleBlackList = new ArrayList(); + + + //RESEARCH///////////////////////////////////////// + public static Document researchDoc = null; + public static ArrayList apiResearchFiles = new ArrayList(); + public static ArrayList scanEventhandlers = new ArrayList(); + + /** + * Used to add your own xml files that the research system will check of recipes and descriptions of custom research + * @param resourceLoc The xml file. For example The default file used by TC is + * "/thaumcraft/resources/research.xml" + */ + public static void registerResearchXML(String resourceLoc) { + if (!apiResearchFiles.contains(resourceLoc)) apiResearchFiles.add(resourceLoc); + } + + public static void registerScanEventhandler(IScanEventHandler scanEventHandler) { + scanEventhandlers.add(scanEventHandler); + } + + //RECIPES///////////////////////////////////////// + private static ArrayList crucibleRecipes = new ArrayList(); + private static List craftingRecipes = new ArrayList(); + private static HashMap smeltingBonus = new HashMap(); + private static ArrayList smeltingBonusExlusion = new ArrayList(); + + /** + * This method is used to determine what bonus items are generated when the infernal furnace smelts items + * @param in The result (not input) of the smelting operation. e.g. new ItemStack(ingotGold) + * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + */ + public static void addSmeltingBonus(ItemStack in, ItemStack out) { + smeltingBonus.put( + Arrays.asList(in.itemID,in.getItemDamage()), + new ItemStack(out.itemID,0,out.getItemDamage())); + } + + /** + * Returns the bonus item produced from a smelting operation in the infernal furnace + * @param in The result of the smelting operation. e.g. new ItemStack(ingotGold) + * @return the The bonus item that can be produced + */ + public static ItemStack getSmeltingBonus(ItemStack in) { + return smeltingBonus.get(Arrays.asList(in.itemID,in.getItemDamage())); + } + + /** + * Excludes specific items from producing bonus items when they are smelted in the infernal furnace, even + * if their smelt result would normally produce a bonus item. + * @param in The item to be smelted that should never produce a bonus item (e.g. the various macerated dusts form IC2) + * Even though they produce gold, iron, etc. ingots, they should NOT produce bonus nuggets as well. + */ + public static void addSmeltingBonusExclusion(ItemStack in) { + smeltingBonusExlusion.add(Arrays.asList(in.itemID,in.getItemDamage())); + } + + /** + * Sees if an item is allowed to produce bonus items when smelted in the infernal furnace + * @param in The item you wish to check + * @return true or false + */ + public static boolean isSmeltingBonusExluded(ItemStack in) { + return smeltingBonusExlusion.contains(Arrays.asList(in.itemID,in.getItemDamage())); + } + + public static List getCraftingRecipes() { + return craftingRecipes; + } + + /** + * NOTE: + * All arcane and infusion crafting recipes are NBT sensitive. + * Simply add as much nbt data to the crafting ingredient itemstacks as you wish + * to match with the actual input items. For example this recipe will turn a warded + * jar filled with crystal essentia into a stack of diamonds: + * + * ItemStack is = new ItemStack(itemJarFilled); + * is.setTagInfo("tag", new NBTTagByte("tag", (byte) EnumTag.CRYSTAL.id)); + * is.setTagInfo("amount", new NBTTagByte("amount", (byte) 64)); + * ThaumcraftApi.addShapelessArcaneCraftingRecipe("THEJARISNOWDIAMONDS", 50, + * new ItemStack(Item.diamond,64,0), new Object[] { is }); + * + * If no tag was added for "amount" then the jar would simply have had to contain any + * amount of crystal essentia. + */ + + /** + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param cost the vis cost + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes + */ + public static void addArcaneCraftingRecipe(String key, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) + { + String var3 = ""; + int var4 = 0; + int var5 = 0; + int var6 = 0; + int var9; + + if (par2ArrayOfObj[var4] instanceof String[]) + { + String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]); + String[] var8 = var7; + var9 = var7.length; + + for (int var10 = 0; var10 < var9; ++var10) + { + String var11 = var8[var10]; + ++var6; + var5 = var11.length(); + var3 = var3 + var11; + } + } + else + { + while (par2ArrayOfObj[var4] instanceof String) + { + String var13 = (String)par2ArrayOfObj[var4++]; + ++var6; + var5 = var13.length(); + var3 = var3 + var13; + } + } + + HashMap var14; + + for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2) + { + Character var16 = (Character)par2ArrayOfObj[var4]; + ItemStack var17 = null; + + if (par2ArrayOfObj[var4 + 1] instanceof Item) + { + var17 = new ItemStack((Item)par2ArrayOfObj[var4 + 1]); + } + else if (par2ArrayOfObj[var4 + 1] instanceof Block) + { + var17 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, -1); + } + else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack) + { + var17 = (ItemStack)par2ArrayOfObj[var4 + 1]; + } + + var14.put(var16, var17); + } + + ItemStack[] var15 = new ItemStack[var5 * var6]; + + for (var9 = 0; var9 < var5 * var6; ++var9) + { + char var18 = var3.charAt(var9); + + if (var14.containsKey(Character.valueOf(var18))) + { + var15[var9] = ((ItemStack)var14.get(Character.valueOf(var18))).copy(); + } + else + { + var15[var9] = null; + } + } + + craftingRecipes.add(new ShapedArcaneCraftingRecipes(key, var5, var6, var15, par1ItemStack,cost)); + } + + /** + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon + * @param cost the vis cost + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes + */ + public static void addArcaneCraftingRecipe(String key, String recipeKey, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) { + addArcaneCraftingRecipe(key,cost,par1ItemStack,par2ArrayOfObj); + ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1)); + } + + /** + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param cost the vis cost + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes + */ + public static void addShapelessArcaneCraftingRecipe(String key, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) + { + ArrayList var3 = new ArrayList(); + Object[] var4 = par2ArrayOfObj; + int var5 = par2ArrayOfObj.length; + + for (int var6 = 0; var6 < var5; ++var6) + { + Object var7 = var4[var6]; + + if (var7 instanceof ItemStack) + { + var3.add(((ItemStack)var7).copy()); + } + else if (var7 instanceof Item) + { + var3.add(new ItemStack((Item)var7)); + } + else + { + if (!(var7 instanceof Block)) + { + throw new RuntimeException("Invalid shapeless recipe!"); + } + + var3.add(new ItemStack((Block)var7)); + } + } + + craftingRecipes.add(new ShapelessArcaneCraftingRecipes(key, par1ItemStack, var3, cost)); + } + + /** + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon + * @param cost the vis cost + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes + */ + public static void addShapelessArcaneCraftingRecipe(String key, String recipeKey, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) { + addShapelessArcaneCraftingRecipe(key,cost,par1ItemStack,par2ArrayOfObj); + ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1)); + } + + /** + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param cost the vis cost + * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe. + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes + */ + public static void addInfusionCraftingRecipe(String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) + { + String var3 = ""; + int var4 = 0; + int var5 = 0; + int var6 = 0; + int var9; + + if (par2ArrayOfObj[var4] instanceof String[]) + { + String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]); + String[] var8 = var7; + var9 = var7.length; + + for (int var10 = 0; var10 < var9; ++var10) + { + String var11 = var8[var10]; + ++var6; + var5 = var11.length(); + var3 = var3 + var11; + } + } + else + { + while (par2ArrayOfObj[var4] instanceof String) + { + String var13 = (String)par2ArrayOfObj[var4++]; + ++var6; + var5 = var13.length(); + var3 = var3 + var13; + } + } + + HashMap var14; + + for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2) + { + Character var16 = (Character)par2ArrayOfObj[var4]; + ItemStack var17 = null; + + if (par2ArrayOfObj[var4 + 1] instanceof Item) + { + var17 = new ItemStack((Item)par2ArrayOfObj[var4 + 1]); + } + else if (par2ArrayOfObj[var4 + 1] instanceof Block) + { + var17 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, -1); + } + else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack) + { + var17 = (ItemStack)par2ArrayOfObj[var4 + 1]; + } + + var14.put(var16, var17); + } + + ItemStack[] var15 = new ItemStack[var5 * var6]; + + for (var9 = 0; var9 < var5 * var6; ++var9) + { + char var18 = var3.charAt(var9); + + if (var14.containsKey(Character.valueOf(var18))) + { + var15[var9] = ((ItemStack)var14.get(Character.valueOf(var18))).copy(); + } + else + { + var15[var9] = null; + } + } + + craftingRecipes.add(new ShapedInfusionCraftingRecipes(key, var5, var6, var15, par1ItemStack,cost,tags)); + } + + /** + * Recipe is NBT sensitive + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon + * @param cost the vis cost + * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe. + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes + */ + public static void addInfusionCraftingRecipe(String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) { + addInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj); + ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1)); + } + + /** + * Recipe is NBT sensitive + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param cost the vis cost + * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe. + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes + */ + public static void addShapelessInfusionCraftingRecipe(String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) + { + ArrayList var3 = new ArrayList(); + Object[] var4 = par2ArrayOfObj; + int var5 = par2ArrayOfObj.length; + + for (int var6 = 0; var6 < var5; ++var6) + { + Object var7 = var4[var6]; + + if (var7 instanceof ItemStack) + { + var3.add(((ItemStack)var7).copy()); + } + else if (var7 instanceof Item) + { + var3.add(new ItemStack((Item)var7)); + } + else + { + if (!(var7 instanceof Block)) + { + throw new RuntimeException("Invalid shapeless recipe!"); + } + + var3.add(new ItemStack((Block)var7)); + } + } + + craftingRecipes.add(new ShapelessInfusionCraftingRecipes(key, par1ItemStack, var3, cost,tags)); + } + + /** + * Recipe is NBT sensitive + * @param key the research key required for this recipe to work. Leave blank if it will work without research + * @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon + * @param cost the vis cost + * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe. + * @param par1ItemStack the recipe output + * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes + */ + public static void addShapelessInfusionCraftingRecipe(String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) { + addShapelessInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj); + ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1)); + } + + /** + * @param key the research key required for this recipe to work. Unlike the arcane crafting and infusion crafting + * recipes a recipe key is automatically created using the same key. + * See method below if the research and recipes keys do not match + * @param result the output result + * @param cost the vis cost + * @param tags the aspects required to craft this + */ + public static void addCrucibleRecipe(String key, ItemStack result, int cost, ObjectTags tags) { + getCrucibleRecipes().add(new RecipeCrucible(key, result, tags, cost)); + } + + /** + * @param key the research key required for this recipe to work. + * @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon + * @param result the output result + * @param cost the vis cost + * @param tags the aspects required to craft this + */ + public static void addCrucibleRecipe(String key, String recipeKey, ItemStack result, int cost, ObjectTags tags) { + getCrucibleRecipes().add(new RecipeCrucible(key, recipeKey, result, tags, cost)); + } + + /** + * @param key the recipe key (NOT research key) + * @return the recipe + */ + public static RecipeCrucible getCrucibleRecipe(String key) { + for (Object r:getCrucibleRecipes()) { + if (r instanceof RecipeCrucible) { + if (((RecipeCrucible)r).key.equals(key)) + return (RecipeCrucible)r; + } + } + return null; + } + + /** + * @param stack the recipe result + * @return the recipe + */ + public static RecipeCrucible getCrucibleRecipe(ItemStack stack) { + for (Object r:getCrucibleRecipes()) { + if (r instanceof RecipeCrucible) { + if (((RecipeCrucible)r).recipeOutput.isItemEqual(stack)) + return (RecipeCrucible)r; + } + } + return null; + } + + /** + * @param stack the item + * @return the thaumcraft recipe key that produces that item. Used by the thaumonomicon drilldown feature. + */ + public static String getCraftingRecipeKey(ItemStack stack) { + for (Object r:getCraftingRecipes()) { + if (r instanceof IArcaneRecipe) { + if (ThaumcraftApiHelper.areItemsEqual(stack,((IArcaneRecipe)r).getRecipeOutput())) + return ((IArcaneRecipe)r).getKey(); + } + if (r instanceof IInfusionRecipe) { + if (ThaumcraftApiHelper.areItemsEqual(stack,((IInfusionRecipe)r).getRecipeOutput())) + return ((IInfusionRecipe)r).getKey(); + } + } + return ""; + } + + //TAGS//////////////////////////////////////// + + public static Map objectTags = new HashMap(); + + /** + * Checks to see if the passed item/block already has aspects associated with it. + * @param id + * @param meta + * @return + */ + public static boolean exists(int id, int meta) { + ObjectTags tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,meta)); + if (tmp==null) { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,-1)); + if (meta==-1 && tmp==null) { + int index=0; + do { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,index)); + index++; + } while (index<16 && tmp==null); + } + if (tmp==null) return false; + } + + return true; + } + + /** + * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:

+ * ThaumcraftApi.registerObjectTag(Block.cobblestone.blockID, -1, (new ObjectTags()).add(EnumTag.ROCK, 1).add(EnumTag.DESTRUCTION, 1)); + * @param id + * @param meta pass -1 if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(int id, int meta, ObjectTags aspects) { + aspects = ThaumcraftApiHelper.cullTags(aspects); + objectTags.put(Arrays.asList(id,meta), aspects); + } + + /** + * Used to assign aspects to the given item/block. + * Attempts to automatically generate aspect tags by checking registered recipes. + * Here is an example of the declaration for pistons:

+ * ThaumcraftApi.registerComplexObjectTag(Block.pistonBase.blockID, 0, (new ObjectTags()).add(EnumTag.MECHANISM, 2).add(EnumTag.MOTION, 4)); + * @param id + * @param meta pass -1 if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerComplexObjectTag(int id, int meta, ObjectTags aspects ) { + if (!exists(id,meta)) { + ObjectTags tmp = ThaumcraftApiHelper.generateTags(id, meta); + if (tmp != null && tmp.size()>0) { + for(EnumTag tag:tmp.getAspects()) { + aspects.add(tag, tmp.getAmount(tag)); + } + } + registerObjectTag(id,meta,aspects); + } else { + ObjectTags tmp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id,1,meta)); + for(EnumTag tag:aspects.getAspects()) { + tmp.merge(tag, tmp.getAmount(tag)); + } + registerObjectTag(id,meta,tmp); + } + } + + public static ArrayList getCrucibleRecipes() { + return crucibleRecipes; + } + + + //AURAS////////////////////////////////////////////////// + + private static Method addFluxToClosest; + /** + * Adds flux to the node closest to the given location + * @param world + * @param x + * @param y + * @param z + * @param tags ObjectTags list of all the EnumTags and amounts of flux to add. + */ + public static void addFluxToClosest(World world, float x, float y, float z, ObjectTags tags) { + try { + if(addFluxToClosest == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + addFluxToClosest = fake.getMethod("addFluxToClosest", World.class, float.class, float.class, float.class, ObjectTags.class); + } + addFluxToClosest.invoke(null, world,x,y,z,tags); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method addFluxToClosest"); + } + } + + private static Method decreaseClosestAura; + /** + * Removes an amount of vis from the aura node closest to the given location + * @param world + * @param x + * @param y + * @param z + * @param amount The amount of vis to remove + * @param doit If set to false it will merely perform a check to see if there is enough vis to perform the operation. + * If set to true it will actually decrease the vis as well. + * @return It will return true if there was enough vis to perform this operation + */ + public static boolean decreaseClosestAura(World world, double x, double y, double z, int amount, boolean doit) { + boolean ret=false; + try { + if(decreaseClosestAura == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + decreaseClosestAura = fake.getMethod("decreaseClosestAura", World.class, double.class, double.class, double.class, int.class, boolean.class); + } + ret = (Boolean) decreaseClosestAura.invoke(null, world,x,y,z,amount,doit); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method decreaseClosestAura"); + } + return ret; + } + + private static Method increaseLowestAura; + /** + * Increases the lowest aura near the given location. + * @param world + * @param x + * @param y + * @param z + * @param amount + * @return it will return true if the operation was a success + */ + public static boolean increaseLowestAura(World world, double x, double y, double z, int amount) { + boolean ret=false; + try { + if(increaseLowestAura == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + increaseLowestAura = fake.getMethod("increaseLowestAura", World.class, double.class, double.class, double.class, int.class); + } + ret = (Boolean) increaseLowestAura.invoke(null, world,x,y,z,amount); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method increaseLowestAura"); + } + return ret; + } + + private static Method getClosestAuraWithinRange; + /** + * Gets the id of the closest aura node within range of the given coordinates. Only checks loaded chunks + * @param world + * @param x + * @param y + * @param z + * @param range distance (in blocks) to check + * @return returns -1 if no aura is found, otherwise returns the aura node id. + */ + public static int getClosestAuraWithinRange(World world, double x, double y, double z, double range) { + int ret=-1; + try { + if(getClosestAuraWithinRange == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + getClosestAuraWithinRange = fake.getMethod("getClosestAuraWithinRange", World.class, double.class, double.class, double.class, double.class); + } + ret = (Integer) getClosestAuraWithinRange.invoke(null, world,x,y,z,range); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getClosestAuraWithinRange"); + } + return ret; + } + + private static Method getNodeCopy; + /** + * Gets an copy of the AuraNode object for the given node + * @param nodeId the int key of the aura node + * @return returns a COPY of the auranode object, not the object itself. + * Auranode values should only be altered via queNodeChanges - NEVER directly + */ + public static AuraNode getNodeCopy(int nodeId) { + AuraNode node = null; + try { + if(getNodeCopy == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + getNodeCopy = fake.getMethod("getNodeCopy", int.class); + } + node = (AuraNode) getNodeCopy.invoke(null, nodeId); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getNodeCopy"); + } + return node; + } + + private static Method queueNodeChanges; + /** + * This method is used to alter the values of aura nodes. The changes specified are placed in a queue for processing by + * the aura thread.
+ * + * For example:
+ * queNodeChanges(55,8,0,false,null,0,0,0); //will increase node 55's current vis by 8
+ * queNodeChanges(55,0,0,false,new ObjectTags().remove(EnumTag.FIRE,3),0,0,0); //will reduce node 55's FIRE flux levels by 3
+ * queNodeChanges(55,11,11,false,null,0,.5f,0); //will increase node 55's current and base level by 11 and increase its y pos by .5f
+ * + * @param nodeId + * @param levelMod the amount by which the auras vis level should be changed (positive or negative) + * @param baseMod the amount by which the auras max vis level should be changed (positive or negative) + * @param toggleLock if set to true the nodes lock state will toggle to its opposite value. Currently doesn't do much + * @param flx a ObjectTags collection of the all the flux to add (if positive) or remove (if negative) to the node + * @param x by how much the nodes x position should be altered. Should usually be less than 1 + * @param y by how much the nodes y position should be altered. Should usually be less than 1 + * @param z by how much the nodes z position should be altered. Should usually be less than 1 + */ + public static void queueNodeChanges(int nodeId, int levelMod, int baseMod, boolean toggleLock, ObjectTags flux, + float x,float y,float z) { + try { + if(queueNodeChanges == null) { + Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); + queueNodeChanges = fake.getMethod("queueNodeChanges", + int.class, int.class, int.class, boolean.class, ObjectTags.class, float.class, float.class, float.class); + } + queueNodeChanges.invoke(null, nodeId, levelMod, baseMod, toggleLock, flux, x, y, z); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method queueNodeChanges"); + } + } + + //BIOMES////////////////////////////////////////////////// + @Deprecated + public static HashMap biomeInfo = new HashMap(); + + /** + * Registers custom biomes with thaumcraft + * @Deprecated I will be switching over the the forge BiomeDictionary system in the future so any mods that add biomes should just make sure they are tagged correctly + * @param biomeID The id of the biome + * @param visLevel The average vis level of nodes generated in this biome + * @param tag The EnumTag associated with this biome (used to determine infused ore spawns among other things) + * @param greatwood Does this biome support greatwood trees + * @param silverwood Does this biome support silverwood trees + */ + @Deprecated + public static void registerBiomeInfo(int biomeID, int visLevel, EnumTag tag, boolean greatwood, boolean silverwood) { + biomeInfo.put(biomeID, Arrays.asList(visLevel, tag, greatwood, silverwood)); + } + + @Deprecated + public static int getBiomeAura(int biomeId) { + try { + return (Integer) biomeInfo.get(biomeId).get(0); + } catch (Exception e) {} + return 200; + } + + @Deprecated + public static EnumTag getBiomeTag(int biomeId) { + try { + return (EnumTag) biomeInfo.get(biomeId).get(1); + } catch (Exception e) {} + return EnumTag.UNKNOWN; + } + + @Deprecated + public static boolean getBiomeSupportsGreatwood(int biomeId) { + try { + return (Boolean) biomeInfo.get(biomeId).get(2); + } catch (Exception e) {} + return false; + } + + @Deprecated + public static boolean getBiomeSupportsSilverwood(int biomeId) { + try { + return (Boolean) biomeInfo.get(biomeId).get(3); + } catch (Exception e) {} + return false; + } + + //CROPS ////////////////////////////////////////////////////////////////////////////////////////// + + /** + * To define mod crops you need to use FMLInterModComms in your @Mod.Init method. + * There are two 'types' of crops you can add. Standard crops and clickable crops. + * + * Standard crops work like normal vanilla crops - they grow until a certain metadata + * value is reached and you harvest them by destroying the block and collecting the blocks. + * You need to create and ItemStack that tells the golem what block id and metadata represents + * the crop when fully grown. + * Example for vanilla wheat: + * FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(Block.crops,1,7)); + * + * Clickable crops are crops that you right click to gather their bounty instead of destroying them. + * As for standard crops, you need to create and ItemStack that tells the golem what block id + * and metadata represents the crop when fully grown. The golem will trigger the blocks onBlockActivated method. + * Example (this will technically do nothing since clicking wheat does nothing, but you get the idea): + * FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Block.crops,1,7)); + */ + + @Deprecated + public static HashMap crops = new HashMap(); + + /** + * This is used to add mod crops to the list of crops harvested by golems + * that do not use the standard crop growth pattern
+ * (i.e. being an instance of BlockCrops and being fully grown at meta 7).
+ * Only seeds implementing IPlantable will be replanted. + * @param blockID the block id of the crop + * @param grownMeta the metadata value when the crop is considered fully grown. + * The block with this id and meta will be the one the golem breaks. + */ + @Deprecated + public static void addHarvestableCrop(int blockID, int grownMeta) { + crops.put(blockID, grownMeta); + } + +} diff --git a/common/thaumcraft/api/ThaumcraftApiHelper.java b/common/thaumcraft/api/ThaumcraftApiHelper.java new file mode 100644 index 0000000..aabddc8 --- /dev/null +++ b/common/thaumcraft/api/ThaumcraftApiHelper.java @@ -0,0 +1,103 @@ +package thaumcraft.api; + +import java.lang.reflect.Method; + +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.FMLLog; + +public class ThaumcraftApiHelper { + public static ObjectTags cullTags(ObjectTags temp) { + while (temp!=null && temp.size()>5) { + EnumTag lowest = null; + int low = Integer.MAX_VALUE; + for (EnumTag tag:temp.getAspects()) { + if (temp.getAmount(tag) aspects = new HashMap(); + + //PRIMAL + public static final Aspect AIR = new Aspect("Air"); + public static final Aspect EARTH = new Aspect("Earth"); + public static final Aspect FIRE = new Aspect("Fire"); + public static final Aspect WATER = new Aspect("Water"); + public static final Aspect POSITIVE = new Aspect("Positive"); + public static final Aspect NEGATIVE = new Aspect("Negative"); + public static final Aspect ORDER = new Aspect("Order"); + public static final Aspect CHAOS = new Aspect("Chaos"); + + //SECONDARY TODO + public static final Aspect VOID = new Aspect("Void", new Aspect[] {NEGATIVE, POSITIVE}); + public static final Aspect LIGHT = new Aspect("Light", new Aspect[] {AIR, FIRE}); + public static final Aspect DARKNESS = new Aspect("Darkness", new Aspect[] {VOID, LIGHT}); + public static final Aspect ASTRAL = new Aspect("Astral", new Aspect[] {VOID, DARKNESS}); + public static final Aspect ENERGY = new Aspect("Energy", new Aspect[] {POSITIVE, FIRE}); + public static final Aspect LIFE = new Aspect("Life", new Aspect[] {POSITIVE, ENERGY}); + public static final Aspect DEATH = new Aspect("Death", new Aspect[] {NEGATIVE, ENERGY}); + public static final Aspect MOTION = new Aspect("Motion", new Aspect[] {AIR, ORDER}); + public static final Aspect WEATHER = new Aspect("Weather", new Aspect[] {AIR, CHAOS}); + public static final Aspect STONE = new Aspect("Stone", new Aspect[] {EARTH, ORDER}); + public static final Aspect METAL = new Aspect("Metal", new Aspect[] {STONE, FIRE}); + public static final Aspect SAND = new Aspect("Sand", new Aspect[] {AIR, STONE}); + public static final Aspect SOUL = new Aspect("Soul", new Aspect[] {DEATH, LIFE}); + public static final Aspect HEAL = new Aspect("Heal", new Aspect[] {POSITIVE, LIFE}); + public static final Aspect HARM = new Aspect("Harm", new Aspect[] {NEGATIVE, LIFE}); + public static final Aspect ANIMATE = new Aspect("Animate",new Aspect[] {MOTION, LIFE}); + public static final Aspect MAN = new Aspect("Man", new Aspect[] {LIFE, SOUL}); + public static final Aspect BEAST = new Aspect("Beast", new Aspect[] {LIFE, CHAOS}); + public static final Aspect BIRD = new Aspect("Bird", new Aspect[] {BEAST, AIR}); + public static final Aspect FISH = new Aspect("Fish", new Aspect[] {BEAST, WATER}); + public static final Aspect SEED = new Aspect("Seed", new Aspect[] {LIFE, EARTH}); + public static final Aspect TREE = new Aspect("Tree", new Aspect[] {SEED, EARTH}); + public static final Aspect TOOL = new Aspect("Tool", new Aspect[] {MAN, METAL}); + public static final Aspect MINE = new Aspect("Mine", new Aspect[] {MAN, STONE}); + public static final Aspect WOOD = new Aspect("Wood", new Aspect[] {TREE, TOOL}); + public static final Aspect MACHINE = new Aspect("Machine", new Aspect[] {TOOL, ORDER}); + + +// public static final Aspect TRAVEL = new Aspect("Travel", new Aspect[] {MOTION, EARTH}); +// public static final Aspect TELEPORT = new Aspect("Teleport", new Aspect[] {TRAVEL, VOID}); +// public static final Aspect GLASS = new Aspect("Glass", new Aspect[] {SAND, FIRE}); +// public static final Aspect CLAY = new Aspect("Clay", new Aspect[] {SAND, LIFE}); + +} diff --git a/common/thaumcraft/api/aura/AuraNode.java b/common/thaumcraft/api/aura/AuraNode.java new file mode 100644 index 0000000..ac2f7dd --- /dev/null +++ b/common/thaumcraft/api/aura/AuraNode.java @@ -0,0 +1,38 @@ +package thaumcraft.api.aura; + +import java.io.Serializable; + +import thaumcraft.api.ObjectTags; + +public class AuraNode implements Serializable { + //key + public int key; + + //aura + public short level; + public short baseLevel; + public ObjectTags flux = new ObjectTags(); + public EnumNodeType type; + + //location + public int dimension; + public double xPos; + public double yPos; + public double zPos; + public boolean locked; + + public AuraNode(int key, short lvl, EnumNodeType type, int dim, int x, int y, int z) { + this.key = key; + this.level = lvl; + this.baseLevel = lvl; + this.type = type; + this.dimension = dim; + this.xPos = x+.5d; + this.yPos = y+.5d; + this.zPos = z+.5d; + } + + public AuraNode() { + } + +} diff --git a/common/thaumcraft/api/aura/EnumNodeType.java b/common/thaumcraft/api/aura/EnumNodeType.java new file mode 100644 index 0000000..e5f6115 --- /dev/null +++ b/common/thaumcraft/api/aura/EnumNodeType.java @@ -0,0 +1,21 @@ +package thaumcraft.api.aura; + + + +public enum EnumNodeType { + NORMAL, + PURE, + DARK, + UNSTABLE; + + public static final EnumNodeType[] VALID_TYPES = {NORMAL,PURE,DARK,UNSTABLE}; + + public static EnumNodeType getType(int id) + { + if (id >= 0 && id < VALID_TYPES.length) + { + return VALID_TYPES[id]; + } + return NORMAL; + } +} diff --git a/common/thaumcraft/api/crafting/IArcaneRecipe.java b/common/thaumcraft/api/crafting/IArcaneRecipe.java new file mode 100644 index 0000000..1035219 --- /dev/null +++ b/common/thaumcraft/api/crafting/IArcaneRecipe.java @@ -0,0 +1,30 @@ +package thaumcraft.api.crafting; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public interface IArcaneRecipe +{ + + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + boolean matches(IInventory var1, EntityPlayer player); + + /** + * Returns an Item that is the result of this recipe + */ + ItemStack getCraftingResult(IInventory var1); + + /** + * Returns the size of the recipe area + */ + int getRecipeSize(); + + ItemStack getRecipeOutput(); + int getCost(); + String getKey(); +} diff --git a/common/thaumcraft/api/crafting/IInfusionRecipe.java b/common/thaumcraft/api/crafting/IInfusionRecipe.java new file mode 100644 index 0000000..3a43ab8 --- /dev/null +++ b/common/thaumcraft/api/crafting/IInfusionRecipe.java @@ -0,0 +1,30 @@ +package thaumcraft.api.crafting; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import thaumcraft.api.ObjectTags; + +public interface IInfusionRecipe +{ + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + boolean matches(IInventory var1, EntityPlayer player); + + /** + * Returns an Item that is the result of this recipe + */ + ItemStack getCraftingResult(IInventory var1); + + /** + * Returns the size of the recipe area + */ + int getRecipeSize(); + + ItemStack getRecipeOutput(); + int getCost(); + ObjectTags getTags(); + String getKey(); +} diff --git a/common/thaumcraft/api/crafting/RecipeCrucible.java b/common/thaumcraft/api/crafting/RecipeCrucible.java new file mode 100644 index 0000000..045a601 --- /dev/null +++ b/common/thaumcraft/api/crafting/RecipeCrucible.java @@ -0,0 +1,51 @@ +package thaumcraft.api.crafting; + +import net.minecraft.item.ItemStack; +import thaumcraft.api.EnumTag; +import thaumcraft.api.ObjectTags; + +public class RecipeCrucible { + + public ItemStack recipeOutput; + public ObjectTags tags; + public String key; + public String researchKey; + public int cost; + + public RecipeCrucible(String researchKey, String key, ItemStack result, ObjectTags tags, int cost) { + recipeOutput = result; + this.tags = tags; + this.key = key; + this.researchKey = researchKey; + this.cost = cost; + } + + public RecipeCrucible(String key, ItemStack result, ObjectTags tags, int cost) { + recipeOutput = result; + this.tags = tags; + this.key = key; + this.researchKey = key; + this.cost = cost; + } + + public boolean matches(ObjectTags itags) { + if (itags==null) return false; + for (EnumTag tag:tags.getAspects()) { + if (itags.getAmount(tag)0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) { + return false; + } + for (int var2 = 0; var2 <= 3 - this.recipeWidth; ++var2) + { + for (int var3 = 0; var3 <= 3 - this.recipeHeight; ++var3) + { + if (this.checkMatch(par1InventoryCrafting, var2, var3, true)) + { + return true; + } + + if (this.checkMatch(par1InventoryCrafting, var2, var3, false)) + { + return true; + } + } + } + + return false; + } + + + + + /** + * Checks if the region of a crafting inventory is match for the recipe. + */ + private boolean checkMatch(IInventory par1InventoryCrafting, int par2, int par3, boolean par4) + { + for (int var5 = 0; var5 < 3; ++var5) + { + for (int var6 = 0; var6 < 3; ++var6) + { + int var7 = var5 - par2; + int var8 = var6 - par3; + ItemStack var9 = null; + + if (var7 >= 0 && var8 >= 0 && var7 < this.recipeWidth && var8 < this.recipeHeight) + { + if (par4) + { + var9 = this.recipeItems[this.recipeWidth - var7 - 1 + var8 * this.recipeWidth]; + } + else + { + var9 = this.recipeItems[var7 + var8 * this.recipeWidth]; + } + } + + ItemStack var10 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var5, var6); + + if (var10 != null || var9 != null) + { + if (var10 == null && var9 != null || var10 != null && var9 == null) + { + return false; + } + + if (var9.itemID != var10.itemID) + { + return false; + } + + if (var9.getItemDamage() != OreDictionary.WILDCARD_VALUE && var9.getItemDamage() != var10.getItemDamage()) + { + return false; + } + + if (var9.hasTagCompound()) { + NBTTagCompound tc = var9.getTagCompound(); + for (Object tag:tc.getTags().toArray()) { + NBTBase base = (NBTBase)tag; + Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass(); + if (!(var10.hasTagCompound() && + nc.cast(var10.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) { + return false; + } + } + } + + + } + } + } + + return true; + } + + /** + * Returns an Item that is the result of this recipe + */ + public ItemStack getCraftingResult(IInventory par1InventoryCrafting) + { + return new ItemStack(this.recipeOutput.itemID, this.recipeOutput.stackSize, this.recipeOutput.getItemDamage()); + } + + /** + * Returns the size of the recipe area + */ + public int getRecipeSize() + { + return this.recipeWidth * this.recipeHeight; + } + + @Override + public int getCost() { + return cost; + } + + @Override + public String getKey() { + return key; + } +} diff --git a/common/thaumcraft/api/crafting/ShapedInfusionCraftingRecipes.java b/common/thaumcraft/api/crafting/ShapedInfusionCraftingRecipes.java new file mode 100644 index 0000000..989c8e2 --- /dev/null +++ b/common/thaumcraft/api/crafting/ShapedInfusionCraftingRecipes.java @@ -0,0 +1,171 @@ +package thaumcraft.api.crafting; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ObjectTags; +import thaumcraft.api.ThaumcraftApiHelper; + +public class ShapedInfusionCraftingRecipes implements IInfusionRecipe +{ + /** How many horizontal slots this recipe is wide. */ + public int recipeWidth; + + /** How many vertical slots this recipe uses. */ + public int recipeHeight; + + public String key; + + @Override + public String getKey() { + return key; + } + + public int cost; + + public ObjectTags tags; + + /** Is a array of ItemStack that composes the recipe. */ + public ItemStack[] recipeItems; + + /** Is the ItemStack that you get when craft the recipe. */ + private ItemStack recipeOutput; + + /** Is the itemID of the output item that you get when craft the recipe. */ + public final int recipeOutputItemID; + + public ShapedInfusionCraftingRecipes(String key, int par1, int par2, ItemStack[] par3ArrayOfItemStack, ItemStack par4ItemStack, int cost, ObjectTags tags) + { + this.recipeOutputItemID = par4ItemStack.itemID; + this.recipeWidth = par1; + this.recipeHeight = par2; + this.recipeItems = par3ArrayOfItemStack; + this.recipeOutput = par4ItemStack; + this.key = key; + this.cost = cost; + this.tags = tags; + } + + public ItemStack getRecipeOutput() + { + return this.recipeOutput; + } + + /** + * Used to check if a recipe matches current crafting inventory + */ + public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player) + { + if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) { + return false; + } + for (int var2 = 0; var2 <= 3 - this.recipeWidth; ++var2) + { + for (int var3 = 0; var3 <= 3 - this.recipeHeight; ++var3) + { + if (this.checkMatch(par1InventoryCrafting, var2, var3, true)) + { + return true; + } + + if (this.checkMatch(par1InventoryCrafting, var2, var3, false)) + { + return true; + } + } + } + + return false; + } + + /** + * Checks if the region of a crafting inventory is match for the recipe. + */ + private boolean checkMatch(IInventory par1InventoryCrafting, int par2, int par3, boolean par4) + { + for (int var5 = 0; var5 < 3; ++var5) + { + for (int var6 = 0; var6 < 3; ++var6) + { + int var7 = var5 - par2; + int var8 = var6 - par3; + ItemStack var9 = null; + + if (var7 >= 0 && var8 >= 0 && var7 < this.recipeWidth && var8 < this.recipeHeight) + { + if (par4) + { + var9 = this.recipeItems[this.recipeWidth - var7 - 1 + var8 * this.recipeWidth]; + } + else + { + var9 = this.recipeItems[var7 + var8 * this.recipeWidth]; + } + } + + ItemStack var10 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var5, var6); + + if (var10 != null || var9 != null) + { + if (var10 == null && var9 != null || var10 != null && var9 == null) + { + return false; + } + + if (var9.itemID != var10.itemID) + { + return false; + } + + if (var9.getItemDamage() != OreDictionary.WILDCARD_VALUE && var9.getItemDamage() != var10.getItemDamage()) + { + return false; + } + + if (var9.hasTagCompound()) { + NBTTagCompound tc = var9.getTagCompound(); + for (Object tag:tc.getTags().toArray()) { + NBTBase base = (NBTBase)tag; + Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass(); + if (!(var10.hasTagCompound() && + nc.cast(var10.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) { + return false; + } + } + } + } + } + } + + return true; + } + + /** + * Returns an Item that is the result of this recipe + */ + public ItemStack getCraftingResult(IInventory par1InventoryCrafting) + { + return new ItemStack(this.recipeOutput.itemID, this.recipeOutput.stackSize, this.recipeOutput.getItemDamage()); + } + + /** + * Returns the size of the recipe area + */ + public int getRecipeSize() + { + return this.recipeWidth * this.recipeHeight; + } + + @Override + public int getCost() { + return cost; + } + + @Override + public ObjectTags getTags() { + return tags; + } +} diff --git a/common/thaumcraft/api/crafting/ShapelessArcaneCraftingRecipes.java b/common/thaumcraft/api/crafting/ShapelessArcaneCraftingRecipes.java new file mode 100644 index 0000000..1984c24 --- /dev/null +++ b/common/thaumcraft/api/crafting/ShapelessArcaneCraftingRecipes.java @@ -0,0 +1,127 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; + +public class ShapelessArcaneCraftingRecipes implements IArcaneRecipe +{ + /** Is the ItemStack that you get when craft the recipe. */ + private final ItemStack recipeOutput; + + /** Is a List of ItemStack that composes the recipe. */ + public final List recipeItems; + + public String key; + + @Override + public String getKey() { + return key; + } + + public int cost; + + public ShapelessArcaneCraftingRecipes(String key, ItemStack par1ItemStack, List par2List, int cost) + { + this.recipeOutput = par1ItemStack; + this.recipeItems = par2List; + this.key = key; + this.cost = cost; + } + + public ItemStack getRecipeOutput() + { + return this.recipeOutput; + } + + /** + * Used to check if a recipe matches current crafting inventory + */ + public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player) + { + if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) { + return false; + } + + ArrayList var2 = new ArrayList(this.recipeItems); + + for (int var3 = 0; var3 < 3; ++var3) + { + for (int var4 = 0; var4 < 3; ++var4) + { + ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3); + + if (var5 != null) + { + boolean var6 = false; + Iterator var7 = var2.iterator(); + + while (var7.hasNext()) + { + ItemStack var8 = (ItemStack)var7.next(); + + if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage())) + { + boolean matches=true; + if (var8.hasTagCompound()) { + NBTTagCompound tc = var8.getTagCompound(); + for (Object tag:tc.getTags().toArray()) { + NBTBase base = (NBTBase)tag; + Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass(); + if (!(var5.hasTagCompound() && + nc.cast(var5.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) { + matches=false; + break; + } + } + } + + if (matches) { + var6 = true; + var2.remove(var8); + break; + } + } + } + + if (!var6) + { + return false; + } + } + } + } + + return var2.isEmpty(); + } + + /** + * Returns an Item that is the result of this recipe + */ + public ItemStack getCraftingResult(IInventory par1InventoryCrafting) + { + return this.recipeOutput.copy(); + } + + /** + * Returns the size of the recipe area + */ + public int getRecipeSize() + { + return this.recipeItems.size(); + } + + @Override + public int getCost() { + return cost; + } + +} diff --git a/common/thaumcraft/api/crafting/ShapelessInfusionCraftingRecipes.java b/common/thaumcraft/api/crafting/ShapelessInfusionCraftingRecipes.java new file mode 100644 index 0000000..5869fb2 --- /dev/null +++ b/common/thaumcraft/api/crafting/ShapelessInfusionCraftingRecipes.java @@ -0,0 +1,136 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ObjectTags; +import thaumcraft.api.ThaumcraftApiHelper; + +public class ShapelessInfusionCraftingRecipes implements IInfusionRecipe +{ + /** Is the ItemStack that you get when craft the recipe. */ + private final ItemStack recipeOutput; + + /** Is a List of ItemStack that composes the recipe. */ + public final List recipeItems; + + public String key; + + @Override + public String getKey() { + return key; + } + + public int cost; + + public ObjectTags tags; + + public ShapelessInfusionCraftingRecipes(String key, ItemStack par1ItemStack, List par2List, int cost, ObjectTags tags) + { + this.recipeOutput = par1ItemStack; + this.recipeItems = par2List; + this.key = key; + this.cost = cost; + this.tags = tags; + } + + public ItemStack getRecipeOutput() + { + return this.recipeOutput; + } + + /** + * Used to check if a recipe matches current crafting inventory + */ + public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player) + { + if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) { + return false; + } + + ArrayList var2 = new ArrayList(this.recipeItems); + + for (int var3 = 0; var3 < 3; ++var3) + { + for (int var4 = 0; var4 < 3; ++var4) + { + ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3); + + if (var5 != null) + { + boolean var6 = false; + Iterator var7 = var2.iterator(); + + while (var7.hasNext()) + { + ItemStack var8 = (ItemStack)var7.next(); + + if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage())) + { + boolean matches=true; + if (var8.hasTagCompound()) { + NBTTagCompound tc = var8.getTagCompound(); + for (Object tag:tc.getTags().toArray()) { + NBTBase base = (NBTBase)tag; + Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass(); + if (!(var5.hasTagCompound() && + nc.cast(var5.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) { + matches=false; + break; + } + } + } + + if (matches) { + var6 = true; + var2.remove(var8); + break; + } + } + } + + if (!var6) + { + return false; + } + } + } + } + + return var2.isEmpty(); + } + + /** + * Returns an Item that is the result of this recipe + */ + public ItemStack getCraftingResult(IInventory par1InventoryCrafting) + { + return this.recipeOutput.copy(); + } + + /** + * Returns the size of the recipe area + */ + public int getRecipeSize() + { + return this.recipeItems.size(); + } + + @Override + public int getCost() { + return cost; + } + + @Override + public ObjectTags getTags() { + return tags; + } + +} diff --git a/common/thaumcraft/api/crafting/ShapelessInfusionCraftingWithNBTRecipes.java b/common/thaumcraft/api/crafting/ShapelessInfusionCraftingWithNBTRecipes.java new file mode 100644 index 0000000..641f136 --- /dev/null +++ b/common/thaumcraft/api/crafting/ShapelessInfusionCraftingWithNBTRecipes.java @@ -0,0 +1,134 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ObjectTags; +import thaumcraft.api.ThaumcraftApiHelper; + +public class ShapelessInfusionCraftingWithNBTRecipes implements IInfusionRecipe +{ + /** Is the ItemStack that you get when craft the recipe. */ + private final ItemStack recipeOutput; + + /** Is a List of ItemStack that composes the recipe. */ + public final List recipeItems; + + /** Is a List of nbt key/value pairs. */ + public final List nbtList; + + public String key; + + @Override + public String getKey() { + return key; + } + + public int cost; + + public ObjectTags tags; + + public ShapelessInfusionCraftingWithNBTRecipes(String key, + ItemStack par1ItemStack, + List par2List, int cost, ObjectTags tags, + List nbtList) + { + this.recipeOutput = par1ItemStack; + this.recipeItems = par2List; + this.key = key; + this.cost = cost; + this.tags = tags; + this.nbtList = nbtList; + } + + public ItemStack getRecipeOutput() + { + return this.recipeOutput; + } + + /** + * Used to check if a recipe matches current crafting inventory + */ + public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player) + { + if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) { + return false; + } + + ArrayList var2 = new ArrayList(this.recipeItems); + + for (int var3 = 0; var3 < 3; ++var3) + { + for (int var4 = 0; var4 < 3; ++var4) + { + ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3); + + if (var5 != null) + { + boolean var6 = false; + Iterator var7 = var2.iterator(); + b1: + while (var7.hasNext()) + { + ItemStack var8 = (ItemStack)var7.next(); + + if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage())) + { + for (NBTBase nbt:nbtList) { + try { + Class nc = NBTBase.newTag(nbt.getId(), nbt.getName()).getClass(); + if (var5.hasTagCompound() && + nc.cast(var5.getTagCompound().getTag(nbt.getName())).equals(nc.cast(nbt))) { + var6 = true; + var2.remove(var8); + break b1; + } + } catch (Exception e) {/*probably classcast*/} + } + } + } + + if (!var6) + { + return false; + } + } + } + } + + return var2.isEmpty(); + } + + /** + * Returns an Item that is the result of this recipe + */ + public ItemStack getCraftingResult(IInventory par1InventoryCrafting) + { + return this.recipeOutput.copy(); + } + + /** + * Returns the size of the recipe area + */ + public int getRecipeSize() + { + return this.recipeItems.size(); + } + + @Override + public int getCost() { + return cost; + } + + @Override + public ObjectTags getTags() { + return tags; + } + +} diff --git a/common/thaumcraft/api/research/IScanEventHandler.java b/common/thaumcraft/api/research/IScanEventHandler.java new file mode 100644 index 0000000..d0efac5 --- /dev/null +++ b/common/thaumcraft/api/research/IScanEventHandler.java @@ -0,0 +1,9 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IScanEventHandler { + ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player); +} diff --git a/common/thaumcraft/api/research/ResearchItem.java b/common/thaumcraft/api/research/ResearchItem.java new file mode 100644 index 0000000..c305c23 --- /dev/null +++ b/common/thaumcraft/api/research/ResearchItem.java @@ -0,0 +1,274 @@ +package thaumcraft.api.research; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +import thaumcraft.api.ObjectTags; +import thaumcraft.api.ThaumcraftApi; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ResearchItem +{ + /** + * A short string used as a key for this research. Must be unique + */ + public final String key; + + /** + * The name of the research shown in the thaumonomicon + */ + public String name; + + /** + * The blurb text shown below the research name in the thaumonomicon + */ + public String popupText; + + /** + * A longer description of the research. This is the text shown in the handheld research scroll and the research table. + */ + public String longText; + + /** + * The aspect tags and their values required to complete this research + */ + public final ObjectTags tags; + + /** + * This links to any research that needs to be completed before this research can be discovered or learnt. + */ + public ResearchItem[] parents = null; + + /** + * Like parent above, but a line will not be displayed in the thaumonomicon linking them. Just used to prevent clutter. + */ + public ResearchItem[] parentsHidden = null; + /** + * any research linked to this that will be unlocked automatically when this research is complete + */ + public ResearchItem[] siblings = null; + + /** + * the horizontal position of the research icon + */ + public final int displayColumn; + + /** + * the vertical position of the research icon + */ + public final int displayRow; + + /** + * the itemstack of an item or block that will be used as the icon for this research + */ + public final ItemStack itemStack; + + /** + * the index within the research.png file used for this research if it does not use an item icon + */ + public final int iconIndex; + + /** + * Special research has a spiky border. Used for important research milestones. + */ + private boolean isSpecial; + /** + * This indicates if the research should use a circular icon border. Usually used for research that doesn't + * have recipes or that unlocks automatically via the sibling system + */ + private boolean isStub; + /** + * Indicates research that cannot be gained by normal means (either via normal or lost research), + * but still uses a normal icon. Works much like isStub but is handy for mods that wish to add research + * through their own means and keep a normal icon. + */ + private boolean isAlternate; + /** + * Hidden research does not display in the thaumonomicon until discovered + */ + private boolean isHidden; + /** + * Lost research can only be discovered via knowledge fragments + */ + private boolean isLost; + /** + * These research items will automatically unlock for all players on game start + */ + private boolean isAutoUnlock; + + + + public ResearchItem(String par1, ObjectTags tags, int par3, int par4, int icon) + { + this(par1, tags, par3, par4, (ItemStack)null, icon); + } + + public ResearchItem(String par1, ObjectTags tags, int par3, int par4, ItemStack par5Item) + { + this(par1, tags, par3, par4, par5Item, -1); + } + + public ResearchItem(String par1, ObjectTags tags, int par3, int par4, Item par5Item) + { + this(par1, tags, par3, par4, new ItemStack(par5Item), -1); + } + + public ResearchItem(String par1, ObjectTags tags, int par3, int par4, Block par5Block) + { + this(par1, tags, par3, par4, new ItemStack(par5Block), -1); + } + + public ResearchItem(String par1, ObjectTags tags, int par3, int par4, ItemStack par5ItemStack, int icon) + { + this.key = par1; + this.tags = tags; + this.name = ""; + this.longText = ""; + this.popupText = ""; + + Element el = ThaumcraftApi.researchDoc.getElementById(key); + if (el!=null) { + NodeList children = el.getChildNodes(); + for (int a=0;a ResearchList.maxDisplayColumn) + { + ResearchList.maxDisplayColumn = par3; + } + + if (par4 > ResearchList.maxDisplayRow) + { + ResearchList.maxDisplayRow = par4; + } + + + } + + public ResearchItem setSpecial() + { + this.isSpecial = true; + return this; + } + + public ResearchItem setStub() + { + this.isStub = true; + return this; + } + + public ResearchItem setAlternate() + { + this.isAlternate = true; + return this; + } + + public ResearchItem setHidden() + { + this.isHidden = true; + return this; + } + + public ResearchItem setLost() + { + this.isLost = true; + return this; + } + + public ResearchItem setParents(ResearchItem... par) + { + this.parents = par; + return this; + } + + public ResearchItem setParentsHidden(ResearchItem... par) + { + this.parentsHidden = par; + return this; + } + + public ResearchItem setSiblings(ResearchItem... sib) + { + this.siblings = sib; + return this; + } + + public ResearchItem registerResearchItem() + { + ResearchList.research.put(key, this); + return this; + } + + @SideOnly(Side.CLIENT) + public String getName() + { + return this.name; + } + + @SideOnly(Side.CLIENT) + public boolean getSpecial() + { + return this.isSpecial; + } + + public boolean getStub() + { + return this.isStub; + } + + public boolean getAlternate() + { + return this.isAlternate; + } + + public boolean getHidden() + { + return this.isHidden; + } + + public boolean getLost() + { + return this.isLost; + } + + public boolean getAutoUnlock() { + return isAutoUnlock; + } + + public ResearchItem setAutoUnlock() + { + this.isAutoUnlock = true; + return this; + } +} diff --git a/common/thaumcraft/api/research/ResearchList.java b/common/thaumcraft/api/research/ResearchList.java new file mode 100644 index 0000000..c77f17d --- /dev/null +++ b/common/thaumcraft/api/research/ResearchList.java @@ -0,0 +1,91 @@ +package thaumcraft.api.research; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import thaumcraft.api.EnumTag; + +public class ResearchList { + + /** Is the smallest column used on the GUI. */ + public static int minDisplayColumn; + + /** Is the smallest row used on the GUI. */ + public static int minDisplayRow; + + /** Is the biggest column used on the GUI. */ + public static int maxDisplayColumn; + + /** Is the biggest row used on the GUI. */ + public static int maxDisplayRow; + + //Research + public static Map research = new HashMap(); + + + public static Map craftingRecipesForResearch = new HashMap(); + + // + + + /** + * @param key + * @return the research item linked to this key + */ + public static ResearchItem getResearch(String key) { + return research.get(key); + } + + + + /** + * @param key + * @return the name of the research linked to this key + */ + public static String getResearchName(String key) { + ResearchItem rr = research.get(key); + if (rr==null) return ""; + return rr.name; + } + + /** + * @param key + * @return a list of the enumtags used in this research. returns the numeric values and not the actual enum + */ + public static byte[] getResearchTags(String key) { + ResearchItem rr = research.get(key); + if (rr==null) return null; + byte[] output = new byte[rr.tags.size()]; + EnumTag[] et = rr.tags.getAspects(); + for (int a=0;aamt) { + t=tag.id; + amt=rr.tags.getAmount(tag); + }; + } + return t; + } + + public static int getResearchAmount(String key, EnumTag tag) { + ResearchItem rr = research.get(key); + if (rr==null) return 0; + return rr.tags.getAmount(tag); + } + +} diff --git a/common/thaumcraft/api/research/ResearchPlayer.java b/common/thaumcraft/api/research/ResearchPlayer.java new file mode 100644 index 0000000..8131fb2 --- /dev/null +++ b/common/thaumcraft/api/research/ResearchPlayer.java @@ -0,0 +1,14 @@ +package thaumcraft.api.research; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ResearchPlayer { + public Map> researchCompleted = new HashMap>(); + + public Map> objectsScanned = new HashMap>(); + public Map> entitiesScanned = new HashMap>(); + public Map> phenomenaScanned = new HashMap>(); + +} diff --git a/common/thaumcraft/api/research/ScanResult.java b/common/thaumcraft/api/research/ScanResult.java new file mode 100644 index 0000000..774ab27 --- /dev/null +++ b/common/thaumcraft/api/research/ScanResult.java @@ -0,0 +1,39 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.Entity; + +public class ScanResult { + public byte type = 0; //1=blocks,2=entities,3=phenomena + public int blockId; + public int blockMeta; + public Entity entity; + public String phenomena; + + public ScanResult(byte type, int blockId, int blockMeta, Entity entity, + String phenomena) { + super(); + this.type = type; + this.blockId = blockId; + this.blockMeta = blockMeta; + this.entity = entity; + this.phenomena = phenomena; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof ScanResult) { + ScanResult sr = (ScanResult) obj; + if (type != sr.type) + return false; + if (type == 1 + && (blockId != sr.blockId || blockMeta != sr.blockMeta)) + return false; + if (type == 2 && entity.entityId != sr.entity.entityId) + return false; + if (type == 3 && !phenomena.equals(sr.phenomena)) + return false; + } + return true; + } + +} diff --git a/mods/Experiments/textures/misc/spark.png b/mods/Experiments/textures/misc/spark.png new file mode 100644 index 0000000..2a8d8ff Binary files /dev/null and b/mods/Experiments/textures/misc/spark.png differ diff --git a/mods/MysticTextures/OreStone_.psd b/mods/MysticTextures/OreStone_.psd new file mode 100644 index 0000000..1d817cb Binary files /dev/null and b/mods/MysticTextures/OreStone_.psd differ diff --git a/mods/MysticTextures/textures/armor/adamantine_1.png b/mods/MysticTextures/textures/armor/adamantine_1.png new file mode 100644 index 0000000..30002ad Binary files /dev/null and b/mods/MysticTextures/textures/armor/adamantine_1.png differ diff --git a/mods/MysticTextures/textures/armor/adamantine_2.png b/mods/MysticTextures/textures/armor/adamantine_2.png new file mode 100644 index 0000000..2e1aaf5 Binary files /dev/null and b/mods/MysticTextures/textures/armor/adamantine_2.png differ diff --git a/mods/MysticTextures/textures/armor/iridium_1.png b/mods/MysticTextures/textures/armor/iridium_1.png new file mode 100644 index 0000000..0175d21 Binary files /dev/null and b/mods/MysticTextures/textures/armor/iridium_1.png differ diff --git a/mods/MysticTextures/textures/armor/iridium_2.png b/mods/MysticTextures/textures/armor/iridium_2.png new file mode 100644 index 0000000..ee474b7 Binary files /dev/null and b/mods/MysticTextures/textures/armor/iridium_2.png differ diff --git a/mods/MysticTextures/textures/armor/mithril_1.png b/mods/MysticTextures/textures/armor/mithril_1.png new file mode 100644 index 0000000..b8fc606 Binary files /dev/null and b/mods/MysticTextures/textures/armor/mithril_1.png differ diff --git a/mods/MysticTextures/textures/armor/mithril_2.png b/mods/MysticTextures/textures/armor/mithril_2.png new file mode 100644 index 0000000..a08c429 Binary files /dev/null and b/mods/MysticTextures/textures/armor/mithril_2.png differ diff --git a/mods/MysticTextures/textures/armor/verdite_1.png b/mods/MysticTextures/textures/armor/verdite_1.png new file mode 100644 index 0000000..5c4796c Binary files /dev/null and b/mods/MysticTextures/textures/armor/verdite_1.png differ diff --git a/mods/MysticTextures/textures/armor/verdite_2.png b/mods/MysticTextures/textures/armor/verdite_2.png new file mode 100644 index 0000000..424ff5a Binary files /dev/null and b/mods/MysticTextures/textures/armor/verdite_2.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_0.png b/mods/MysticTextures/textures/blocks/Bricks_0.png new file mode 100644 index 0000000..c55860e Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_0.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_1.png b/mods/MysticTextures/textures/blocks/Bricks_1.png new file mode 100644 index 0000000..8c8d429 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_1.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_2.png b/mods/MysticTextures/textures/blocks/Bricks_2.png new file mode 100644 index 0000000..64d9de4 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_2.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_3.png b/mods/MysticTextures/textures/blocks/Bricks_3.png new file mode 100644 index 0000000..02761a3 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_3.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_4.png b/mods/MysticTextures/textures/blocks/Bricks_4.png new file mode 100644 index 0000000..8388314 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_4.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_5.png b/mods/MysticTextures/textures/blocks/Bricks_5.png new file mode 100644 index 0000000..715a772 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_5.png differ diff --git a/mods/MysticTextures/textures/blocks/Bricks_6.png b/mods/MysticTextures/textures/blocks/Bricks_6.png new file mode 100644 index 0000000..f5aad0d Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bricks_6.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_0.png b/mods/MysticTextures/textures/blocks/Bush_0.png new file mode 100644 index 0000000..2cc463c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_0.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_1.png b/mods/MysticTextures/textures/blocks/Bush_1.png new file mode 100644 index 0000000..a335b10 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_1.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_10.png b/mods/MysticTextures/textures/blocks/Bush_10.png new file mode 100644 index 0000000..07545ca Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_10.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_11.png b/mods/MysticTextures/textures/blocks/Bush_11.png new file mode 100644 index 0000000..c850501 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_11.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_2.png b/mods/MysticTextures/textures/blocks/Bush_2.png new file mode 100644 index 0000000..482494a Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_2.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_3.png b/mods/MysticTextures/textures/blocks/Bush_3.png new file mode 100644 index 0000000..1e534ec Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_3.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_4.png b/mods/MysticTextures/textures/blocks/Bush_4.png new file mode 100644 index 0000000..5cecee8 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_4.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_5.png b/mods/MysticTextures/textures/blocks/Bush_5.png new file mode 100644 index 0000000..1af8a1c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_5.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_6.png b/mods/MysticTextures/textures/blocks/Bush_6.png new file mode 100644 index 0000000..3d04e7f Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_6.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_7.png b/mods/MysticTextures/textures/blocks/Bush_7.png new file mode 100644 index 0000000..5a7beb2 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_7.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_8.png b/mods/MysticTextures/textures/blocks/Bush_8.png new file mode 100644 index 0000000..82a682b Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_8.png differ diff --git a/mods/MysticTextures/textures/blocks/Bush_9.png b/mods/MysticTextures/textures/blocks/Bush_9.png new file mode 100644 index 0000000..6a8f8ed Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Bush_9.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_0.png b/mods/MysticTextures/textures/blocks/MysticOre_0.png new file mode 100644 index 0000000..82c3233 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_0.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_1.png b/mods/MysticTextures/textures/blocks/MysticOre_1.png new file mode 100644 index 0000000..bbc88f5 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_1.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_10.png b/mods/MysticTextures/textures/blocks/MysticOre_10.png new file mode 100644 index 0000000..d9adf3a Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_10.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_11.png b/mods/MysticTextures/textures/blocks/MysticOre_11.png new file mode 100644 index 0000000..39e7db5 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_11.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_2.png b/mods/MysticTextures/textures/blocks/MysticOre_2.png new file mode 100644 index 0000000..4406592 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_2.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_3.png b/mods/MysticTextures/textures/blocks/MysticOre_3.png new file mode 100644 index 0000000..54f5bb4 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_3.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_4.png b/mods/MysticTextures/textures/blocks/MysticOre_4.png new file mode 100644 index 0000000..66b7fbe Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_4.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_5.png b/mods/MysticTextures/textures/blocks/MysticOre_5.png new file mode 100644 index 0000000..1130413 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_5.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_6.png b/mods/MysticTextures/textures/blocks/MysticOre_6.png new file mode 100644 index 0000000..f4c741c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_6.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_7.png b/mods/MysticTextures/textures/blocks/MysticOre_7.png new file mode 100644 index 0000000..e080242 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_7.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_8.png b/mods/MysticTextures/textures/blocks/MysticOre_8.png new file mode 100644 index 0000000..8fcb269 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_8.png differ diff --git a/mods/MysticTextures/textures/blocks/MysticOre_9.png b/mods/MysticTextures/textures/blocks/MysticOre_9.png new file mode 100644 index 0000000..4262f4c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/MysticOre_9.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_0.png b/mods/MysticTextures/textures/blocks/OreStone_0.png new file mode 100644 index 0000000..332a978 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/OreStone_0.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_0.txt b/mods/MysticTextures/textures/blocks/OreStone_0.txt new file mode 100644 index 0000000..b0a7c08 --- /dev/null +++ b/mods/MysticTextures/textures/blocks/OreStone_0.txt @@ -0,0 +1,38 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +18*2 +17*2 +16*2 +15*2 +14*2 +13*2 +12*2 +11*2 +10*2 +9*2 +8*2 +7*2 +6*2 +5*2 +4*2 +3*2 +2*2 +1*2 diff --git a/mods/MysticTextures/textures/blocks/OreStone_1.png b/mods/MysticTextures/textures/blocks/OreStone_1.png new file mode 100644 index 0000000..1bfbc9c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/OreStone_1.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_1.txt b/mods/MysticTextures/textures/blocks/OreStone_1.txt new file mode 100644 index 0000000..b0a7c08 --- /dev/null +++ b/mods/MysticTextures/textures/blocks/OreStone_1.txt @@ -0,0 +1,38 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +18*2 +17*2 +16*2 +15*2 +14*2 +13*2 +12*2 +11*2 +10*2 +9*2 +8*2 +7*2 +6*2 +5*2 +4*2 +3*2 +2*2 +1*2 diff --git a/mods/MysticTextures/textures/blocks/OreStone_2.png b/mods/MysticTextures/textures/blocks/OreStone_2.png new file mode 100644 index 0000000..ba58bad Binary files /dev/null and b/mods/MysticTextures/textures/blocks/OreStone_2.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_2.txt b/mods/MysticTextures/textures/blocks/OreStone_2.txt new file mode 100644 index 0000000..b0a7c08 --- /dev/null +++ b/mods/MysticTextures/textures/blocks/OreStone_2.txt @@ -0,0 +1,38 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +18*2 +17*2 +16*2 +15*2 +14*2 +13*2 +12*2 +11*2 +10*2 +9*2 +8*2 +7*2 +6*2 +5*2 +4*2 +3*2 +2*2 +1*2 diff --git a/mods/MysticTextures/textures/blocks/OreStone_3.png b/mods/MysticTextures/textures/blocks/OreStone_3.png new file mode 100644 index 0000000..9021f3a Binary files /dev/null and b/mods/MysticTextures/textures/blocks/OreStone_3.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_3.txt b/mods/MysticTextures/textures/blocks/OreStone_3.txt new file mode 100644 index 0000000..b0a7c08 --- /dev/null +++ b/mods/MysticTextures/textures/blocks/OreStone_3.txt @@ -0,0 +1,38 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +18*2 +17*2 +16*2 +15*2 +14*2 +13*2 +12*2 +11*2 +10*2 +9*2 +8*2 +7*2 +6*2 +5*2 +4*2 +3*2 +2*2 +1*2 diff --git a/mods/MysticTextures/textures/blocks/OreStone_4.png b/mods/MysticTextures/textures/blocks/OreStone_4.png new file mode 100644 index 0000000..07e7381 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/OreStone_4.png differ diff --git a/mods/MysticTextures/textures/blocks/OreStone_4.txt b/mods/MysticTextures/textures/blocks/OreStone_4.txt new file mode 100644 index 0000000..b0a7c08 --- /dev/null +++ b/mods/MysticTextures/textures/blocks/OreStone_4.txt @@ -0,0 +1,38 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +18*2 +17*2 +16*2 +15*2 +14*2 +13*2 +12*2 +11*2 +10*2 +9*2 +8*2 +7*2 +6*2 +5*2 +4*2 +3*2 +2*2 +1*2 diff --git a/mods/MysticTextures/textures/blocks/Planks_0.png b/mods/MysticTextures/textures/blocks/Planks_0.png new file mode 100644 index 0000000..6865145 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_0.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_1.png b/mods/MysticTextures/textures/blocks/Planks_1.png new file mode 100644 index 0000000..4489600 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_1.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_2.png b/mods/MysticTextures/textures/blocks/Planks_2.png new file mode 100644 index 0000000..569c8ed Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_2.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_3.png b/mods/MysticTextures/textures/blocks/Planks_3.png new file mode 100644 index 0000000..1be53a0 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_3.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_4.png b/mods/MysticTextures/textures/blocks/Planks_4.png new file mode 100644 index 0000000..d2fd43f Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_4.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_5.png b/mods/MysticTextures/textures/blocks/Planks_5.png new file mode 100644 index 0000000..390e276 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_5.png differ diff --git a/mods/MysticTextures/textures/blocks/Planks_6.png b/mods/MysticTextures/textures/blocks/Planks_6.png new file mode 100644 index 0000000..05cfff4 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Planks_6.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_0.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_0.png new file mode 100644 index 0000000..7227b71 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_0.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_1.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_1.png new file mode 100644 index 0000000..b4e73f4 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_1.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_2.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_2.png new file mode 100644 index 0000000..3136679 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_2.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_3.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_3.png new file mode 100644 index 0000000..1e50282 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_3.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_4.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_4.png new file mode 100644 index 0000000..fc70ed5 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_4.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_5.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_5.png new file mode 100644 index 0000000..816f971 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_5.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_6.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_6.png new file mode 100644 index 0000000..d125520 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_6.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedBricks_7.png b/mods/MysticTextures/textures/blocks/ReinforcedBricks_7.png new file mode 100644 index 0000000..1c2b08c Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedBricks_7.png differ diff --git a/mods/MysticTextures/textures/blocks/ReinforcedGlass.png b/mods/MysticTextures/textures/blocks/ReinforcedGlass.png new file mode 100644 index 0000000..e898769 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/ReinforcedGlass.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_0.png b/mods/MysticTextures/textures/blocks/Stones_0.png new file mode 100644 index 0000000..a854dad Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_0.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_1.png b/mods/MysticTextures/textures/blocks/Stones_1.png new file mode 100644 index 0000000..d3abb31 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_1.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_10.png b/mods/MysticTextures/textures/blocks/Stones_10.png new file mode 100644 index 0000000..f19395e Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_10.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_11.png b/mods/MysticTextures/textures/blocks/Stones_11.png new file mode 100644 index 0000000..07dfb0d Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_11.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_12.png b/mods/MysticTextures/textures/blocks/Stones_12.png new file mode 100644 index 0000000..1fd8321 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_12.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_13.png b/mods/MysticTextures/textures/blocks/Stones_13.png new file mode 100644 index 0000000..9eaa3cb Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_13.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_2.png b/mods/MysticTextures/textures/blocks/Stones_2.png new file mode 100644 index 0000000..8bfb244 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_2.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_3.png b/mods/MysticTextures/textures/blocks/Stones_3.png new file mode 100644 index 0000000..110a6f2 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_3.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_4.png b/mods/MysticTextures/textures/blocks/Stones_4.png new file mode 100644 index 0000000..dda76c8 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_4.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_5.png b/mods/MysticTextures/textures/blocks/Stones_5.png new file mode 100644 index 0000000..5a19f18 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_5.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_6.png b/mods/MysticTextures/textures/blocks/Stones_6.png new file mode 100644 index 0000000..61267ef Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_6.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_7.png b/mods/MysticTextures/textures/blocks/Stones_7.png new file mode 100644 index 0000000..2cfa460 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_7.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_8..png b/mods/MysticTextures/textures/blocks/Stones_8..png new file mode 100644 index 0000000..8054ba3 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_8..png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_8.png b/mods/MysticTextures/textures/blocks/Stones_8.png new file mode 100644 index 0000000..8054ba3 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_8.png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_9..png b/mods/MysticTextures/textures/blocks/Stones_9..png new file mode 100644 index 0000000..cdee735 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_9..png differ diff --git a/mods/MysticTextures/textures/blocks/Stones_9.png b/mods/MysticTextures/textures/blocks/Stones_9.png new file mode 100644 index 0000000..cdee735 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/Stones_9.png differ diff --git a/mods/MysticTextures/textures/blocks/TreasureGoldSide.png b/mods/MysticTextures/textures/blocks/TreasureGoldSide.png new file mode 100644 index 0000000..2a3169e Binary files /dev/null and b/mods/MysticTextures/textures/blocks/TreasureGoldSide.png differ diff --git a/mods/MysticTextures/textures/blocks/TreasureGoldTop.png b/mods/MysticTextures/textures/blocks/TreasureGoldTop.png new file mode 100644 index 0000000..9d3c16d Binary files /dev/null and b/mods/MysticTextures/textures/blocks/TreasureGoldTop.png differ diff --git a/mods/MysticTextures/textures/blocks/TreasureIronSide.png b/mods/MysticTextures/textures/blocks/TreasureIronSide.png new file mode 100644 index 0000000..e9a2991 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/TreasureIronSide.png differ diff --git a/mods/MysticTextures/textures/blocks/TreasureIronTop.png b/mods/MysticTextures/textures/blocks/TreasureIronTop.png new file mode 100644 index 0000000..fac1d28 Binary files /dev/null and b/mods/MysticTextures/textures/blocks/TreasureIronTop.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineAxe.png b/mods/MysticTextures/textures/items/item.AdamantineAxe.png new file mode 100644 index 0000000..d5b4159 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineDust.png b/mods/MysticTextures/textures/items/item.AdamantineDust.png new file mode 100644 index 0000000..1b1e229 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineDust.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineHoe.png b/mods/MysticTextures/textures/items/item.AdamantineHoe.png new file mode 100644 index 0000000..504828c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineIngot.png b/mods/MysticTextures/textures/items/item.AdamantineIngot.png new file mode 100644 index 0000000..8e1b9d6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineIngot.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantinePickaxe.png b/mods/MysticTextures/textures/items/item.AdamantinePickaxe.png new file mode 100644 index 0000000..12b3e62 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantinePickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineShovel.png b/mods/MysticTextures/textures/items/item.AdamantineShovel.png new file mode 100644 index 0000000..8170055 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.AdamantineSword.png b/mods/MysticTextures/textures/items/item.AdamantineSword.png new file mode 100644 index 0000000..329ffce Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AdamantineSword.png differ diff --git a/mods/MysticTextures/textures/items/item.AgateGem.png b/mods/MysticTextures/textures/items/item.AgateGem.png new file mode 100644 index 0000000..2d17430 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AgateGem.png differ diff --git a/mods/MysticTextures/textures/items/item.AirStaff.png b/mods/MysticTextures/textures/items/item.AirStaff.png new file mode 100644 index 0000000..6affde6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AirStaff.png differ diff --git a/mods/MysticTextures/textures/items/item.AmethystGem.png b/mods/MysticTextures/textures/items/item.AmethystGem.png new file mode 100644 index 0000000..41a9759 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.AmethystGem.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstoneAxe.png b/mods/MysticTextures/textures/items/item.BloodstoneAxe.png new file mode 100644 index 0000000..eed6e55 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstoneAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstoneHoe.png b/mods/MysticTextures/textures/items/item.BloodstoneHoe.png new file mode 100644 index 0000000..f13a712 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstoneHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstonePickaxe.png b/mods/MysticTextures/textures/items/item.BloodstonePickaxe.png new file mode 100644 index 0000000..79a4f8b Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstonePickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstoneShard.png b/mods/MysticTextures/textures/items/item.BloodstoneShard.png new file mode 100644 index 0000000..21da3ba Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstoneShard.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstoneShovel.png b/mods/MysticTextures/textures/items/item.BloodstoneShovel.png new file mode 100644 index 0000000..a9eb00f Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstoneShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.BloodstoneSword.png b/mods/MysticTextures/textures/items/item.BloodstoneSword.png new file mode 100644 index 0000000..29940f0 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.BloodstoneSword.png differ diff --git a/mods/MysticTextures/textures/items/item.EarthStaff.png b/mods/MysticTextures/textures/items/item.EarthStaff.png new file mode 100644 index 0000000..19b0272 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.EarthStaff.png differ diff --git a/mods/MysticTextures/textures/items/item.EnergyStaff.png b/mods/MysticTextures/textures/items/item.EnergyStaff.png new file mode 100644 index 0000000..7241b59 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.EnergyStaff.png differ diff --git a/mods/MysticTextures/textures/items/item.FireStaff.png b/mods/MysticTextures/textures/items/item.FireStaff.png new file mode 100644 index 0000000..2a58182 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.FireStaff.png differ diff --git a/mods/MysticTextures/textures/items/item.GlassShard.png b/mods/MysticTextures/textures/items/item.GlassShard.png new file mode 100644 index 0000000..27e3e36 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.GlassShard.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumAxe.png b/mods/MysticTextures/textures/items/item.IridiumAxe.png new file mode 100644 index 0000000..9f39f25 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumHoe.png b/mods/MysticTextures/textures/items/item.IridiumHoe.png new file mode 100644 index 0000000..12adbd6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumIngot.png b/mods/MysticTextures/textures/items/item.IridiumIngot.png new file mode 100644 index 0000000..c21e30a Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumIngot.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumNugget.png b/mods/MysticTextures/textures/items/item.IridiumNugget.png new file mode 100644 index 0000000..ef752f4 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumNugget.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumPickaxe.png b/mods/MysticTextures/textures/items/item.IridiumPickaxe.png new file mode 100644 index 0000000..b096f2c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumPickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumShovel.png b/mods/MysticTextures/textures/items/item.IridiumShovel.png new file mode 100644 index 0000000..1ac907e Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.IridiumSword.png b/mods/MysticTextures/textures/items/item.IridiumSword.png new file mode 100644 index 0000000..a7977f7 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.IridiumSword.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilAxe.png b/mods/MysticTextures/textures/items/item.MithrilAxe.png new file mode 100644 index 0000000..8b16236 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilDust.png b/mods/MysticTextures/textures/items/item.MithrilDust.png new file mode 100644 index 0000000..b497101 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilDust.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilHoe.png b/mods/MysticTextures/textures/items/item.MithrilHoe.png new file mode 100644 index 0000000..6c3c850 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilIngot.png b/mods/MysticTextures/textures/items/item.MithrilIngot.png new file mode 100644 index 0000000..081c4f5 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilIngot.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilPickaxe.png b/mods/MysticTextures/textures/items/item.MithrilPickaxe.png new file mode 100644 index 0000000..642d440 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilPickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilShovel.png b/mods/MysticTextures/textures/items/item.MithrilShovel.png new file mode 100644 index 0000000..a41f1c6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.MithrilSword.png b/mods/MysticTextures/textures/items/item.MithrilSword.png new file mode 100644 index 0000000..e0e90a5 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MithrilSword.png differ diff --git a/mods/MysticTextures/textures/items/item.MysticPowder.png b/mods/MysticTextures/textures/items/item.MysticPowder.png new file mode 100644 index 0000000..f910a23 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.MysticPowder.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianAxe.png b/mods/MysticTextures/textures/items/item.ObsidianAxe.png new file mode 100644 index 0000000..52e7dcc Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianHoe.png b/mods/MysticTextures/textures/items/item.ObsidianHoe.png new file mode 100644 index 0000000..9037318 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianPickaxe.png b/mods/MysticTextures/textures/items/item.ObsidianPickaxe.png new file mode 100644 index 0000000..3bffbc0 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianPickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianRod.png b/mods/MysticTextures/textures/items/item.ObsidianRod.png new file mode 100644 index 0000000..24478d8 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianRod.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianShard.png b/mods/MysticTextures/textures/items/item.ObsidianShard.png new file mode 100644 index 0000000..390fd00 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianShard.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianShovel.png b/mods/MysticTextures/textures/items/item.ObsidianShovel.png new file mode 100644 index 0000000..5208ec8 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.ObsidianSword.png b/mods/MysticTextures/textures/items/item.ObsidianSword.png new file mode 100644 index 0000000..1451910 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.ObsidianSword.png differ diff --git a/mods/MysticTextures/textures/items/item.Satchel.png b/mods/MysticTextures/textures/items/item.Satchel.png new file mode 100644 index 0000000..0ad6313 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.Satchel.png differ diff --git a/mods/MysticTextures/textures/items/item.TopazGem.png b/mods/MysticTextures/textures/items/item.TopazGem.png new file mode 100644 index 0000000..2fcc2bf Binary files /dev/null and b/mods/MysticTextures/textures/items/item.TopazGem.png differ diff --git a/mods/MysticTextures/textures/items/item.TourmalineGem.png b/mods/MysticTextures/textures/items/item.TourmalineGem.png new file mode 100644 index 0000000..a2fad17 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.TourmalineGem.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeAxe.png b/mods/MysticTextures/textures/items/item.VerditeAxe.png new file mode 100644 index 0000000..5503bbd Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeAxe.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeDust.png b/mods/MysticTextures/textures/items/item.VerditeDust.png new file mode 100644 index 0000000..2f8cfa6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeDust.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeHoe.png b/mods/MysticTextures/textures/items/item.VerditeHoe.png new file mode 100644 index 0000000..fc05563 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeHoe.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeIngot.png b/mods/MysticTextures/textures/items/item.VerditeIngot.png new file mode 100644 index 0000000..bc2239c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeIngot.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditePickaxe.png b/mods/MysticTextures/textures/items/item.VerditePickaxe.png new file mode 100644 index 0000000..b16d4c6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditePickaxe.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeShovel.png b/mods/MysticTextures/textures/items/item.VerditeShovel.png new file mode 100644 index 0000000..e9bf4d6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeShovel.png differ diff --git a/mods/MysticTextures/textures/items/item.VerditeSword.png b/mods/MysticTextures/textures/items/item.VerditeSword.png new file mode 100644 index 0000000..1359b5f Binary files /dev/null and b/mods/MysticTextures/textures/items/item.VerditeSword.png differ diff --git a/mods/MysticTextures/textures/items/item.WaterStaff.png b/mods/MysticTextures/textures/items/item.WaterStaff.png new file mode 100644 index 0000000..50c6610 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.WaterStaff.png differ diff --git a/mods/MysticTextures/textures/items/item.bootsAdamantine.png b/mods/MysticTextures/textures/items/item.bootsAdamantine.png new file mode 100644 index 0000000..ded7c8c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.bootsAdamantine.png differ diff --git a/mods/MysticTextures/textures/items/item.bootsIridium.png b/mods/MysticTextures/textures/items/item.bootsIridium.png new file mode 100644 index 0000000..44f4980 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.bootsIridium.png differ diff --git a/mods/MysticTextures/textures/items/item.bootsMithril.png b/mods/MysticTextures/textures/items/item.bootsMithril.png new file mode 100644 index 0000000..c225ba9 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.bootsMithril.png differ diff --git a/mods/MysticTextures/textures/items/item.bootsVerdite.png b/mods/MysticTextures/textures/items/item.bootsVerdite.png new file mode 100644 index 0000000..bc1e181 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.bootsVerdite.png differ diff --git a/mods/MysticTextures/textures/items/item.charge_0.png b/mods/MysticTextures/textures/items/item.charge_0.png new file mode 100644 index 0000000..99344f4 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.charge_0.png differ diff --git a/mods/MysticTextures/textures/items/item.charge_0.txt b/mods/MysticTextures/textures/items/item.charge_0.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/MysticTextures/textures/items/item.charge_1.png b/mods/MysticTextures/textures/items/item.charge_1.png new file mode 100644 index 0000000..50f0c46 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.charge_1.png differ diff --git a/mods/MysticTextures/textures/items/item.charge_2.png b/mods/MysticTextures/textures/items/item.charge_2.png new file mode 100644 index 0000000..95d15e3 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.charge_2.png differ diff --git a/mods/MysticTextures/textures/items/item.charge_2.txt b/mods/MysticTextures/textures/items/item.charge_2.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/MysticTextures/textures/items/item.charge_3.png b/mods/MysticTextures/textures/items/item.charge_3.png new file mode 100644 index 0000000..db96aaf Binary files /dev/null and b/mods/MysticTextures/textures/items/item.charge_3.png differ diff --git a/mods/MysticTextures/textures/items/item.charge_4.png b/mods/MysticTextures/textures/items/item.charge_4.png new file mode 100644 index 0000000..3f182b3 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.charge_4.png differ diff --git a/mods/MysticTextures/textures/items/item.chestplateAdamantine.png b/mods/MysticTextures/textures/items/item.chestplateAdamantine.png new file mode 100644 index 0000000..0e823f7 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.chestplateAdamantine.png differ diff --git a/mods/MysticTextures/textures/items/item.chestplateIridium.png b/mods/MysticTextures/textures/items/item.chestplateIridium.png new file mode 100644 index 0000000..f25b7c4 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.chestplateIridium.png differ diff --git a/mods/MysticTextures/textures/items/item.chestplateMithril.png b/mods/MysticTextures/textures/items/item.chestplateMithril.png new file mode 100644 index 0000000..8aef09d Binary files /dev/null and b/mods/MysticTextures/textures/items/item.chestplateMithril.png differ diff --git a/mods/MysticTextures/textures/items/item.chestplateVerdite.png b/mods/MysticTextures/textures/items/item.chestplateVerdite.png new file mode 100644 index 0000000..bd33561 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.chestplateVerdite.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_0.png b/mods/MysticTextures/textures/items/item.fruit_0.png new file mode 100644 index 0000000..b980d6f Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_0.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_1.png b/mods/MysticTextures/textures/items/item.fruit_1.png new file mode 100644 index 0000000..cbd8855 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_1.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_10.png b/mods/MysticTextures/textures/items/item.fruit_10.png new file mode 100644 index 0000000..eac3280 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_10.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_11.png b/mods/MysticTextures/textures/items/item.fruit_11.png new file mode 100644 index 0000000..55dcb79 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_11.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_2.png b/mods/MysticTextures/textures/items/item.fruit_2.png new file mode 100644 index 0000000..5fe9dfb Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_2.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_3.png b/mods/MysticTextures/textures/items/item.fruit_3.png new file mode 100644 index 0000000..dc7ba8c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_3.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_4.png b/mods/MysticTextures/textures/items/item.fruit_4.png new file mode 100644 index 0000000..4bdd69a Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_4.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_5.png b/mods/MysticTextures/textures/items/item.fruit_5.png new file mode 100644 index 0000000..59a8a3e Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_5.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_6.png b/mods/MysticTextures/textures/items/item.fruit_6.png new file mode 100644 index 0000000..e8a3c16 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_6.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_7.png b/mods/MysticTextures/textures/items/item.fruit_7.png new file mode 100644 index 0000000..ebf9fed Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_7.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_8.png b/mods/MysticTextures/textures/items/item.fruit_8.png new file mode 100644 index 0000000..abb14c8 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_8.png differ diff --git a/mods/MysticTextures/textures/items/item.fruit_9.png b/mods/MysticTextures/textures/items/item.fruit_9.png new file mode 100644 index 0000000..030fdbc Binary files /dev/null and b/mods/MysticTextures/textures/items/item.fruit_9.png differ diff --git a/mods/MysticTextures/textures/items/item.helmetAdamantine.png b/mods/MysticTextures/textures/items/item.helmetAdamantine.png new file mode 100644 index 0000000..7d3703f Binary files /dev/null and b/mods/MysticTextures/textures/items/item.helmetAdamantine.png differ diff --git a/mods/MysticTextures/textures/items/item.helmetIridium.png b/mods/MysticTextures/textures/items/item.helmetIridium.png new file mode 100644 index 0000000..9d5527c Binary files /dev/null and b/mods/MysticTextures/textures/items/item.helmetIridium.png differ diff --git a/mods/MysticTextures/textures/items/item.helmetMithril.png b/mods/MysticTextures/textures/items/item.helmetMithril.png new file mode 100644 index 0000000..bb2886d Binary files /dev/null and b/mods/MysticTextures/textures/items/item.helmetMithril.png differ diff --git a/mods/MysticTextures/textures/items/item.helmetVerdite.png b/mods/MysticTextures/textures/items/item.helmetVerdite.png new file mode 100644 index 0000000..6909f39 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.helmetVerdite.png differ diff --git a/mods/MysticTextures/textures/items/item.leggingsAdamantine.png b/mods/MysticTextures/textures/items/item.leggingsAdamantine.png new file mode 100644 index 0000000..a9dbe5a Binary files /dev/null and b/mods/MysticTextures/textures/items/item.leggingsAdamantine.png differ diff --git a/mods/MysticTextures/textures/items/item.leggingsIridium.png b/mods/MysticTextures/textures/items/item.leggingsIridium.png new file mode 100644 index 0000000..24887f6 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.leggingsIridium.png differ diff --git a/mods/MysticTextures/textures/items/item.leggingsMithril.png b/mods/MysticTextures/textures/items/item.leggingsMithril.png new file mode 100644 index 0000000..1850518 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.leggingsMithril.png differ diff --git a/mods/MysticTextures/textures/items/item.leggingsVerdite.png b/mods/MysticTextures/textures/items/item.leggingsVerdite.png new file mode 100644 index 0000000..f288ad0 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.leggingsVerdite.png differ diff --git a/mods/MysticTextures/textures/items/item.shard_0.png b/mods/MysticTextures/textures/items/item.shard_0.png new file mode 100644 index 0000000..cf3e655 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.shard_0.png differ diff --git a/mods/MysticTextures/textures/items/item.shard_1.png b/mods/MysticTextures/textures/items/item.shard_1.png new file mode 100644 index 0000000..898b0ec Binary files /dev/null and b/mods/MysticTextures/textures/items/item.shard_1.png differ diff --git a/mods/MysticTextures/textures/items/item.shard_2.png b/mods/MysticTextures/textures/items/item.shard_2.png new file mode 100644 index 0000000..0d09268 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.shard_2.png differ diff --git a/mods/MysticTextures/textures/items/item.shard_3.png b/mods/MysticTextures/textures/items/item.shard_3.png new file mode 100644 index 0000000..ddca8d8 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.shard_3.png differ diff --git a/mods/MysticTextures/textures/items/item.shard_4.png b/mods/MysticTextures/textures/items/item.shard_4.png new file mode 100644 index 0000000..c4c4f78 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.shard_4.png differ diff --git a/mods/MysticTextures/textures/items/item.staff_0.png b/mods/MysticTextures/textures/items/item.staff_0.png new file mode 100644 index 0000000..02bb26d Binary files /dev/null and b/mods/MysticTextures/textures/items/item.staff_0.png differ diff --git a/mods/MysticTextures/textures/items/item.staff_1.png b/mods/MysticTextures/textures/items/item.staff_1.png new file mode 100644 index 0000000..eac0e03 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.staff_1.png differ diff --git a/mods/MysticTextures/textures/items/item.staff_2.png b/mods/MysticTextures/textures/items/item.staff_2.png new file mode 100644 index 0000000..d4464e9 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.staff_2.png differ diff --git a/mods/MysticTextures/textures/items/item.staff_3.png b/mods/MysticTextures/textures/items/item.staff_3.png new file mode 100644 index 0000000..2b5ea51 Binary files /dev/null and b/mods/MysticTextures/textures/items/item.staff_3.png differ diff --git a/mods/MysticTextures/textures/misc/airFX.png b/mods/MysticTextures/textures/misc/airFX.png new file mode 100644 index 0000000..acaf35c Binary files /dev/null and b/mods/MysticTextures/textures/misc/airFX.png differ diff --git a/mods/MysticTextures/textures/misc/earthFX.png b/mods/MysticTextures/textures/misc/earthFX.png new file mode 100644 index 0000000..29a7ebc Binary files /dev/null and b/mods/MysticTextures/textures/misc/earthFX.png differ diff --git a/mods/MysticTextures/textures/misc/energyFX.png b/mods/MysticTextures/textures/misc/energyFX.png new file mode 100644 index 0000000..ee14858 Binary files /dev/null and b/mods/MysticTextures/textures/misc/energyFX.png differ diff --git a/mods/MysticTextures/textures/misc/fireFX.png b/mods/MysticTextures/textures/misc/fireFX.png new file mode 100644 index 0000000..9ddab16 Binary files /dev/null and b/mods/MysticTextures/textures/misc/fireFX.png differ diff --git a/mods/MysticTextures/textures/misc/tornadoFX.png b/mods/MysticTextures/textures/misc/tornadoFX.png new file mode 100644 index 0000000..81576ec Binary files /dev/null and b/mods/MysticTextures/textures/misc/tornadoFX.png differ diff --git a/mods/MysticTextures/textures/misc/waterFX.png b/mods/MysticTextures/textures/misc/waterFX.png new file mode 100644 index 0000000..a037eaf Binary files /dev/null and b/mods/MysticTextures/textures/misc/waterFX.png differ diff --git a/mods/MysticTextures/textures/mob/MysticVillager.png b/mods/MysticTextures/textures/mob/MysticVillager.png new file mode 100644 index 0000000..2f75b7c Binary files /dev/null and b/mods/MysticTextures/textures/mob/MysticVillager.png differ diff --git a/mods/powersouls/textures/misc/powersoul.png b/mods/powersouls/textures/misc/powersoul.png new file mode 100644 index 0000000..e20a5d1 Binary files /dev/null and b/mods/powersouls/textures/misc/powersoul.png differ diff --git a/test builds/Mystic Ores [1.6].zip b/test builds/Mystic Ores [1.6].zip new file mode 100644 index 0000000..6718b7d Binary files /dev/null and b/test builds/Mystic Ores [1.6].zip differ diff --git a/test builds/Mystic Ruins [1.6].zip b/test builds/Mystic Ruins [1.6].zip new file mode 100644 index 0000000..724cc16 Binary files /dev/null and b/test builds/Mystic Ruins [1.6].zip differ diff --git a/test builds/Mystic Stones [1.6].zip b/test builds/Mystic Stones [1.6].zip new file mode 100644 index 0000000..3b0e417 Binary files /dev/null and b/test builds/Mystic Stones [1.6].zip differ diff --git a/test builds/Mystic World [1.0].zip b/test builds/Mystic World [1.0].zip new file mode 100644 index 0000000..53ea597 Binary files /dev/null and b/test builds/Mystic World [1.0].zip differ