2013-04-16 08:19:59 +00:00
|
|
|
package biomesoplenty.items;
|
2013-04-16 06:43:45 +00:00
|
|
|
|
2013-03-28 19:03:53 +00:00
|
|
|
import net.minecraft.block.Block;
|
2013-03-30 10:54:53 +00:00
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
2013-03-28 19:03:53 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.world.World;
|
2013-04-22 16:14:07 +00:00
|
|
|
import biomesoplenty.api.Blocks;
|
2013-03-28 19:03:53 +00:00
|
|
|
|
|
|
|
public class ItemAncientStaff extends Item
|
|
|
|
{
|
|
|
|
public ItemAncientStaff(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
this.maxStackSize = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean hasEffect(ItemStack par1ItemStack)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2013-03-30 10:54:53 +00:00
|
|
|
|
2013-04-16 23:34:18 +00:00
|
|
|
public void registerIcons(IconRegister iconRegister)
|
2013-03-30 10:54:53 +00:00
|
|
|
{
|
2013-04-16 23:34:18 +00:00
|
|
|
itemIcon = iconRegister.registerIcon("BiomesOPlenty:ancientstaff");
|
2013-03-30 10:54:53 +00:00
|
|
|
}
|
2013-03-28 19:03:53 +00:00
|
|
|
|
|
|
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
|
|
|
{
|
|
|
|
if (par3EntityPlayer.dimension == 0)
|
2013-04-01 06:24:04 +00:00
|
|
|
{
|
|
|
|
|
2013-04-20 01:26:09 +00:00
|
|
|
if (par2World.getBlockId(0, 64 - 32, 0) != Blocks.promisedPortal.get().blockID)
|
2013-03-28 19:03:53 +00:00
|
|
|
{
|
2013-04-01 06:24:04 +00:00
|
|
|
|
|
|
|
if (!par3EntityPlayer.worldObj.isRemote)
|
|
|
|
{
|
|
|
|
par3EntityPlayer.addChatMessage("\u00a75A gateway to the \u00a76\u00a7l\u00a7nPromised Land\u00a75 has been buried at the origin of this world.");
|
|
|
|
}
|
|
|
|
|
|
|
|
int var99 = 32;
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 62 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 62 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 62 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 62 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 62 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 62 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 62 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 62 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 62 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 63 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 63 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 63 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 63 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 63 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 63 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 63 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 63 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 63 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 63 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 63 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 63 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 64 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 64 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 64 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 64 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 64 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 64 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 64 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 64 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 64 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 64 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 64 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 64 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 65 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 65 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 65 - var99, 2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 65 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 65 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(2, 65 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 65 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 65 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 65 - var99, -2, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 65 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 65 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-2, 65 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 66 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 66 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 66 - var99, 1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 66 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(1, 66 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 66 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 66 - var99, -1, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(-1, 66 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
par2World.setBlock(0, 66 - var99, 0, Block.whiteStone.blockID);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 63 - var99, 1, 0);
|
|
|
|
par2World.setBlock(0, 63 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 63 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 63 - var99, 0, 0);
|
|
|
|
par2World.setBlock(1, 63 - var99, -1, 0);
|
|
|
|
par2World.setBlock(0, 63 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 63 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 63 - var99, 0, 0);
|
|
|
|
par2World.setBlock(0, 63 - var99, 0, 0);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 64 - var99, 1, 0);
|
|
|
|
par2World.setBlock(0, 64 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 64 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 64 - var99, 0, 0);
|
|
|
|
par2World.setBlock(1, 64 - var99, -1, 0);
|
|
|
|
par2World.setBlock(0, 64 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 64 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 64 - var99, 0, 0);
|
|
|
|
|
|
|
|
par2World.setBlock(-1, 65 - var99, 1, 0);
|
|
|
|
par2World.setBlock(0, 65 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 65 - var99, 1, 0);
|
|
|
|
par2World.setBlock(1, 65 - var99, 0, 0);
|
|
|
|
par2World.setBlock(1, 65 - var99, -1, 0);
|
|
|
|
par2World.setBlock(0, 65 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 65 - var99, -1, 0);
|
|
|
|
par2World.setBlock(-1, 65 - var99, 0, 0);
|
|
|
|
par2World.setBlock(0, 65 - var99, 0, 0);
|
|
|
|
|
2013-04-20 01:26:09 +00:00
|
|
|
par2World.setBlock(0, 64 - var99, 0, Blocks.promisedPortal.get().blockID);
|
2013-04-01 06:24:04 +00:00
|
|
|
|
|
|
|
par2World.setBlock(-2, 64 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 64 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 64 - var99, -2, 0);
|
|
|
|
par2World.setBlock(-2, 64 - var99, -2, 0);
|
|
|
|
|
|
|
|
par2World.setBlock(-2, 65 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 65 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 65 - var99, -2, 0);
|
|
|
|
par2World.setBlock(-2, 65 - var99, -2, 0);
|
|
|
|
|
|
|
|
par2World.setBlock(-2, 66 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 66 - var99, 2, 0);
|
|
|
|
par2World.setBlock(2, 66 - var99, -2, 0);
|
|
|
|
par2World.setBlock(-2, 66 - var99, -2, 0);
|
2013-03-28 19:03:53 +00:00
|
|
|
}
|
2013-04-01 06:24:04 +00:00
|
|
|
}
|
|
|
|
|
2013-03-28 19:03:53 +00:00
|
|
|
return par1ItemStack;
|
|
|
|
}
|
|
|
|
}
|