summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/item/ItemRing.java
diff options
context:
space:
mode:
Diffstat (limited to 'common/darkknight/jewelrycraft/item/ItemRing.java')
-rw-r--r--common/darkknight/jewelrycraft/item/ItemRing.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/darkknight/jewelrycraft/item/ItemRing.java b/common/darkknight/jewelrycraft/item/ItemRing.java
index 368cde3..900039b 100644
--- a/common/darkknight/jewelrycraft/item/ItemRing.java
+++ b/common/darkknight/jewelrycraft/item/ItemRing.java
@@ -14,6 +14,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.container.GuiHandler;
import darkknight.jewelrycraft.util.JewelryNBT;
import net.minecraft.block.Block;
@@ -103,7 +104,7 @@ public class ItemRing extends Item
red = (icon.getRGB(x, y) >> 16) & 0xFF;
green = (icon.getRGB(x, y) >> 8) & 0xFF;
blue = icon.getRGB(x, y) & 0xFF;
- if((red <= 80 && green <=80 && blue <= 80) || (red >= 180 && green >= 180 && blue >= 180))
+ if((red <= 80 && green <= 80 && blue <= 80) || (red >= 180 && green >= 180 && blue >= 180))
{
if(x<icon.getTileWidth()-1) x++;
if(x>=icon.getTileWidth()-1 && y<icon.getTileWidth()-1)
@@ -137,7 +138,7 @@ public class ItemRing extends Item
red = (icon.getRGB(x, y) >> 16) & 0xFF;
green = (icon.getRGB(x, y) >> 8) & 0xFF;
blue = icon.getRGB(x, y) & 0xFF;
- if((red <= 80 && green <=80 && blue <= 80) || (red >= 180 && green >= 180 && blue >= 180))
+ if((red <= 95 && green <= 95 && blue <= 95) || (red >= 180 && green >= 180 && blue >= 180))
{
if(x<icon.getTileWidth()-1) x++;
if(x>=icon.getTileWidth()-1 && y<icon.getTileWidth()-1)
@@ -202,7 +203,7 @@ public class ItemRing extends Item
int id = world.getBlockId(i, j, k);
if (id != 0 && Block.blocksList[id] != null && Block.blocksList[id].blockID == Block.chest.blockID){
TileEntity tile = world.getBlockTileEntity(i, j, k);
- if (tile != null && tile instanceof TileEntityChest) FMLNetworkHandler.openGui(player, JewelrycraftMod.instance, 0, world, i, j, k);
+ if (tile != null && tile instanceof TileEntityChest) FMLNetworkHandler.openGui(player, JewelrycraftMod.instance, GuiHandler.GuiId.ringChest.ordinal(), world, i, j, k);
}
}
else if(i != -1 && j != -1 && k != -1) player.addChatMessage("Chest out of range! You need to be " + ((int)player.getDistance(i + 0.5F, j + 0.5F, k + 0.5F) - 127) + " blocks closer.");