Trying to fix stuff :/
This commit is contained in:
parent
6c22a5b00f
commit
e1d8dcff07
343 changed files with 0 additions and 16443 deletions
|
|
@ -1,45 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,249 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
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<ItemStack> 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<ItemStack> 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<ItemStack> 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package MysticOres.Items;
|
||||
|
||||
public class ItemIridiumNugget {
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
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!");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package MysticOres.Lib;
|
||||
|
||||
public class BlockIds {
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package MysticOres.Lib;
|
||||
|
||||
public class ItemIds {
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package MysticOres.Lib;
|
||||
|
||||
public class Strings {
|
||||
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,572 +0,0 @@
|
|||
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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,553 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,553 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
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;;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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){
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,251 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,233 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue