From c5e04f2c8e0c5393d9a5ef63a87ae4f0094af301 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Thu, 7 May 2015 13:34:21 +0100 Subject: - Added EE3 EMC values, thank you to MineMarteen for providing the ThirdPartyManager code :) - Working on making it possible to translate every part of the mod - Created an interface modders can use to make an item wearable in the jewelry inventory and have special effects --- .../client/gui/GuiTabIntroduction.java | 2 +- .../jewelrycraft/client/gui/GuiTabItems.java | 12 ++++------ .../client/gui/container/ContainerJewelryTab.java | 26 +++++----------------- .../client/gui/container/slots/SlotBracelet.java | 3 ++- .../client/gui/container/slots/SlotEarrings.java | 3 ++- .../client/gui/container/slots/SlotNecklace.java | 3 ++- .../client/gui/container/slots/SlotRing.java | 3 ++- 7 files changed, 18 insertions(+), 34 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/client') diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java index ebed63b..de84af0 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabIntroduction.java @@ -34,7 +34,7 @@ public class GuiTabIntroduction extends GuiTab Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; case 3: - text = "the gem used. To see what modifiers are currently implemented, just look in the Modifiers tab located in this guide (it is the one with the blaze powder as an icon)."; + text = "the gem used. To see what modifiers are currently implemented, just look in the Modifiers tab located in this guide (it is the one with the blaze powder as an icon). This mod was made by OnyxDarkKnight and the help of domi1819, pau101, Damien Hazard, boni and MineMarteen."; Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; } diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java index efbea61..02f9640 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabItems.java @@ -108,14 +108,10 @@ public class GuiTabItems extends GuiTab case 13: String link = "HERE"; if (x >= gui.getLeft() && x <= gui.getLeft() + 30 && y >= gui.getTop() + 104 && y <= gui.getTop() + 124) link = EnumChatFormatting.DARK_BLUE + "HERE" + EnumChatFormatting.BLACK; - text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "." + " This mod was made by OnyxDarkKnight and the help of domi1819,"; + text = "installing it so you can see all the recipes. Since you are reading this, how about making a youtube video spotlighting this mod. I'd really appreciate it. After that you can share it in the main thread " + link + "."; Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; case 14: - text = "pau101 and Damien Hazard."; - Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); - break; - case 15: ItemStack item = new ItemStack(ItemList.bucket); if (del == 0) values++; del++; @@ -125,11 +121,11 @@ public class GuiTabItems extends GuiTab text = "These buckets contain molten metal. To obtain one simply Right Click a full Smelter to get a bucket. You can pour the metal, other than that it has no use. You can place the molten metal back in a Smelter by Right Clicking one with it."; Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 5, item, text, 40f, 0, 0, true, 45, 10, true); break; - case 16: + case 15: text = "This item is a creative only item! Right click it while in creative mode to open a GUI. Place a piece of jewelery inside the slot, select what you want to add, then click on 'Add Items'. If you selected Modifiers, you can select multiple"; Page.addImageTextPage(gui, gui.getLeft() + xPos, gui.getTop() - 5, new ItemStack(ItemList.jewelryModifier), text, 40f, 0, 0, true, 45, 10, true); break; - case 17: + case 16: text = "items at once. The 'Item' button is to add an Item to a Golden Object, which can not be obtained normally. This tool can be really useful, especially for those who want to test the mod and can't wait for the normal processes to finish (Smelter, Jewelers Table, Ritual)."; Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text); break; @@ -144,7 +140,7 @@ public class GuiTabItems extends GuiTab @Override public int getMaxPages() { - return 17; + return 16; } /** diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java index 3b323e6..634782c 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/ContainerJewelryTab.java @@ -5,6 +5,7 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.client.gui.container.slots.SlotBracelet; import darkknight.jewelrycraft.client.gui.container.slots.SlotEarrings; import darkknight.jewelrycraft.client.gui.container.slots.SlotNecklace; @@ -67,29 +68,14 @@ public class ContainerJewelryTab extends Container if (slot != null && slot.getHasStack()){ ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); - // if (slotID < 18){ - // if (!mergeItemStack(itemstack1, 18, 54, true)) return null; - // slot.onSlotChange(itemstack1, itemstack); - // }else if (itemstack1.getItem() instanceof ItemRing){ - // if (!mergeItemStack(itemstack1, 0, 10, false)) return null; - // }else if (itemstack1.getItem() instanceof ItemBracelet){ - // if (!mergeItemStack(itemstack1, 10, 14, false)) return null; - // }else if (itemstack1.getItem() instanceof ItemNecklace){ - // if (!mergeItemStack(itemstack1, 14, 17, false)) return null; - // }else if (itemstack1.getItem() instanceof ItemEarrings){ - // if (!mergeItemStack(itemstack1, 17, 18, false)) return null; - // }else{ - // if (!mergeItemStack(itemstack1, 18, 54, true)) return null; - // slot.onSlotChange(itemstack1, itemstack); - // } if (slotID >= 18){ - if (itemstack.getItem() instanceof ItemRing){ + if (itemstack.getItem() instanceof ItemRing || (itemstack.getItem() instanceof IJewelryItem && ((IJewelryItem)itemstack.getItem()).type() == 0)){ if (!mergeItemStack(itemstack, 0, 10, false) && !slot.getHasStack()) return null; - }else if (itemstack.getItem() instanceof ItemBracelet){ + }else if (itemstack.getItem() instanceof ItemBracelet || (itemstack.getItem() instanceof IJewelryItem && ((IJewelryItem)itemstack.getItem()).type() == 1)){ if (!mergeItemStack(itemstack, 10, 14, false) && !slot.getHasStack()) return null; - }else if (itemstack.getItem() instanceof ItemNecklace ){ + }else if (itemstack.getItem() instanceof ItemNecklace || (itemstack.getItem() instanceof IJewelryItem && ((IJewelryItem)itemstack.getItem()).type() == 2)){ if (!mergeItemStack(itemstack, 14, 17, false) && !slot.getHasStack()) return null; - }else if (itemstack.getItem() instanceof ItemEarrings){ + }else if (itemstack.getItem() instanceof ItemEarrings || (itemstack.getItem() instanceof IJewelryItem && ((IJewelryItem)itemstack.getItem()).type() == 3)){ if (!mergeItemStack(itemstack, 17, 18, false) && !slot.getHasStack()) return null; } else{ @@ -104,8 +90,6 @@ public class ContainerJewelryTab extends Container else slot.onSlotChanged(); if (itemstack.stackSize != itemstack.stackSize) slot.onPickupFromSlot(player, itemstack); else return null; - // if (itemstack1.stackSize == 0) slot.putStack((ItemStack)null); - // else slot.onSlotChanged(); } return itemstack; } diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java index 3bdbb64..bab265b 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotBracelet.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.item.ItemBracelet; public class SlotBracelet extends Slot @@ -27,7 +28,7 @@ public class SlotBracelet extends Slot @Override public boolean isItemValid(ItemStack stack) { - return stack.getItem() instanceof ItemBracelet; + return stack.getItem() instanceof ItemBracelet || (stack.getItem() instanceof IJewelryItem && ((IJewelryItem)stack.getItem()).type() == 1); } /** diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java index de062bc..c968fc0 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotEarrings.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.item.ItemEarrings; public class SlotEarrings extends Slot @@ -27,7 +28,7 @@ public class SlotEarrings extends Slot @Override public boolean isItemValid(ItemStack stack) { - return stack.getItem() instanceof ItemEarrings; + return stack.getItem() instanceof ItemEarrings || (stack.getItem() instanceof IJewelryItem && ((IJewelryItem)stack.getItem()).type() == 3); } /** diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java index 9a64079..d102ba8 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotNecklace.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.item.ItemNecklace; public class SlotNecklace extends Slot @@ -27,7 +28,7 @@ public class SlotNecklace extends Slot @Override public boolean isItemValid(ItemStack stack) { - return stack.getItem() instanceof ItemNecklace; + return stack.getItem() instanceof ItemNecklace || (stack.getItem() instanceof IJewelryItem && ((IJewelryItem)stack.getItem()).type() == 2); } /** diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java index a52cf6b..6a7e956 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/container/slots/SlotRing.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.item.ItemRing; public class SlotRing extends Slot @@ -27,7 +28,7 @@ public class SlotRing extends Slot @Override public boolean isItemValid(ItemStack stack) { - return stack.getItem() instanceof ItemRing; + return stack.getItem() instanceof ItemRing || (stack.getItem() instanceof IJewelryItem && ((IJewelryItem)stack.getItem()).type() == 0); } /** -- cgit v1.2.3