summaryrefslogtreecommitdiff
path: root/java/darkknight/jewelrycraft/container/GuiTabBlocks.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/darkknight/jewelrycraft/container/GuiTabBlocks.java')
-rw-r--r--java/darkknight/jewelrycraft/container/GuiTabBlocks.java128
1 files changed, 66 insertions, 62 deletions
diff --git a/java/darkknight/jewelrycraft/container/GuiTabBlocks.java b/java/darkknight/jewelrycraft/container/GuiTabBlocks.java
index 237466c..c48aaa8 100644
--- a/java/darkknight/jewelrycraft/container/GuiTabBlocks.java
+++ b/java/darkknight/jewelrycraft/container/GuiTabBlocks.java
@@ -1,7 +1,7 @@
package darkknight.jewelrycraft.container;
-import java.util.ArrayList;
-
+import java.awt.Desktop;
+import java.net.URL;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -13,23 +13,35 @@ import darkknight.jewelrycraft.item.ItemList;
public class GuiTabBlocks extends GuiTab
{
+ /**
+ * @param id
+ */
public GuiTabBlocks(int id)
{
super("Blocks", id);
}
+ /**
+ * @return
+ */
+ @Override
public ItemStack getIcon()
{
return new ItemStack(BlockList.jewelAltar);
}
+ /**
+ * @param gui
+ * @param x
+ * @param y
+ * @param page
+ */
@Override
public void drawBackground(GuiGuide gui, int x, int y, int page)
{
String text = "";
- ArrayList<ItemStack> items = new ArrayList<ItemStack>();
- int xPos = (page % 2 == 0) ? 107 : -35;
- switch (page)
+ int xPos = page % 2 == 0 ? 107 : -35;
+ switch(page)
{
case 1:
text = "This ore is extremely rare and can be found only between Y-level 5 and 8. It can only be mined using a diamond pickaxe.";
@@ -37,10 +49,7 @@ public class GuiTabBlocks extends GuiTab
break;
case 2:
text = "The Shadow Block is crafted using 9 shadow ingots. Magicians believed it held the ability to merge with the shadows. It becomes more transparent as it";
- items.add(new ItemStack(BlockList.shadowBlock));
- for (int i = 1; i <= 9; i++)
- items.add(new ItemStack(ItemList.shadowIngot));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.shadowBlock), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot), new ItemStack(ItemList.shadowIngot));
break;
case 3:
text = "gets darker. If a comparator is attached to it, the output strength will be equal to the value of darkness it is in.";
@@ -48,17 +57,7 @@ public class GuiTabBlocks extends GuiTab
break;
case 4:
text = "The smelter is one of the first blocks needed to get started with Jewelrycraft. Requiring just some cobble and a couple buckets. It is required in order to";
- items.add(new ItemStack(BlockList.smelter));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(new ItemStack(Items.bucket));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(null);
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(new ItemStack(Items.lava_bucket));
- items.add(new ItemStack(Blocks.cobblestone));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.smelter), new ItemStack(Blocks.cobblestone), new ItemStack(Items.bucket), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.cobblestone));
break;
case 5:
text = "melt ingots or even ores which can be made into rings, necklaces, bracelets or earrings. To use the block all you need to do is right click on it with any ore or ingot. It can melt multimple ingots/ores at a time. Crouch (default: Shift) + Right Click will remove all items";
@@ -70,14 +69,7 @@ public class GuiTabBlocks extends GuiTab
break;
case 7:
text = "The molder is a key piece in creating jewellery. You need to pour the molten metal out of the smelter somewhere. That somewhere is the";
-
- items.add(new ItemStack(BlockList.molder));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(null);
- items.add(new ItemStack(Blocks.cobblestone));
- for (int i = 1; i <= 3; i++)
- items.add(new ItemStack(Blocks.cobblestone));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.molder), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone));
break;
case 8:
text = "molder. But before pouring the molten metal in it, you must first add a mold. You can do that by simply right clicking the block with the mold of your choice. If you want to get the mold out, simply crouch and Right Click it with an empty hand. Once you";
@@ -93,16 +85,7 @@ public class GuiTabBlocks extends GuiTab
del++;
if (del >= 300) del = 0;
if (values >= 4) values = 0;
- items.add(new ItemStack(BlockList.jewelCraftingTable));
- for (int i = 1; i <= 3; i++)
- items.add(new ItemStack(Blocks.planks, 1, values));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(null);
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(new ItemStack(Blocks.cobblestone));
- items.add(null);
- items.add(new ItemStack(Blocks.cobblestone));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.jewelCraftingTable), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.planks, 1, values), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.cobblestone), null, new ItemStack(Blocks.cobblestone));
break;
case 11:
text = "can find a list with all possible gems in this guide). Crouch + Right Click to retreive placed items. Left Click the block to see the progress the crafting has made. Once the crafting is done, Left Click the block to get the item. You are able to recraft a";
@@ -114,17 +97,7 @@ public class GuiTabBlocks extends GuiTab
break;
case 13:
text = "This block can store any jewellery in it and activate their effects as it were a player. To do that simply right click the block with a jewellery. Crouch +";
- items.add(new ItemStack(BlockList.jewelAltar));
- items.add(new ItemStack(Blocks.end_stone));
- items.add(new ItemStack(Blocks.wool, 1, 5));
- items.add(new ItemStack(Blocks.end_stone));
- items.add(new ItemStack(Blocks.nether_brick));
- items.add(new ItemStack(Blocks.wool, 1, 5));
- items.add(new ItemStack(Blocks.nether_brick));
- items.add(new ItemStack(Blocks.nether_brick));
- items.add(new ItemStack(Blocks.nether_brick));
- items.add(new ItemStack(Blocks.nether_brick));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.jewelAltar), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick));
break;
case 14:
text = "Right Click to retreive the jewellery.";
@@ -132,17 +105,7 @@ public class GuiTabBlocks extends GuiTab
break;
case 15:
text = "The Storage Displayer, as the name suggests, can store a large amount (Up to: " + Integer.MAX_VALUE + ") of a single item/block placed in it. It will";
- items.add(new ItemStack(BlockList.displayer));
- items.add(null);
- items.add(new ItemStack(Items.iron_ingot));
- items.add(null);
- items.add(new ItemStack(Items.iron_ingot));
- items.add(new ItemStack(Items.iron_ingot));
- items.add(new ItemStack(Items.iron_ingot));
- items.add(new ItemStack(Blocks.emerald_block));
- items.add(new ItemStack(Blocks.emerald_block));
- items.add(new ItemStack(Blocks.emerald_block));
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, items, x, y);
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.displayer), null, new ItemStack(Items.iron_ingot), null, new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block));
break;
case 16:
text = "display all possible infromation about the object in it, such as the name, durability, enchantments etc. To store something in it simply right click with that object on it and the whole amount of items or blocks you are holding will be immediately stored inside.";
@@ -156,19 +119,60 @@ public class GuiTabBlocks extends GuiTab
text = "get a whole stack, Crouch + Left Click on it. In creative mode you can simply hold Right Click on a displayer containing an object and it will add 64 of it with every right click, without it being in your inventory.";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
+ case 19:
+ text = "This mysterious shaped block is used in the ritual. The acient ones claimed it had the power to travel through worlds. They would use these to offer";
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.handPedestal), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), null, new ItemStack(Blocks.stonebrick), null, new ItemStack(Blocks.stone_slab, 1, 5), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stone_slab, 1, 5));
+ break;
+ case 20:
+ text = "sacrifices to 'The Dark One' in exchange for unimaginable powers.";
+ Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
+ break;
+ case 21:
+ text = "The Cursed Eye is an ancient artifact also known as 'The Dark One's Eye'. It is part of the sacrifice ritual the ancient ones talk about. Be careful";
+ Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, new ItemStack(BlockList.shadowEye), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Items.ender_eye), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick));
+ break;
+ case 22:
+ String link = "HERE";
+ if (x >= gui.getLeft() + 130 && x <= gui.getLeft() + 160 && y >= gui.getTop() + 40 && y <= gui.getTop() + 50) link = EnumChatFormatting.DARK_BLUE + "HERE" + EnumChatFormatting.BLACK;
+ text = "though, for He sees everything. To see how to create the ritual click " + link + " for a link with the pictures (will be part of the book later).";
+ Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
+ break;
default:
;
}
}
+ /**
+ * @return
+ */
+ @Override
public int getMaxPages()
{
- return 17;
+ return 21;
}
+ /**
+ * @param gui
+ * @param x
+ * @param y
+ * @param button
+ */
@Override
- public void drawForeground(GuiGuide gui, int x, int y, int page)
+ public void mouseClick(GuiGuide gui, int x, int y, int button)
{
+ if (gui.page == 21 && x >= gui.getLeft() + 130 && x <= gui.getLeft() + 160 && y >= gui.getTop() + 40 && y <= gui.getTop() + 50) try{
+ Desktop.getDesktop().browse(new URL("http://imgur.com/a/Zk0LW").toURI());
+ }
+ catch(Exception e){}
}
+ /**
+ * @param gui
+ * @param x
+ * @param y
+ * @param page
+ */
+ @Override
+ public void drawForeground(GuiGuide gui, int x, int y, int page)
+ {}
}