From acb8957bc6cea64380eaf105eaf91c355c02d2ce Mon Sep 17 00:00:00 2001 From: Fluffies Date: Wed, 2 Dec 2015 18:42:00 -0500 Subject: [PATCH] Reintroduced tool upgrades (renamed from "temporal tool modules" and the "pocket watch" before that). --- .../mods/clockworkphase2/ClockworkPhase2.java | 1 - .../api/item/IKeybindActivation.java | 12 +++ .../api/item/ITemporalToolModule.java | 20 ----- .../api/item/IToolUpgrade.java | 22 ++++++ .../block/BlockTemporalFurnace.java | 2 +- .../client/gui/GuiClockworkTool.java | 66 ++++++++++++++++ .../client/gui/GuiHandler.java | 18 ++++- .../client/gui/components/GuiButtonItem.java | 78 ++++++++++++++++++ .../client/keybind/KeyHandler.java | 27 +++++++ .../client/keybind/Keybindings.java | 10 +++ .../clockworkphase2/handler/WorldHandler.java | 30 +++---- .../mods/clockworkphase2/init/ModItems.java | 79 ++++++++----------- .../inventory/slot/SlotTemporalFunction.java | 18 ----- .../inventory/slot/SlotToolUpgrade.java | 31 ++++++++ .../item/{construct/misc => }/ItemPAC.java | 2 +- .../{tool => }/ItemClockworkCore.java | 2 +- .../{tool/clockwork => }/ItemGear.java | 7 +- .../components/{tool => }/ItemMainspring.java | 3 +- .../clockworktool/ItemToolUpgradeFurnace.java | 34 ++++++++ .../ItemToolUpgradeRelocate.java} | 35 +++----- .../clockworktool/ItemToolUpgradeSilk.java | 34 ++++++++ .../tool/clockwork/ItemMemoryComponent.java | 45 ----------- .../ItemTemporalToolModuleSilkHarvest.java | 49 ------------ .../temporal/ItemTemporalToolModuleSmelt.java | 49 ------------ .../construct/tool/ItemClockworkTool.java | 21 ++++- .../mods/clockworkphase2/lib/KeyLib.java | 9 +++ .../mods/clockworkphase2/lib/Names.java | 11 +-- .../network/PacketHandler.java | 2 + .../message/MessageToolUpgradeActivate.java | 25 ++++++ .../handler/HandlerMainspringButton.java | 2 +- .../handler/HandlerToolUpgradeActivate.java | 40 ++++++++++ .../clockworkphase2/proxy/ClientProxy.java | 7 +- .../mods/clockworkphase2/recipe/Recipes.java | 6 +- .../tile/clockwork/TileClockworkFurnace.java | 3 +- .../assets/clockworkphase2/lang/en_US.lang | 12 +-- 35 files changed, 506 insertions(+), 306 deletions(-) create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/api/item/IKeybindActivation.java delete mode 100644 src/main/java/lumaceon/mods/clockworkphase2/api/item/ITemporalToolModule.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/api/item/IToolUpgrade.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiClockworkTool.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/client/gui/components/GuiButtonItem.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/client/keybind/Keybindings.java delete mode 100644 src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotTemporalFunction.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotToolUpgrade.java rename src/main/java/lumaceon/mods/clockworkphase2/item/{construct/misc => }/ItemPAC.java (94%) rename src/main/java/lumaceon/mods/clockworkphase2/item/components/{tool => }/ItemClockworkCore.java (98%) rename src/main/java/lumaceon/mods/clockworkphase2/item/components/{tool/clockwork => }/ItemGear.java (86%) rename src/main/java/lumaceon/mods/clockworkphase2/item/components/{tool => }/ItemMainspring.java (97%) create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeFurnace.java rename src/main/java/lumaceon/mods/clockworkphase2/item/components/{tool/temporal/ItemTemporalToolModuleHarvestTeleport.java => clockworktool/ItemToolUpgradeRelocate.java} (67%) create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeSilk.java delete mode 100644 src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemMemoryComponent.java delete mode 100644 src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSilkHarvest.java delete mode 100644 src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSmelt.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/lib/KeyLib.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/network/message/MessageToolUpgradeActivate.java create mode 100644 src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerToolUpgradeActivate.java diff --git a/src/main/java/lumaceon/mods/clockworkphase2/ClockworkPhase2.java b/src/main/java/lumaceon/mods/clockworkphase2/ClockworkPhase2.java index 0c90bbc..2d8445b 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/ClockworkPhase2.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/ClockworkPhase2.java @@ -71,7 +71,6 @@ public void preInitialize(FMLPreInitializationEvent event) ModEntities.init(); proxy.registerKeybindings(); - } @Mod.EventHandler diff --git a/src/main/java/lumaceon/mods/clockworkphase2/api/item/IKeybindActivation.java b/src/main/java/lumaceon/mods/clockworkphase2/api/item/IKeybindActivation.java new file mode 100644 index 0000000..c13fca2 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/api/item/IKeybindActivation.java @@ -0,0 +1,12 @@ +package lumaceon.mods.clockworkphase2.api.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public interface IKeybindActivation +{ + /** + * Called CLIENT-SIDE when the activate keybind is pressed with this itemstack in hand. + */ + public void onKeyPressed(ItemStack item, EntityPlayer player); +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/api/item/ITemporalToolModule.java b/src/main/java/lumaceon/mods/clockworkphase2/api/item/ITemporalToolModule.java deleted file mode 100644 index 239f260..0000000 --- a/src/main/java/lumaceon/mods/clockworkphase2/api/item/ITemporalToolModule.java +++ /dev/null @@ -1,20 +0,0 @@ -package lumaceon.mods.clockworkphase2.api.item; - -import net.minecraft.item.ItemStack; - -public interface ITemporalToolModule -{ - /** - * @param item The IToolTimestream stack. - * @return Whether or not this itemstack is enabled, allowing the player to disable functions. - */ - public boolean isEnabled(ItemStack item); - - public float getQualityMultiplier(ItemStack item); - public float getSpeedMultiplier(ItemStack item); - public float getMemoryMultiplier(ItemStack item); - - public int getColorRed(ItemStack item); - public int getColorGreen(ItemStack item); - public int getColorBlue(ItemStack item); -} \ No newline at end of file diff --git a/src/main/java/lumaceon/mods/clockworkphase2/api/item/IToolUpgrade.java b/src/main/java/lumaceon/mods/clockworkphase2/api/item/IToolUpgrade.java new file mode 100644 index 0000000..a7b5ad3 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/api/item/IToolUpgrade.java @@ -0,0 +1,22 @@ +package lumaceon.mods.clockworkphase2.api.item; + +import net.minecraft.item.ItemStack; + +public interface IToolUpgrade +{ + /** + * Called to activate or deactivate this tool upgrade + * @param item A stack representing the tool upgrade. + * @param active True to set this to active, false to turn it off. + */ + public void setActive(ItemStack item, boolean active); + + /** + * @param item The tool upgrade stack. + * @return Whether or not this itemstack is active. + */ + public boolean getActive(ItemStack item); + + public float getQualityMultiplier(ItemStack item); + public float getSpeedMultiplier(ItemStack item); +} \ No newline at end of file diff --git a/src/main/java/lumaceon/mods/clockworkphase2/block/BlockTemporalFurnace.java b/src/main/java/lumaceon/mods/clockworkphase2/block/BlockTemporalFurnace.java index 7a0d87f..91ca663 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/block/BlockTemporalFurnace.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/block/BlockTemporalFurnace.java @@ -21,7 +21,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p if(player.isSneaking()) return false; if(!world.isRemote) - player.openGui(ClockworkPhase2.instance, 4, world, x, y, z); + player.openGui(ClockworkPhase2.instance, 3, world, x, y, z); return true; } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiClockworkTool.java b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiClockworkTool.java new file mode 100644 index 0000000..3594aa6 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiClockworkTool.java @@ -0,0 +1,66 @@ +package lumaceon.mods.clockworkphase2.client.gui; + +import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; +import lumaceon.mods.clockworkphase2.client.gui.components.GuiButtonItem; +import lumaceon.mods.clockworkphase2.network.PacketHandler; +import lumaceon.mods.clockworkphase2.network.message.MessageToolUpgradeActivate; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; + +public class GuiClockworkTool extends GuiScreen +{ + public ItemStack[] items; + public RenderItem itemRenders; + public int guiLeft, guiTop, xSize, ySize; + + public GuiClockworkTool(ItemStack[] itemStacks) { + super(); + itemRenders = new RenderItem(); + if(itemStacks == null) + itemStacks = new ItemStack[0]; + this.items = itemStacks; + this.xSize = 300; + this.ySize = 60; + } + + @Override + public void initGui() + { + super.initGui(); + this.guiLeft = (this.width - this.xSize) / 2; + this.guiTop = (this.height - this.ySize) / 2; + buttonList.clear(); + int index = 0; + for(int x = 0; x < 10; x++) + { + for(int y = 0; y < 2; y++) + { + if(items.length > index && items[index] != null) + buttonList.add(new GuiButtonItem(items[index], index, guiLeft + (x % 10) * 30, guiTop + y * 30, "", itemRenders, fontRendererObj, NBTHelper.BOOLEAN.get(items[index], NBTTags.ACTIVE))); + else + buttonList.add(new GuiButtonItem(null, index, guiLeft + (x % 10) * 30, guiTop + y * 30, "", itemRenders, fontRendererObj, false)); + index++; + } + } + } + + @Override + public void actionPerformed(GuiButton button) { + PacketHandler.INSTANCE.sendToServer(new MessageToolUpgradeActivate(button.id)); + ((GuiButtonItem) buttonList.get(button.id)).active = !((GuiButtonItem) buttonList.get(button.id)).active; + } + + @Override + protected void keyTyped(char p_73869_1_, int p_73869_2_) { + if(p_73869_2_ == 1 || p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode()) + this.mc.thePlayer.closeScreen(); + } + + @Override + public boolean doesGuiPauseGame() { + return false; + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiHandler.java b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiHandler.java index 1cf266a..1ebf9b6 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiHandler.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/GuiHandler.java @@ -4,6 +4,8 @@ import cpw.mods.fml.common.network.NetworkRegistry; import lumaceon.mods.clockworkphase2.ClockworkPhase2; import lumaceon.mods.clockworkphase2.api.assembly.ContainerAssemblyTable; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; import lumaceon.mods.clockworkphase2.container.ContainerClockworkFurnace; import lumaceon.mods.clockworkphase2.container.ContainerTemporalFurnace; import lumaceon.mods.clockworkphase2.container.ContainerTimeWell; @@ -11,6 +13,7 @@ import lumaceon.mods.clockworkphase2.tile.temporal.TileTemporalFurnace; import lumaceon.mods.clockworkphase2.tile.temporal.TileTimeWell; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -33,7 +36,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int return new ContainerTimeWell(player.inventory, (TileTimeWell) te, world); case 2: return new ContainerClockworkFurnace(player.inventory, (TileClockworkFurnace) te, world); - case 4: + case 3: return new ContainerTemporalFurnace(player.inventory, (TileTemporalFurnace) te, world); } return null; @@ -51,8 +54,19 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int return new GuiTimeWell(player.inventory, (TileTimeWell) te, world); case 2: return new GuiClockworkFurnace(player.inventory, (TileClockworkFurnace) te, world); - case 4: + case 3: return new GuiTemporalFurnace(player.inventory, (TileTemporalFurnace) te, world); + case 4: + if(player == null || player.getHeldItem() == null || !NBTHelper.hasTag(player.getHeldItem(), NBTTags.COMPONENT_INVENTORY)) + return null; + ItemStack[] items = new ItemStack[5]; + ItemStack[] componentInventory = NBTHelper.INVENTORY.get(player.getHeldItem(), NBTTags.COMPONENT_INVENTORY); + items[0] = componentInventory[2]; + items[1] = componentInventory[3]; + items[2] = componentInventory[4]; + items[3] = componentInventory[5]; + items[4] = componentInventory[6]; + return new GuiClockworkTool(items); } return null; } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/client/gui/components/GuiButtonItem.java b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/components/GuiButtonItem.java new file mode 100644 index 0000000..ab7898c --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/client/gui/components/GuiButtonItem.java @@ -0,0 +1,78 @@ +package lumaceon.mods.clockworkphase2.client.gui.components; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; +import org.lwjgl.opengl.GL11; + +public class GuiButtonItem extends GuiButton +{ + public boolean active; + public ItemStack item; + public RenderItem itemRender; + public FontRenderer fontRenderer; + public Minecraft mc; + + public GuiButtonItem(ItemStack is, int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_, RenderItem renderItem, FontRenderer fontRenderer, boolean active) { + super(p_i1020_1_, p_i1020_2_, p_i1020_3_, 20, 20, p_i1020_4_); + this.item = is; + this.itemRender = renderItem; + this.itemRender.renderWithColor = false; + this.mc = Minecraft.getMinecraft(); + this.active = active; + } + + @Override + public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_) + { + if(this.visible) + { + FontRenderer fontrenderer = p_146112_1_.fontRenderer; + p_146112_1_.getTextureManager().bindTexture(buttonTextures); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_LIGHTING); + this.field_146123_n = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height; + int k = this.getHoverState(this.field_146123_n); + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height); + this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height); + this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_); + int l = 14737632; + + if(packedFGColour != 0) + l = packedFGColour; + else if(!this.enabled) + l = 10526880; + else if(this.field_146123_n) + l = 16777120; + + if(item != null) + { + if(!active) + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1.0F); + else + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.drawItemStack(item, this.xPosition + 2, this.yPosition + 2, this.displayString); + } + } + } + + private void drawItemStack(ItemStack is, int x, int y, String name) + { + GL11.glTranslatef(0.0F, 0.0F, 32.0F); + float zLevelOrigin = this.zLevel; + this.zLevel = 200.0F; + itemRender.zLevel = 200.0F; + FontRenderer font = null; + if (is != null) font = is.getItem().getFontRenderer(is); + if (font == null) font = fontRenderer; + itemRender.renderItemAndEffectIntoGUI(font, this.mc.getTextureManager(), is, x, y); + this.zLevel = zLevelOrigin; + itemRender.zLevel = 0.0F; + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/KeyHandler.java b/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/KeyHandler.java index 554316d..ab5efc2 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/KeyHandler.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/KeyHandler.java @@ -1,6 +1,33 @@ package lumaceon.mods.clockworkphase2.client.keybind; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.InputEvent; +import lumaceon.mods.clockworkphase2.api.item.IKeybindActivation; +import lumaceon.mods.clockworkphase2.lib.KeyLib; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + public class KeyHandler { + public static KeyLib.Keys getKeyPressed() + { + if(Keybindings.activate.isPressed()) + return KeyLib.Keys.ACTIVATE; + else + return KeyLib.Keys.IRRELEVANT; + } + @SubscribeEvent + public void handleKeyPress(InputEvent.KeyInputEvent event) + { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + KeyLib.Keys keyPressed = getKeyPressed(); + if(keyPressed.equals(KeyLib.Keys.ACTIVATE)) + { + ItemStack item = player.inventory.getCurrentItem(); + if(item != null && item.getItem() instanceof IKeybindActivation) + ((IKeybindActivation) item.getItem()).onKeyPressed(item, player); + } + } } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/Keybindings.java b/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/Keybindings.java new file mode 100644 index 0000000..9d7ca5f --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/client/keybind/Keybindings.java @@ -0,0 +1,10 @@ +package lumaceon.mods.clockworkphase2.client.keybind; + +import lumaceon.mods.clockworkphase2.lib.KeyLib; +import net.minecraft.client.settings.KeyBinding; +import org.lwjgl.input.Keyboard; + +public class Keybindings +{ + public static KeyBinding activate = new KeyBinding(KeyLib.ACTIVATE, Keyboard.KEY_R, KeyLib.CATEGORY); +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/handler/WorldHandler.java b/src/main/java/lumaceon/mods/clockworkphase2/handler/WorldHandler.java index 88d2105..743a57c 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/handler/WorldHandler.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/handler/WorldHandler.java @@ -1,11 +1,14 @@ package lumaceon.mods.clockworkphase2.handler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import lumaceon.mods.clockworkphase2.api.item.ITemporalToolModule; +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; import lumaceon.mods.clockworkphase2.extendeddata.ExtendedMapData; import lumaceon.mods.clockworkphase2.init.ModItems; import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeFurnace; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeRelocate; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeSilk; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; @@ -39,25 +42,25 @@ public void onBlockHarvested(BlockEvent.HarvestDropsEvent event) ItemStack heldItem = event.harvester.inventory.getStackInSlot(event.harvester.inventory.currentItem); if(!event.isSilkTouching) { - ITemporalToolModule silk = null; + IToolUpgrade silk = null; ItemStack silkStack = null; - ITemporalToolModule smelt = null; + IToolUpgrade smelt = null; - if(heldItem != null) //&& heldItem.getItem() instanceof ITemporalableTool && ((ITemporalableTool) heldItem.getItem()).isTemporal(heldItem)) + if(heldItem != null) { if(NBTHelper.hasTag(heldItem, NBTTags.COMPONENT_INVENTORY)) { ItemStack[] inventory = NBTHelper.INVENTORY.get(heldItem, NBTTags.COMPONENT_INVENTORY); for(ItemStack item : inventory) { - if(item != null && item.getItem().equals(ModItems.temporalToolModuleSilkTouch)) + if(item != null && item.getItem().equals(ModItems.toolUpgradeSilk) && ((ItemToolUpgradeSilk) item.getItem()).getActive(item)) { - silk = (ITemporalToolModule) item.getItem(); + silk = (IToolUpgrade) item.getItem(); silkStack = item; } - if(item != null && item.getItem().equals(ModItems.temporalToolModuleSmelt)) - smelt = (ITemporalToolModule) item.getItem(); + if(item != null && item.getItem().equals(ModItems.toolUpgradeFurnace) && ((ItemToolUpgradeFurnace) item.getItem()).getActive(item)) + smelt = (IToolUpgrade) item.getItem(); } } @@ -103,7 +106,7 @@ else if(smelt != null && !event.drops.isEmpty()) for(ItemStack item : items) { - if(item != null && item.getItem().equals(ModItems.temporalToolModuleTeleport)) + if(item != null && item.getItem().equals(ModItems.toolUpgradeRelocate) && ((ItemToolUpgradeRelocate) item.getItem()).getActive(item)) { int x = NBTHelper.INT.get(item, "cp_x"); int y = NBTHelper.INT.get(item, "cp_y"); @@ -116,7 +119,6 @@ else if(smelt != null && !event.drops.isEmpty()) if(te instanceof ISidedInventory) //Inventory is side-specific. { ISidedInventory inventory = (ISidedInventory) te; - for(int n = 0; n < event.drops.size(); n++) //Each drop. { ItemStack drop = event.drops.get(n); @@ -128,9 +130,9 @@ else if(smelt != null && !event.drops.isEmpty()) ItemStack inventorySlotItem = inventory.getStackInSlot(currentSlot); if(inventorySlotItem != null) { - if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.stackSize + 1) + if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.stackSize + drop.stackSize) { - inventorySlotItem.stackSize++; + inventorySlotItem.stackSize += drop.stackSize; inventory.setInventorySlotContents(currentSlot, inventorySlotItem); event.drops.remove(n); --n; @@ -162,9 +164,9 @@ else if(smelt != null && !event.drops.isEmpty()) ItemStack inventorySlotItem = inventory.getStackInSlot(i); if(inventorySlotItem != null) { - if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.stackSize + 1) + if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.stackSize + drop.stackSize) { - inventorySlotItem.stackSize++; + inventorySlotItem.stackSize += drop.stackSize; inventory.setInventorySlotContents(i, inventorySlotItem); event.drops.remove(n); --n; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/init/ModItems.java b/src/main/java/lumaceon/mods/clockworkphase2/init/ModItems.java index 23c1d48..d8924f5 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/init/ModItems.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/init/ModItems.java @@ -1,20 +1,18 @@ package lumaceon.mods.clockworkphase2.init; import cpw.mods.fml.common.registry.GameRegistry; -import lumaceon.mods.clockworkphase2.api.MemoryItemRegistry; import lumaceon.mods.clockworkphase2.api.util.TimeConverter; import lumaceon.mods.clockworkphase2.item.*; -import lumaceon.mods.clockworkphase2.item.components.tool.temporal.ItemTemporalToolModuleHarvestTeleport; -import lumaceon.mods.clockworkphase2.item.components.tool.temporal.ItemTemporalToolModuleSilkHarvest; -import lumaceon.mods.clockworkphase2.item.components.tool.temporal.ItemTemporalToolModuleSmelt; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeFurnace; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeRelocate; +import lumaceon.mods.clockworkphase2.item.components.clockworktool.ItemToolUpgradeSilk; import lumaceon.mods.clockworkphase2.item.construct.tool.*; import lumaceon.mods.clockworkphase2.item.timestream.*; -import lumaceon.mods.clockworkphase2.item.components.tool.ItemClockworkCore; -import lumaceon.mods.clockworkphase2.item.components.tool.ItemMainspring; +import lumaceon.mods.clockworkphase2.item.components.ItemClockworkCore; +import lumaceon.mods.clockworkphase2.item.components.ItemMainspring; import lumaceon.mods.clockworkphase2.item.components.ItemTemporalCore; -import lumaceon.mods.clockworkphase2.item.components.tool.clockwork.ItemGear; -import lumaceon.mods.clockworkphase2.item.components.tool.clockwork.ItemMemoryComponent; -import lumaceon.mods.clockworkphase2.item.construct.misc.ItemPAC; +import lumaceon.mods.clockworkphase2.item.components.ItemGear; +import lumaceon.mods.clockworkphase2.item.ItemPAC; import lumaceon.mods.clockworkphase2.item.construct.weapon.ItemLightningSword; import lumaceon.mods.clockworkphase2.item.timezonemodule.ItemTimezoneModuleMobRepellent; import lumaceon.mods.clockworkphase2.item.timezonemodule.ItemTimezoneModuleTank; @@ -27,7 +25,7 @@ public class ModItems { public static void init() { - initTemporalToolModules(); + initToolUpgrades(); initTimezoneModules(); initClockworkComponents(); initTemporalComponents(); @@ -38,18 +36,18 @@ public static void init() initMisc(); } - public static Item temporalToolModuleSilkTouch; - public static Item temporalToolModuleSmelt; - public static Item temporalToolModuleTeleport; - public static void initTemporalToolModules() + public static Item toolUpgradeSilk; + public static Item toolUpgradeFurnace; + public static Item toolUpgradeRelocate; + public static void initToolUpgrades() { - temporalToolModuleSilkTouch = new ItemTemporalToolModuleSilkHarvest(1, 100, Names.ITEM.TEMPORAL_TOOL_MODULE_SILK); - temporalToolModuleSmelt = new ItemTemporalToolModuleSmelt(1, 100, Names.ITEM.TEMPORAL_TOOL_MODULE_SMELT); - temporalToolModuleTeleport = new ItemTemporalToolModuleHarvestTeleport(1, 100, Names.ITEM.TEMPORAL_TOOL_MODULE_TELEPORT); + toolUpgradeSilk = new ItemToolUpgradeSilk(1, 100, Names.ITEM.TOOL_UPGRADE_SILK); + toolUpgradeFurnace = new ItemToolUpgradeFurnace(1, 100, Names.ITEM.TOOL_UPGRADE_FURNACE); + toolUpgradeRelocate = new ItemToolUpgradeRelocate(1, 100, Names.ITEM.TOOL_UPGRADE_RELOCATE); - GameRegistry.registerItem(temporalToolModuleSilkTouch, Names.ITEM.TEMPORAL_TOOL_MODULE_SILK); - GameRegistry.registerItem(temporalToolModuleSmelt, Names.ITEM.TEMPORAL_TOOL_MODULE_SMELT); - GameRegistry.registerItem(temporalToolModuleTeleport, Names.ITEM.TEMPORAL_TOOL_MODULE_TELEPORT); + GameRegistry.registerItem(toolUpgradeSilk, Names.ITEM.TOOL_UPGRADE_SILK); + GameRegistry.registerItem(toolUpgradeFurnace, Names.ITEM.TOOL_UPGRADE_FURNACE); + GameRegistry.registerItem(toolUpgradeRelocate, Names.ITEM.TOOL_UPGRADE_RELOCATE); } public static Item timezoneModuleTank; @@ -75,32 +73,22 @@ public static void initTimezoneModules() public static Item gearCopper; public static Item gearZinc; public static Item gearBrass; - public static Item preciousCharm; - public static Item dreamCatcher; - public static Item ancientCoin; - public static Item noteBottle; - public static Item gearRusty; public static Item gearElysianBroken; public static void initClockworkComponents() { mainspring = new ItemMainspring(1, 20, Names.ITEM.MAINSPRING); clockworkCore = new ItemClockworkCore(1, 20, Names.ITEM.CLOCKWORK_CORE); - gearWood = new ItemGear(Names.ITEM.GEAR_WOOD, 10, 15, 0, 0); - gearStone = new ItemGear(Names.ITEM.GEAR_STONE, 15, 10, 0, 1); - gearIron = new ItemGear(Names.ITEM.GEAR_IRON, 25, 25, 0, 2); - gearGold = new ItemGear(Names.ITEM.GEAR_GOLD, 10, 70, 0, 0); - gearDiamond = new ItemGear(Names.ITEM.GEAR_DIAMOND, 50, 40, 0, 3); - gearEmerald = new ItemGear(Names.ITEM.GEAR_EMERALD, 40, 50, 0, 3); - gearQuartz = new ItemGear(Names.ITEM.GEAR_QUARTZ, 70, 10, 0, 2); - gearCopper = new ItemGear(Names.ITEM.GEAR_COPPER, 20, 30, 0, 2); - gearZinc = new ItemGear(Names.ITEM.GEAR_ZINC, 30, 20, 0, 2); - gearBrass = new ItemGear(Names.ITEM.GEAR_BRASS, 40, 35, 0, 2); - preciousCharm = new ItemMemoryComponent(Names.ITEM.PRECIOUS_CHARM, 0, 0, 50, -1); - dreamCatcher = new ItemMemoryComponent(Names.ITEM.DREAM_CATCHER, 0, 0, 40, -1); - ancientCoin = new ItemMemoryComponent(Names.ITEM.ANCIENT_COIN, 0, 0, 30, -1); - noteBottle = new ItemMemoryComponent(Names.ITEM.NOTE_BOTTLE, 0, 0, 20, -1); - gearRusty = new ItemMemoryComponent(Names.ITEM.GEAR_RUSTY, 10, 30, 10, 0); - gearElysianBroken = new ItemMemoryComponent(Names.ITEM.GEAR_BROKEN_ELYSIAN, 100, 100, 1000, 5); + gearWood = new ItemGear(Names.ITEM.GEAR_WOOD, 10, 15, 0); + gearStone = new ItemGear(Names.ITEM.GEAR_STONE, 15, 10, 1); + gearIron = new ItemGear(Names.ITEM.GEAR_IRON, 25, 25, 2); + gearGold = new ItemGear(Names.ITEM.GEAR_GOLD, 10, 70, 0); + gearDiamond = new ItemGear(Names.ITEM.GEAR_DIAMOND, 50, 40, 3); + gearEmerald = new ItemGear(Names.ITEM.GEAR_EMERALD, 40, 50, 3); + gearQuartz = new ItemGear(Names.ITEM.GEAR_QUARTZ, 70, 10, 2); + gearCopper = new ItemGear(Names.ITEM.GEAR_COPPER, 20, 30, 2); + gearZinc = new ItemGear(Names.ITEM.GEAR_ZINC, 30, 20, 2); + gearBrass = new ItemGear(Names.ITEM.GEAR_BRASS, 40, 35, 2); + gearElysianBroken = new ItemGear(Names.ITEM.GEAR_BROKEN_ELYSIAN, 100, 100, 5); GameRegistry.registerItem(mainspring, Names.ITEM.MAINSPRING); GameRegistry.registerItem(clockworkCore, Names.ITEM.CLOCKWORK_CORE); @@ -114,18 +102,13 @@ public static void initClockworkComponents() GameRegistry.registerItem(gearCopper, Names.ITEM.GEAR_COPPER); GameRegistry.registerItem(gearZinc, Names.ITEM.GEAR_ZINC); GameRegistry.registerItem(gearBrass, Names.ITEM.GEAR_BRASS); - GameRegistry.registerItem(preciousCharm, Names.ITEM.PRECIOUS_CHARM); - GameRegistry.registerItem(dreamCatcher, Names.ITEM.DREAM_CATCHER); - GameRegistry.registerItem(ancientCoin, Names.ITEM.ANCIENT_COIN); - GameRegistry.registerItem(noteBottle, Names.ITEM.NOTE_BOTTLE); - GameRegistry.registerItem(gearRusty, Names.ITEM.GEAR_RUSTY); GameRegistry.registerItem(gearElysianBroken, Names.ITEM.GEAR_BROKEN_ELYSIAN); - MemoryItemRegistry.registerMemoryItem(preciousCharm); + /*MemoryItemRegistry.registerMemoryItem(preciousCharm); MemoryItemRegistry.registerMemoryItem(dreamCatcher); MemoryItemRegistry.registerMemoryItem(ancientCoin); MemoryItemRegistry.registerMemoryItem(noteBottle); - MemoryItemRegistry.registerMemoryItem(gearRusty); + MemoryItemRegistry.registerMemoryItem(gearRusty);*/ //Elysian gear not registered as a memory item because it's considerably more rare and dropped separately. OreDictionary.registerOre("gearWood", gearWood); diff --git a/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotTemporalFunction.java b/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotTemporalFunction.java deleted file mode 100644 index b587417..0000000 --- a/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotTemporalFunction.java +++ /dev/null @@ -1,18 +0,0 @@ -package lumaceon.mods.clockworkphase2.inventory.slot; - -import lumaceon.mods.clockworkphase2.api.item.ITemporalToolModule; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotTemporalFunction extends Slot -{ - public SlotTemporalFunction(IInventory inventory, int slotId, int x, int y) { - super(inventory, slotId, x, y); - } - - @Override - public boolean isItemValid(ItemStack is) { - return is != null && is.getItem() instanceof ITemporalToolModule; - } -} \ No newline at end of file diff --git a/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotToolUpgrade.java b/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotToolUpgrade.java new file mode 100644 index 0000000..e76efe7 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/inventory/slot/SlotToolUpgrade.java @@ -0,0 +1,31 @@ +package lumaceon.mods.clockworkphase2.inventory.slot; + +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotToolUpgrade extends Slot +{ + public SlotToolUpgrade(IInventory inventory, int slotId, int x, int y) { + super(inventory, slotId, x, y); + } + + @Override + public boolean isItemValid(ItemStack is) { + return is != null && is.getItem() instanceof IToolUpgrade && !alreadyExists(is); + } + + private boolean alreadyExists(ItemStack is) + { + for(int i = 0; i < inventory.getSizeInventory(); i++) + { + if(i == slotNumber) + continue; + ItemStack item = inventory.getStackInSlot(i); + if(item != null && item.getItem().equals(is.getItem())) + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/construct/misc/ItemPAC.java b/src/main/java/lumaceon/mods/clockworkphase2/item/ItemPAC.java similarity index 94% rename from src/main/java/lumaceon/mods/clockworkphase2/item/construct/misc/ItemPAC.java rename to src/main/java/lumaceon/mods/clockworkphase2/item/ItemPAC.java index 9bf3523..bc55aa6 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/construct/misc/ItemPAC.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/ItemPAC.java @@ -1,4 +1,4 @@ -package lumaceon.mods.clockworkphase2.item.construct.misc; +package lumaceon.mods.clockworkphase2.item; import lumaceon.mods.clockworkphase2.entity.EntityPAC; import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemClockworkCore.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemClockworkCore.java similarity index 98% rename from src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemClockworkCore.java rename to src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemClockworkCore.java index 71a73ee..e39607e 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemClockworkCore.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemClockworkCore.java @@ -1,4 +1,4 @@ -package lumaceon.mods.clockworkphase2.item.components.tool; +package lumaceon.mods.clockworkphase2.item.components; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemGear.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemGear.java similarity index 86% rename from src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemGear.java rename to src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemGear.java index c0e1093..3beefe7 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemGear.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemGear.java @@ -1,4 +1,4 @@ -package lumaceon.mods.clockworkphase2.item.components.tool.clockwork; +package lumaceon.mods.clockworkphase2.item.components; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -12,14 +12,13 @@ public class ItemGear extends ItemClockworkPhase implements IClockworkComponent { - public int quality, speed, memory, harvestLevel; + public int quality, speed, harvestLevel; - public ItemGear(String unlocalizedName, int quality, int speed, int memory, int harvestLevel) + public ItemGear(String unlocalizedName, int quality, int speed, int harvestLevel) { super(64, 100, unlocalizedName); this.quality = quality; this.speed = speed; - this.memory = memory; this.harvestLevel = harvestLevel; } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemMainspring.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemMainspring.java similarity index 97% rename from src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemMainspring.java rename to src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemMainspring.java index e9137a0..62338c2 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/ItemMainspring.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/ItemMainspring.java @@ -1,11 +1,10 @@ -package lumaceon.mods.clockworkphase2.item.components.tool; +package lumaceon.mods.clockworkphase2.item.components; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import lumaceon.mods.clockworkphase2.ClockworkPhase2; import lumaceon.mods.clockworkphase2.api.MainspringMetalRegistry; import lumaceon.mods.clockworkphase2.api.assembly.ContainerAssemblyTable; -import lumaceon.mods.clockworkphase2.api.assembly.IAssemblable; import lumaceon.mods.clockworkphase2.api.assembly.IAssemblableButtons; import lumaceon.mods.clockworkphase2.api.assembly.InventoryAssemblyTableComponents; import lumaceon.mods.clockworkphase2.api.item.clockwork.IMainspring; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeFurnace.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeFurnace.java new file mode 100644 index 0000000..3e1090e --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeFurnace.java @@ -0,0 +1,34 @@ +package lumaceon.mods.clockworkphase2.item.components.clockworktool; + +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; +import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; +import net.minecraft.item.ItemStack; + +public class ItemToolUpgradeFurnace extends ItemClockworkPhase implements IToolUpgrade +{ + public ItemToolUpgradeFurnace(int maxStack, int maxDamage, String unlocalizedName) { + super(maxStack, maxDamage, unlocalizedName); + } + + @Override + public void setActive(ItemStack item, boolean active) { + NBTHelper.BOOLEAN.set(item, NBTTags.ACTIVE, active); + } + + @Override + public boolean getActive(ItemStack item) { + return NBTHelper.BOOLEAN.get(item, NBTTags.ACTIVE); + } + + @Override + public float getQualityMultiplier(ItemStack item) { + return 1F; + } + + @Override + public float getSpeedMultiplier(ItemStack item) { + return 1.2F; + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleHarvestTeleport.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeRelocate.java similarity index 67% rename from src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleHarvestTeleport.java rename to src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeRelocate.java index b53f246..f3da1a4 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleHarvestTeleport.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeRelocate.java @@ -1,6 +1,6 @@ -package lumaceon.mods.clockworkphase2.item.components.tool.temporal; +package lumaceon.mods.clockworkphase2.item.components.clockworktool; -import lumaceon.mods.clockworkphase2.api.item.ITemporalToolModule; +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; import lumaceon.mods.clockworkphase2.api.util.internal.Colors; import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; @@ -12,9 +12,9 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; -public class ItemTemporalToolModuleHarvestTeleport extends ItemClockworkPhase implements ITemporalToolModule +public class ItemToolUpgradeRelocate extends ItemClockworkPhase implements IToolUpgrade { - public ItemTemporalToolModuleHarvestTeleport(int maxStack, int maxDamage, String unlocalizedName) { + public ItemToolUpgradeRelocate(int maxStack, int maxDamage, String unlocalizedName) { super(maxStack, maxDamage, unlocalizedName); } @@ -36,7 +36,12 @@ public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, } @Override - public boolean isEnabled(ItemStack item) { + public void setActive(ItemStack item, boolean active) { + NBTHelper.BOOLEAN.set(item, NBTTags.ACTIVE, active); + } + + @Override + public boolean getActive(ItemStack item) { return NBTHelper.BOOLEAN.get(item, NBTTags.ACTIVE); } @@ -49,24 +54,4 @@ public float getQualityMultiplier(ItemStack item) { public float getSpeedMultiplier(ItemStack item) { return 1F; } - - @Override - public float getMemoryMultiplier(ItemStack item) { - return 1.5F; - } - - @Override - public int getColorRed(ItemStack item) { - return 210; - } - - @Override - public int getColorGreen(ItemStack item) { - return 0; - } - - @Override - public int getColorBlue(ItemStack item) { - return 230; - } } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeSilk.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeSilk.java new file mode 100644 index 0000000..f7199ef --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/components/clockworktool/ItemToolUpgradeSilk.java @@ -0,0 +1,34 @@ +package lumaceon.mods.clockworkphase2.item.components.clockworktool; + +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; +import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; +import net.minecraft.item.ItemStack; + +public class ItemToolUpgradeSilk extends ItemClockworkPhase implements IToolUpgrade +{ + public ItemToolUpgradeSilk(int maxStack, int maxDamage, String unlocalizedName) { + super(maxStack, maxDamage, unlocalizedName); + } + + @Override + public void setActive(ItemStack item, boolean active) { + NBTHelper.BOOLEAN.set(item, NBTTags.ACTIVE, active); + } + + @Override + public boolean getActive(ItemStack item) { + return NBTHelper.BOOLEAN.get(item, NBTTags.ACTIVE); + } + + @Override + public float getQualityMultiplier(ItemStack item) { + return 1.2F; + } + + @Override + public float getSpeedMultiplier(ItemStack item) { + return 1F; + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemMemoryComponent.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemMemoryComponent.java deleted file mode 100644 index ff2c92b..0000000 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/clockwork/ItemMemoryComponent.java +++ /dev/null @@ -1,45 +0,0 @@ -package lumaceon.mods.clockworkphase2.item.components.tool.clockwork; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import lumaceon.mods.clockworkphase2.api.item.clockwork.IClockworkComponent; -import lumaceon.mods.clockworkphase2.api.util.InformationDisplay; -import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import java.util.List; - -public class ItemMemoryComponent extends ItemClockworkPhase implements IClockworkComponent -{ - public int quality, speed, memory, harvestLevel; - - public ItemMemoryComponent(String unlocalizedName, int quality, int speed, int memory, int harvestLevel) - { - super(64, 100, unlocalizedName); - this.quality = quality; - this.speed = speed; - this.memory = memory; - this.harvestLevel = harvestLevel; - } - - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) { - InformationDisplay.addClockworkComponentInformation(is, list); - } - - @Override - public int getQuality(ItemStack is) { - return quality; - } - - @Override - public int getSpeed(ItemStack is) { - return speed; - } - - @Override - public int getTier(ItemStack is) { - return harvestLevel; - } -} \ No newline at end of file diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSilkHarvest.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSilkHarvest.java deleted file mode 100644 index 1481f1e..0000000 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSilkHarvest.java +++ /dev/null @@ -1,49 +0,0 @@ -package lumaceon.mods.clockworkphase2.item.components.tool.temporal; - -import lumaceon.mods.clockworkphase2.api.item.ITemporalToolModule; -import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; -import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; -import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; -import net.minecraft.item.ItemStack; - -public class ItemTemporalToolModuleSilkHarvest extends ItemClockworkPhase implements ITemporalToolModule -{ - public ItemTemporalToolModuleSilkHarvest(int maxStack, int maxDamage, String unlocalizedName) { - super(maxStack, maxDamage, unlocalizedName); - } - - @Override - public boolean isEnabled(ItemStack item) { - return NBTHelper.BOOLEAN.get(item, NBTTags.ACTIVE); - } - - @Override - public float getQualityMultiplier(ItemStack item) { - return 1.2F; - } - - @Override - public float getSpeedMultiplier(ItemStack item) { - return 1F; - } - - @Override - public float getMemoryMultiplier(ItemStack item) { - return 1F; - } - - @Override - public int getColorRed(ItemStack item) { - return 255; - } - - @Override - public int getColorGreen(ItemStack item) { - return 255; - } - - @Override - public int getColorBlue(ItemStack item) { - return 255; - } -} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSmelt.java b/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSmelt.java deleted file mode 100644 index cd9e23b..0000000 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/components/tool/temporal/ItemTemporalToolModuleSmelt.java +++ /dev/null @@ -1,49 +0,0 @@ -package lumaceon.mods.clockworkphase2.item.components.tool.temporal; - -import lumaceon.mods.clockworkphase2.api.item.ITemporalToolModule; -import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; -import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; -import lumaceon.mods.clockworkphase2.item.ItemClockworkPhase; -import net.minecraft.item.ItemStack; - -public class ItemTemporalToolModuleSmelt extends ItemClockworkPhase implements ITemporalToolModule -{ - public ItemTemporalToolModuleSmelt(int maxStack, int maxDamage, String unlocalizedName) { - super(maxStack, maxDamage, unlocalizedName); - } - - @Override - public boolean isEnabled(ItemStack item) { - return NBTHelper.BOOLEAN.get(item, NBTTags.ACTIVE); - } - - @Override - public float getQualityMultiplier(ItemStack item) { - return 1F; - } - - @Override - public float getSpeedMultiplier(ItemStack item) { - return 1.2F; - } - - @Override - public float getMemoryMultiplier(ItemStack item) { - return 1.2F; - } - - @Override - public int getColorRed(ItemStack item) { - return 255; - } - - @Override - public int getColorGreen(ItemStack item) { - return 90; - } - - @Override - public int getColorBlue(ItemStack item) { - return 0; - } -} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/item/construct/tool/ItemClockworkTool.java b/src/main/java/lumaceon/mods/clockworkphase2/item/construct/tool/ItemClockworkTool.java index 30a9d55..cae674c 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/item/construct/tool/ItemClockworkTool.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/item/construct/tool/ItemClockworkTool.java @@ -6,10 +6,12 @@ import lumaceon.mods.clockworkphase2.api.assembly.ContainerAssemblyTable; import lumaceon.mods.clockworkphase2.api.assembly.IAssemblable; import lumaceon.mods.clockworkphase2.api.assembly.InventoryAssemblyTableComponents; +import lumaceon.mods.clockworkphase2.api.item.IKeybindActivation; import lumaceon.mods.clockworkphase2.api.item.clockwork.IClockworkConstruct; import lumaceon.mods.clockworkphase2.api.util.*; import lumaceon.mods.clockworkphase2.init.ModItems; import lumaceon.mods.clockworkphase2.inventory.slot.SlotItemSpecific; +import lumaceon.mods.clockworkphase2.inventory.slot.SlotToolUpgrade; import lumaceon.mods.clockworkphase2.lib.Defaults; import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; import lumaceon.mods.clockworkphase2.lib.Textures; @@ -30,7 +32,7 @@ import java.util.List; import java.util.Set; -public class ItemClockworkTool extends ItemTool implements IAssemblable, IClockworkConstruct +public class ItemClockworkTool extends ItemTool implements IAssemblable, IClockworkConstruct, IKeybindActivation { public ItemClockworkTool(float var1, ToolMaterial toolMaterial, Set set, String unlocalizedName) { @@ -97,6 +99,11 @@ public float getDigSpeed(ItemStack stack, Block block, int meta) return func_150893_a(stack, block); } + @Override + public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_) { + return true; + } + @Override public boolean onBlockDestroyed(ItemStack is, World world, Block block, int x, int y, int z, EntityLivingBase entity) { @@ -193,7 +200,7 @@ public ResourceLocation getGUIBackground(ContainerAssemblyTable container) { @Override public InventoryAssemblyTableComponents getGUIInventory(ContainerAssemblyTable container) { - InventoryAssemblyTableComponents inventory = new InventoryAssemblyTableComponents(container, 2, 1); + InventoryAssemblyTableComponents inventory = new InventoryAssemblyTableComponents(container, 7, 1); AssemblyHelper.GET_GUI_INVENTORY.loadStandardComponentInventory(container, inventory); return inventory; } @@ -205,6 +212,11 @@ public Slot[] getContainerSlots(IInventory inventory) { new SlotItemSpecific(inventory, 0, 120, 30, ModItems.mainspring), new SlotItemSpecific(inventory, 1, 120, 54, ModItems.clockworkCore), + new SlotToolUpgrade(inventory, 2, 20, 20), + new SlotToolUpgrade(inventory, 3, 20, 40), + new SlotToolUpgrade(inventory, 4, 20, 60), + new SlotToolUpgrade(inventory, 5, 20, 80), + new SlotToolUpgrade(inventory, 6, 20, 100), }; } @@ -217,4 +229,9 @@ public void saveComponentInventory(ContainerAssemblyTable container) { public void onInventoryChange(ContainerAssemblyTable container) { AssemblyHelper.ON_INVENTORY_CHANGE.assembleClockworkConstruct(container, 0, 1); } + + @Override + public void onKeyPressed(ItemStack item, EntityPlayer player) { + player.openGui(ClockworkPhase2.instance, 4, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + } } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/lib/KeyLib.java b/src/main/java/lumaceon/mods/clockworkphase2/lib/KeyLib.java new file mode 100644 index 0000000..9fa00b6 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/lib/KeyLib.java @@ -0,0 +1,9 @@ +package lumaceon.mods.clockworkphase2.lib; + +public class KeyLib +{ + public static final String CATEGORY = "key.clockworkphase2.category"; + public static final String ACTIVATE = "key.clockworkphase2.activate"; + + public enum Keys {IRRELEVANT, ACTIVATE} +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/lib/Names.java b/src/main/java/lumaceon/mods/clockworkphase2/lib/Names.java index d54d3b4..b95780d 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/lib/Names.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/lib/Names.java @@ -69,11 +69,6 @@ public class ITEM public static final String GEAR_COPPER = "copper_gear"; public static final String GEAR_ZINC = "zinc_gear"; public static final String GEAR_BRASS = "brass_gear"; - public static final String PRECIOUS_CHARM = "precious_charm"; - public static final String DREAM_CATCHER = "dream_catcher"; - public static final String ANCIENT_COIN = "ancient_coin"; - public static final String NOTE_BOTTLE = "note_bottle"; - public static final String GEAR_RUSTY = "rusty_gear"; public static final String GEAR_BROKEN_ELYSIAN = "broken_elysian_gear"; public static final String TEMPORAL_CORE = "temporal_core"; public static final String TEMPORAL_DRIVE_SIMULATE = "temporal_drive_simulate"; @@ -90,9 +85,9 @@ public class ITEM public static final String TIMESTREAM_MOB_REPULSER = "timestream_mob_repulser"; public static final String TIMESTREAM_LIGHTNING = "timestream_lightning"; - public static final String TEMPORAL_TOOL_MODULE_SILK = "temporal_tool_module_silky"; - public static final String TEMPORAL_TOOL_MODULE_SMELT = "temporal_tool_module_smelt"; - public static final String TEMPORAL_TOOL_MODULE_TELEPORT = "temporal_tool_module_teleport"; + public static final String TOOL_UPGRADE_SILK = "tool_upgrade_silk"; + public static final String TOOL_UPGRADE_FURNACE = "tool_upgrade_furnace"; + public static final String TOOL_UPGRADE_RELOCATE = "tool_upgrade_relocate"; public static final String TIMEZONE_MODULE_TANK = "timezone_module_tank"; public static final String TIMEZONE_MODULE_MOB_REPELL = "timezone_module_mob_repell"; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/network/PacketHandler.java b/src/main/java/lumaceon/mods/clockworkphase2/network/PacketHandler.java index 26748ef..0910140 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/network/PacketHandler.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/network/PacketHandler.java @@ -26,5 +26,7 @@ public static void init() INSTANCE.registerMessage(HandlerLightningSwordActivate.class, MessageLightningSwordActivate.class, nextID, Side.SERVER); nextID++; INSTANCE.registerMessage(HandlerMainspringButton.class, MessageMainspringButton.class, nextID, Side.SERVER); + nextID++; + INSTANCE.registerMessage(HandlerToolUpgradeActivate.class, MessageToolUpgradeActivate.class, nextID, Side.SERVER); } } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/network/message/MessageToolUpgradeActivate.java b/src/main/java/lumaceon/mods/clockworkphase2/network/message/MessageToolUpgradeActivate.java new file mode 100644 index 0000000..c497d91 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/network/message/MessageToolUpgradeActivate.java @@ -0,0 +1,25 @@ +package lumaceon.mods.clockworkphase2.network.message; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import io.netty.buffer.ByteBuf; + +public class MessageToolUpgradeActivate implements IMessage +{ + public int buttonID; + + public MessageToolUpgradeActivate() {} + + public MessageToolUpgradeActivate(int buttonID) { + this.buttonID = buttonID; + } + + @Override + public void toBytes(ByteBuf buf) { + buf.writeInt(buttonID); + } + + @Override + public void fromBytes(ByteBuf buf) { + buttonID = buf.readInt(); + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerMainspringButton.java b/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerMainspringButton.java index b7bed51..5c6a162 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerMainspringButton.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerMainspringButton.java @@ -4,7 +4,7 @@ import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import lumaceon.mods.clockworkphase2.api.assembly.ContainerAssemblyTable; -import lumaceon.mods.clockworkphase2.item.components.tool.ItemMainspring; +import lumaceon.mods.clockworkphase2.item.components.ItemMainspring; import lumaceon.mods.clockworkphase2.network.message.MessageMainspringButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; diff --git a/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerToolUpgradeActivate.java b/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerToolUpgradeActivate.java new file mode 100644 index 0000000..a5196f3 --- /dev/null +++ b/src/main/java/lumaceon/mods/clockworkphase2/network/message/handler/HandlerToolUpgradeActivate.java @@ -0,0 +1,40 @@ +package lumaceon.mods.clockworkphase2.network.message.handler; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; +import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; +import lumaceon.mods.clockworkphase2.item.construct.tool.ItemClockworkTool; +import lumaceon.mods.clockworkphase2.network.message.MessageToolUpgradeActivate; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public class HandlerToolUpgradeActivate implements IMessageHandler +{ + @Override + public IMessage onMessage(MessageToolUpgradeActivate message, MessageContext ctx) + { + if(ctx.side.isServer() && ctx.getServerHandler().playerEntity != null) + { + EntityPlayer player = ctx.getServerHandler().playerEntity; + ItemStack item = player.getHeldItem(); + if(item != null && item.getItem() instanceof ItemClockworkTool && NBTHelper.hasTag(item, NBTTags.COMPONENT_INVENTORY)) + { + ItemStack[] items = NBTHelper.INVENTORY.get(item, NBTTags.COMPONENT_INVENTORY); + if(items != null && items.length > 2 + message.buttonID) + { + ItemStack upgrade = items[message.buttonID + 2]; + if(upgrade != null && upgrade.getItem() instanceof IToolUpgrade) + { + IToolUpgrade upgradeItem = (IToolUpgrade) upgrade.getItem(); + upgradeItem.setActive(upgrade, !upgradeItem.getActive(upgrade)); + NBTHelper.INVENTORY.set(item, NBTTags.COMPONENT_INVENTORY, items); + } + } + } + } + return null; + } +} diff --git a/src/main/java/lumaceon/mods/clockworkphase2/proxy/ClientProxy.java b/src/main/java/lumaceon/mods/clockworkphase2/proxy/ClientProxy.java index ebaaedc..3beadf9 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/proxy/ClientProxy.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/proxy/ClientProxy.java @@ -6,6 +6,8 @@ import lumaceon.mods.clockworkphase2.client.ClientTickHandler; import lumaceon.mods.clockworkphase2.client.gui.ButtonInitializer; import lumaceon.mods.clockworkphase2.client.gui.GuiHandler; +import lumaceon.mods.clockworkphase2.client.keybind.KeyHandler; +import lumaceon.mods.clockworkphase2.client.keybind.Keybindings; import lumaceon.mods.clockworkphase2.client.render.RenderHandler; import lumaceon.mods.clockworkphase2.client.render.elements.world.WorldRenderElement; import lumaceon.mods.clockworkphase2.client.render.elements.world.WorldRenderElementTDA; @@ -45,7 +47,9 @@ public void registerTESR() public void registerModels() {} @Override - public void registerKeybindings() {} + public void registerKeybindings() { + ClientRegistry.registerKeyBinding(Keybindings.activate); + } @Override public void initSideHandlers() @@ -55,6 +59,7 @@ public void initSideHandlers() MinecraftForge.EVENT_BUS.register(renderer); FMLCommonHandler.instance().bus().register(renderer); FMLCommonHandler.instance().bus().register(new ClientTickHandler()); + FMLCommonHandler.instance().bus().register(new KeyHandler()); } @Override diff --git a/src/main/java/lumaceon/mods/clockworkphase2/recipe/Recipes.java b/src/main/java/lumaceon/mods/clockworkphase2/recipe/Recipes.java index 21e4fb2..524150a 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/recipe/Recipes.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/recipe/Recipes.java @@ -47,11 +47,11 @@ public static void initClockworkConstructs() public static void initTemporalClockworkModules() { ItemStack result; - result = new ItemStack(ModItems.temporalToolModuleSmelt); + result = new ItemStack(ModItems.toolUpgradeFurnace); GameRegistry.addRecipe(new ShapedOreRecipe(result, "bdb", "bSb", "bbb", 'b', "ingotBrass", 'd', ModItems.temporalDriveSimulate, 'S', ModItems.timestreamSmelt)); - result = new ItemStack(ModItems.temporalToolModuleSilkTouch); + result = new ItemStack(ModItems.toolUpgradeSilk); GameRegistry.addRecipe(new ShapedOreRecipe(result, "bdb", "bSb", "bbb", 'b', "ingotBrass", 'd', ModItems.temporalDriveSimulate, 'S', ModItems.timestreamSilkyHarvest)); - result = new ItemStack(ModItems.temporalToolModuleTeleport); + result = new ItemStack(ModItems.toolUpgradeRelocate); GameRegistry.addRecipe(new ShapedOreRecipe(result, "bdb", "bSb", "bbb", 'b', "ingotBrass", 'd', ModItems.temporalDriveSimulate, 'S', ModItems.timestreamRelocation)); } diff --git a/src/main/java/lumaceon/mods/clockworkphase2/tile/clockwork/TileClockworkFurnace.java b/src/main/java/lumaceon/mods/clockworkphase2/tile/clockwork/TileClockworkFurnace.java index b835e60..9992b76 100644 --- a/src/main/java/lumaceon/mods/clockworkphase2/tile/clockwork/TileClockworkFurnace.java +++ b/src/main/java/lumaceon/mods/clockworkphase2/tile/clockwork/TileClockworkFurnace.java @@ -6,8 +6,7 @@ import lumaceon.mods.clockworkphase2.api.util.ClockworkHelper; import lumaceon.mods.clockworkphase2.api.util.internal.NBTHelper; import lumaceon.mods.clockworkphase2.api.util.internal.NBTTags; -import lumaceon.mods.clockworkphase2.item.components.tool.ItemClockworkCore; -import lumaceon.mods.clockworkphase2.item.components.tool.ItemMainspring; +import lumaceon.mods.clockworkphase2.item.components.ItemMainspring; import lumaceon.mods.clockworkphase2.tile.generic.TileClockworkPhaseInventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; diff --git a/src/main/resources/assets/clockworkphase2/lang/en_US.lang b/src/main/resources/assets/clockworkphase2/lang/en_US.lang index 6c03e6c..2a42b13 100644 --- a/src/main/resources/assets/clockworkphase2/lang/en_US.lang +++ b/src/main/resources/assets/clockworkphase2/lang/en_US.lang @@ -18,12 +18,6 @@ item.clockworkphase2:gold_gear.name=Golden Gear item.clockworkphase2:diamond_gear.name=Diamond Gear item.clockworkphase2:emerald_gear.name=Emerald Gear item.clockworkphase2:quartz_gear.name=Quartz Gear - -item.clockworkphase2:precious_charm.name=Precious Charm -item.clockworkphase2:dream_catcher.name=Dream Catcher -item.clockworkphase2:ancient_coin.name=Ancient Coin -item.clockworkphase2:note_bottle.name=Note-In-A-Bottle -item.clockworkphase2:rusty_gear.name=Rusty Gear item.clockworkphase2:broken_elysian_gear.name=Elysian Gear (Broken) item.clockworkphase2:temporal_core.name=Temporal Core @@ -40,9 +34,9 @@ item.clockworkphase2:timestream_mob_repulser.name=Timestream of Mob Repulsion item.clockworkphase2:timestream_lightning.name=Timestream of Lightning item.clockworkphase2:timestream_lightning_rod.name=Timestream of Lightning {Cannibalized} -item.clockworkphase2:temporal_tool_module_silky.name=Temporal Tool Module: Silk Touch -item.clockworkphase2:temporal_tool_module_smelt.name=Temporal Tool Module: Smelt -item.clockworkphase2:temporal_tool_module_teleport.name=Temporal Tool Module: Teleport +item.clockworkphase2:tool_upgrade_silk.name=Tool Module: Silk Touch +item.clockworkphase2:tool_upgrade_furnace.name=Tool Module: Internal Furnace +item.clockworkphase2:tool_upgrade_relocate.name=Tool Module: Relocation Matrix item.clockworkphase2:timezone_module_tank.name=Timezone Function: Fluid Tank