From d24610896ebc3135731610cad6345ece86e0b012 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Mon, 1 Apr 2013 16:10:09 +1100 Subject: [PATCH] Revert "Revert "Fixed all the tools being swords, fixed the duplicate messages on creation of the Promised Lands portal as well as fancying it up :) Also fixed a bug where you could get an endless supply of endstone by recreating the portal."" This reverts commit 9f8c33526e98c4464d5faf4e6185f851222035d1. --- .../biomesop/items/ItemAncientStaff.java | 226 +++++++++--------- .../tdwp_ftw/biomesop/items/ItemBOPAxe.java | 3 +- .../tdwp_ftw/biomesop/items/ItemBOPHoe.java | 3 +- .../biomesop/items/ItemBOPPickaxe.java | 3 +- .../tdwp_ftw/biomesop/items/ItemBOPSpade.java | 3 +- 5 files changed, 125 insertions(+), 113 deletions(-) diff --git a/src/minecraft/tdwp_ftw/biomesop/items/ItemAncientStaff.java b/src/minecraft/tdwp_ftw/biomesop/items/ItemAncientStaff.java index 9661d0ed7..4d61cadad 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/ItemAncientStaff.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/ItemAncientStaff.java @@ -35,117 +35,125 @@ public class ItemAncientStaff extends Item public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (par3EntityPlayer.dimension == 0) + { + + if (par2World.getBlockId(0, 64 - 32, 0) != mod_BiomesOPlenty.promisedPortal.blockID) { - par3EntityPlayer.addChatMessage("A gateway to the Promised Land 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); - - par2World.setBlock(0, 64 - var99, 0, mod_BiomesOPlenty.promisedPortal.blockID); - - 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); + + 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); + + par2World.setBlock(0, 64 - var99, 0, mod_BiomesOPlenty.promisedPortal.blockID); + + 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); } - + } + return par1ItemStack; } } diff --git a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPAxe.java b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPAxe.java index 2eb524fc1..b41880cfa 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPAxe.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPAxe.java @@ -2,9 +2,10 @@ package tdwp_ftw.biomesop.items; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemSword; -public class ItemBOPAxe extends ItemSword +public class ItemBOPAxe extends ItemAxe { public int TextureID = 0; diff --git a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPHoe.java b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPHoe.java index 69f6c1940..e0d8655b4 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPHoe.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPHoe.java @@ -2,9 +2,10 @@ package tdwp_ftw.biomesop.items; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemSword; -public class ItemBOPHoe extends ItemSword +public class ItemBOPHoe extends ItemHoe { public int TextureID = 0; diff --git a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPPickaxe.java b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPPickaxe.java index 3202d6e42..ca00102eb 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPPickaxe.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPPickaxe.java @@ -2,9 +2,10 @@ package tdwp_ftw.biomesop.items; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSword; -public class ItemBOPPickaxe extends ItemSword +public class ItemBOPPickaxe extends ItemPickaxe { public int TextureID = 0; diff --git a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSpade.java b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSpade.java index 47146ac86..4f2a26122 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSpade.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSpade.java @@ -2,9 +2,10 @@ package tdwp_ftw.biomesop.items; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemSword; -public class ItemBOPSpade extends ItemSword +public class ItemBOPSpade extends ItemSpade { public int TextureID = 0;