diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml index 47662483..db7504a9 100644 --- a/mods/tinker/resources/lang/en_US.xml +++ b/mods/tinker/resources/lang/en_US.xml @@ -12,6 +12,7 @@ Pattern Chest Smeltery Frying Pan + Knapsack Tool Station Part Builder diff --git a/mods/tinker/resources/manuals/materials.xml b/mods/tinker/resources/manuals/materials.xml index bd03d6b4..23bcfc4d 100644 --- a/mods/tinker/resources/manuals/materials.xml +++ b/mods/tinker/resources/manuals/materials.xml @@ -244,6 +244,24 @@ Class: Lethal Joke Weapon + +Chisel +The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere. +Right-click: Block +- Blocking cuts a wide variety of damage types in half. + +Class: Utility Tool +chiselicon + + Chisel Head + chiselhead + + + Tool Rod + toolrod + + + Material Traits Some materials have traits that augment their natural uses. @@ -255,9 +273,6 @@ Class: Lethal Joke Weapon - Awareness: Unknown - - - Wood woodaxe @@ -531,6 +546,22 @@ Stackable: No lavacrystalmod + +Ball of Moss + + mossball + three + + + + +Lava Crystal + + lavacrystal + three + + + Luck Encrusting lapis on tools is a gift to the gods of luck. They will bless your tool with great fortune and loot. @@ -634,6 +665,102 @@ Stackable: No + +Reinforced +Adding an obsidian plate to the tool seems to help with its durability. + +Effects: +- Adds the material trait Reinforced to the tool +- Stacks with previous levels of Reinforced + +Type: Single-use +Stackable: Yes + + + +tool +reinforcedmod + + + +Knockback +Attaching a piston to the tool and activating it at the right time seems to throw mobs further away. + +Effects: +- Adds extra knockback to the tool. + +Type: Multi-use +Stackable: Yes + + + +weapon +pistonmod + + + +Beheading +Working an ender pearl and some obsidian on a weapon has the curious effect of separating the target's head from its body. + +Effects: +- Beheads mobs. Enemies drop their heads as a result. + +Type: Single-use +Stackable: Yes + + + +weapon +beheadingmod + + + +Bane of Arthropods +Striking a spider with its own eyeball causes it to recoil in fear. + +Effects: +- Does extra damage to spiders. +- 1-2 hearts per level. + +Type: Multi-use +Stackable: Yes + + + +weapon +spidermod + + + +Smite +The raw power of consecrated soil empowers your weapon, smiting enemies from on high. + +Effects: +- Does extra damage to undead. +- 1-2 hearts per level. + +Type: Multi-use +Stackable: Yes + + + +weapon +smitemod + + + +Graveyard Soil + + graveyardsoil + two + + + + +Consecrated Soil +consecratedsoil + + Electric Adding a battery and a circuit to a tool gives it an electric field. The tool still functions properly when the battery has no charge. @@ -684,20 +811,4 @@ Stackable: No tier2free - -Ball of Moss - - mossball - three - - - - -Lava Crystal - - lavacrystal - three - - - \ No newline at end of file diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java index f8ec56c4..e66b5ce6 100644 --- a/mods/tinker/tconstruct/TConstruct.java +++ b/mods/tinker/tconstruct/TConstruct.java @@ -38,7 +38,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry; * @dependencies: IC2 API, MFR API */ -@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.dev.58", dependencies = "required-after:Forge@[7.7.1.675,)") +@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.dev.61", dependencies = "required-after:Forge@[7.7.1.675,)") @NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.util.network.TPacketHandler.class) public class TConstruct { diff --git a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java index 5b03980a..6b55b41d 100644 --- a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java +++ b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java @@ -505,28 +505,48 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci int southID = worldObj.getBlockId(x, y, z - 1); int eastID = worldObj.getBlockId(x + 1, y, z); int westID = worldObj.getBlockId(x - 1, y, z); + + Block northBlock = Block.blocksList[northID]; + Block southBlock = Block.blocksList[southID]; + Block eastBlock = Block.blocksList[eastID]; + Block westBlock = Block.blocksList[westID]; - if (northID == 0 && southID == 0 && eastID == 0 && westID == 0) //Center + if ( (northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && + (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1)) && + (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && + (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)) ) { checkValidStructure(x, y, z); } - else if (northID != 0 && southID == 0 && eastID == 0 && westID == 0) + else if ( (northBlock != null && !northBlock.isAirBlock(worldObj, x, y, z + 1)) && + (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1)) && + (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && + (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)) ) { checkValidStructure(x, y, z - 1); } - else if (northID == 0 && southID != 0 && eastID == 0 && westID == 0) + else if ( (northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && + (southBlock != null && !southBlock.isAirBlock(worldObj, x, y, z - 1)) && + (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && + (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)) ) { checkValidStructure(x, y, z + 1); } - else if (northID == 0 && southID == 0 && eastID != 0 && westID == 0) + else if ( (northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && + (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1)) && + (eastBlock != null && !eastBlock.isAirBlock(worldObj, x + 1, y, z)) && + (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)) ) { checkValidStructure(x - 1, y, z); } - else if (northID == 0 && southID == 0 && eastID == 0 && westID != 0) + else if ( (northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && + (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1)) && + (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && + (westBlock != null && !westBlock.isAirBlock(worldObj, x - 1, y, z)) ) { checkValidStructure(x + 1, y, z); } @@ -570,13 +590,15 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci numBricks = 0; lavaTanks.clear(); boolean hasLavaTank = false; + Block block; //Check inside for (int xPos = x - 1; xPos <= x + 1; xPos++) { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - if (worldObj.getBlockId(xPos, y, zPos) != 0) + block = Block.blocksList[worldObj.getBlockId(xPos, y, zPos)]; + if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos)) return false; } } diff --git a/mods/tinker/tconstruct/client/TControls.java b/mods/tinker/tconstruct/client/TControls.java index 0fb11ff3..c52e5fed 100644 --- a/mods/tinker/tconstruct/client/TControls.java +++ b/mods/tinker/tconstruct/client/TControls.java @@ -8,6 +8,7 @@ import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.skill.Skill; import mods.tinker.tconstruct.util.player.TPlayerStats; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.player.EntityPlayer; @@ -35,6 +36,8 @@ public class TControls extends TKeyHandler boolean climbing = false; boolean onGround = false; boolean onStilts = false; + + int currentTab = 1; //boolean onStilts = false; @@ -70,7 +73,7 @@ public class TControls extends TKeyHandler } if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode()) { - TProxyClient.addTabsToInventory(); + TProxyClient.addTabsToInventory((GuiContainer) mc.currentScreen); } /*if (kb == skillOne) { @@ -195,15 +198,32 @@ public class TControls extends TKeyHandler updateServer(bos); } + + public static void openInventoryGui () + { + ByteArrayOutputStream bos = new ByteArrayOutputStream(8); + DataOutputStream outputStream = new DataOutputStream(bos); + try + { + outputStream.writeByte(3); + outputStream.writeByte(0); + } + catch (Exception ex) + { + ex.printStackTrace(); + } - public static void openArmorGui ()//String username) + updateServer(bos); + } + + public static void openArmorGui () { ByteArrayOutputStream bos = new ByteArrayOutputStream(8); DataOutputStream outputStream = new DataOutputStream(bos); try { outputStream.writeByte(3); - //outputStream.writeUTF(username); + outputStream.writeByte(1); } catch (Exception ex) { @@ -212,6 +232,23 @@ public class TControls extends TKeyHandler updateServer(bos); } + + public static void openKnapsackGui () + { + ByteArrayOutputStream bos = new ByteArrayOutputStream(8); + DataOutputStream outputStream = new DataOutputStream(bos); + try + { + outputStream.writeByte(3); + outputStream.writeByte(2); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + updateServer(bos); + } /*public void activateSkill (EntityPlayer player, int slot) { diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java index 8a0cf1fd..1af8349a 100644 --- a/mods/tinker/tconstruct/client/TProxyClient.java +++ b/mods/tinker/tconstruct/client/TProxyClient.java @@ -16,8 +16,8 @@ import mods.tinker.tconstruct.blocks.logic.FrypanLogic; import mods.tinker.tconstruct.blocks.logic.GolemCoreLogic; import mods.tinker.tconstruct.blocks.logic.PartCrafterLogic; import mods.tinker.tconstruct.blocks.logic.PatternChestLogic; -import mods.tinker.tconstruct.blocks.logic.StencilTableLogic; import mods.tinker.tconstruct.blocks.logic.SmelteryLogic; +import mods.tinker.tconstruct.blocks.logic.StencilTableLogic; import mods.tinker.tconstruct.blocks.logic.ToolForgeLogic; import mods.tinker.tconstruct.blocks.logic.ToolStationLogic; import mods.tinker.tconstruct.client.block.BarricadeRender; @@ -46,10 +46,12 @@ import mods.tinker.tconstruct.client.entity.projectile.LaunchedItemRender; import mods.tinker.tconstruct.client.gui.ArmorExtendedGui; import mods.tinker.tconstruct.client.gui.FrypanGui; import mods.tinker.tconstruct.client.gui.GuiManual; +import mods.tinker.tconstruct.client.gui.InventoryTab; +import mods.tinker.tconstruct.client.gui.KnapsackGui; import mods.tinker.tconstruct.client.gui.PartCrafterGui; import mods.tinker.tconstruct.client.gui.PatternChestGui; -import mods.tinker.tconstruct.client.gui.StencilTableGui; import mods.tinker.tconstruct.client.gui.SmelteryGui; +import mods.tinker.tconstruct.client.gui.StencilTableGui; import mods.tinker.tconstruct.client.gui.ToolForgeGui; import mods.tinker.tconstruct.client.gui.ToolStationGui; import mods.tinker.tconstruct.common.TContent; @@ -64,16 +66,18 @@ import mods.tinker.tconstruct.entity.Skyla; import mods.tinker.tconstruct.entity.SlimeClone; import mods.tinker.tconstruct.entity.projectile.DaggerEntity; import mods.tinker.tconstruct.entity.projectile.LaunchedPotion; -import mods.tinker.tconstruct.items.tools.Dagger; import mods.tinker.tconstruct.library.TConstructRegistry; import mods.tinker.tconstruct.library.client.TConstructClientRegistry; import mods.tinker.tconstruct.library.client.ToolGuiElement; import mods.tinker.tconstruct.library.crafting.ToolBuilder; import mods.tinker.tconstruct.library.tools.ToolCore; import mods.tinker.tconstruct.util.player.ArmorExtended; +import mods.tinker.tconstruct.util.player.KnapsackInventory; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelSlime; import net.minecraft.client.particle.EntityAuraFX; @@ -130,8 +134,9 @@ public class TProxyClient extends TProxyCommon public static Icon metalBall; public static Minecraft mc; public static RenderItem itemRenderer = new RenderItem(); - + public static ArmorExtended armorExtended = new ArmorExtended(); + public static KnapsackInventory knapsack = new KnapsackInventory(); @Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) @@ -155,71 +160,102 @@ public class TProxyClient extends TProxyCommon ItemStack stack = player.getCurrentEquippedItem(); return new GuiManual(stack, TProxyClient.getManualFromStack(stack)); } + if (ID == inventoryGui) + { + GuiInventory inventory = new GuiInventory(player); + addTabsToInventory(inventory); + return inventory; + } if (ID == armorGuiID) { - //TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); TProxyClient.armorExtended.init(Minecraft.getMinecraft().thePlayer); return new ArmorExtendedGui(player.inventory, TProxyClient.armorExtended); } + if (ID == knapsackGuiID) + { + TProxyClient.knapsack.init(Minecraft.getMinecraft().thePlayer); + return new KnapsackGui(player.inventory, TProxyClient.knapsack); + } return null; } - - public static void renderStandardInvBlock(RenderBlocks renderblocks, Block block, int meta) - { - Tessellator tessellator = Tessellator.instance; - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, -1F, 0.0F); - renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, -1F); - renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(-1F, 0.0F, 0.0F); - renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta)); - tessellator.draw(); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } + + public static void renderStandardInvBlock (RenderBlocks renderblocks, Block block, int meta) + { + Tessellator tessellator = Tessellator.instance; + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1F, 0.0F); + renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1F); + renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1F, 0.0F, 0.0F); + renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta)); + tessellator.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } public static void openInventoryGui () { - /*if (mc == null) + //controlInstance.openInventoryGui(); + if (mc == null) mc = Minecraft.getMinecraft(); - mc.displayGuiScreen(new GuiInventory(mc.thePlayer)); - addTabsToInventory();*/ + GuiInventory inventory = new GuiInventory(mc.thePlayer); + mc.displayGuiScreen(inventory); + addTabsToInventory(inventory); } - public static void addTabsToInventory () + public static void addTabsToInventory (GuiContainer gui) { /*if (mc == null) - mc = Minecraft.getMinecraft(); - if (mc.currentScreen.getClass() == GuiInventory.class) + mc = Minecraft.getMinecraft();*/ + if (gui.getClass() == GuiInventory.class || classMatches(gui, "micdoodle8.mods.galacticraft.core.client.gui.GCCoreGuiInventory")) { - GuiInventory gui = (GuiInventory) mc.currentScreen; - int cornerX = (gui.width - gui.xSize) / 2; + int cornerX = gui.guiLeft; int cornerY = (gui.height - gui.ySize) / 2; gui.buttonList.clear(); - InventoryTab repairButton = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); - repairButton.enabled = false; - gui.buttonList.add(repairButton); - repairButton = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); - gui.buttonList.add(repairButton); - }*/ + InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); + tab.enabled = false; + gui.buttonList.add(tab); + tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); + gui.buttonList.add(tab); + if (armorExtended.inventory[2] != null && armorExtended.inventory[2].getItem() == TContent.knapsack) + { + if (gui.buttonList.size() < 3) + { + tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1); + gui.buttonList.add(tab); + } + } + } + } + + public static boolean classMatches (Object paramObject, String paramString) + { + try + { + return paramObject.getClass().getName().equals(paramString); + } + catch (Exception localException) + { + return false; + } } public void registerTickHandler () @@ -415,6 +451,9 @@ public class TProxyClient extends TProxyCommon ItemStack silkyCloth = new ItemStack(TContent.materials, 1, 25); + ItemStack graveyardsoil = new ItemStack(TContent.craftedSoil, 1, 3); + ItemStack consecratedsoil = new ItemStack(TContent.craftedSoil, 1, 4); + //TConstruct recipes TConstructClientRegistry.registerManualSmallRecipe("blankpattern", pattern, plank, stick, stick, plank); TConstructClientRegistry.registerManualSmallRecipe("toolstation", new ItemStack(TContent.toolStationWood, 1, 0), null, pattern, null, workbench); @@ -433,6 +472,9 @@ public class TProxyClient extends TProxyCommon TConstructClientRegistry.registerManualLargeRecipe("silkyjewel", new ItemStack(TContent.materials, 1, 26), null, silkyCloth, null, silkyCloth, new ItemStack(Item.emerald), silkyCloth, null, silkyCloth, null); + TConstructClientRegistry.registerManualSmallRecipe("graveyardsoil", graveyardsoil, new ItemStack(Block.dirt), new ItemStack(Item.rottenFlesh), new ItemStack(Item.dyePowder, 1, 15), null); + TConstructClientRegistry.registerManualFurnaceRecipe("consecratedsoil", consecratedsoil, graveyardsoil); + TConstructClientRegistry.registerManualSmallRecipe("grout", grout, sand, gravel, null, clay); TConstructClientRegistry.registerManualFurnaceRecipe("searedbrick", searedbrick, grout); TConstructClientRegistry.registerManualSmallRecipe("searedbricks", new ItemStack(TContent.smeltery, 1, 2), searedbrick, searedbrick, searedbrick, searedbrick); @@ -470,6 +512,13 @@ public class TProxyClient extends TProxyCommon TConstructClientRegistry.registerManualModifier("blazemod", ironlongsword.copy(), new ItemStack(Item.blazePowder)); TConstructClientRegistry.registerManualModifier("necroticmod", ironlongsword.copy(), new ItemStack(TContent.materials, 1, 8)); TConstructClientRegistry.registerManualModifier("silkymod", ironpick.copy(), new ItemStack(TContent.materials, 1, 26)); + TConstructClientRegistry.registerManualModifier("reinforcedmod", ironpick.copy(), new ItemStack(TContent.heavyPlate, 1, 6)); + + TConstructClientRegistry.registerManualModifier("pistonmod", ironlongsword.copy(), new ItemStack(Block.pistonBase)); + TConstructClientRegistry.registerManualModifier("beheadingmod", ironlongsword.copy(), new ItemStack(Item.enderPearl), new ItemStack(Block.obsidian)); + TConstructClientRegistry.registerManualModifier("spidermod", ironlongsword.copy(), new ItemStack(Item.fermentedSpiderEye)); + TConstructClientRegistry.registerManualModifier("smitemod", ironlongsword.copy(), new ItemStack(TContent.craftedSoil, 1, 4)); + TConstructClientRegistry.registerManualModifier("electricmod", ironpick.copy(), new ItemStack(Block.dirt), new ItemStack(Block.dirt)); TConstructClientRegistry.registerManualModifier("tier1free", ironpick.copy(), new ItemStack(Item.diamond), new ItemStack(Block.blockGold)); TConstructClientRegistry.registerManualModifier("tier2free", ironpick.copy(), new ItemStack(Item.netherStar)); @@ -559,25 +608,31 @@ public class TProxyClient extends TProxyCommon addToolButton(itemIcons[i][0], itemIcons[i][1], itemIcons[i][2], iconCoords[i * 2], iconCoords[i * 2 + 1], toolNames[i], toolDescriptions[i]); } - addTierTwoButton(6, 13, 0, new int[] { 11, 8, 9, 9 }, new int[] { 2, 3, 2, 2 }, "Hammer", - "The Hammer is a broad mining tool. It harvests blocks in a wide range and is effective against undead.\n\nNatural Abilities:\nArea of Effect\n- (3x3x3)\n- Smite\n\nDurability: High"); - addTierTwoButton(5, 11, 0, new int[] { 6, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, "Lumber Axe", - "The Lumber Axe is a broad chopping tool. It can fell entire trees or gather wood in a wide range.\n\nNatural Abilities:\n- Fell Trees\nArea of Effect\n- (3x3x3)\n\nDurability: Average"); - addTierTwoButton(4, 12, 0, new int[] { 10, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, "Excavator", - "The Excavator is a broad digging tool. It harvests soil and snow in a wide range.\n\nNatural Ability:\n- Area of Effect\n- (3x3)\n\nDurability: Average"); - addTierTwoButton(4, 10, 0, new int[] { 8, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, "Scythe", - "The Scythe is a broad reaping tool. It is effective on plants and attacks enemies in a wide range.\n\nNatural Ability:\nArea of Effect\n- (3x3x3)\n\nDurability: Average\nDamage: Low, AoE"); - addTierTwoButton(5, 7, 1, new int[] { 6, 8, 9, 8 }, new int[] { 3, 3, 2, 3 }, "Cleaver", - "The Cleaver is a heavy defensive weapon. It has powerful strikes, but is difficult to wield.\n\nSpecial Ability: Block\nNatural Ability:\n- Beheading\n\nDamage: Very High\nDurability: Average"); - addTierTwoButton(5, 8, 1, new int[] { 6, 8, 6, 9 }, new int[] { 2, 3, 2, 3 }, "Battleaxe", - "The Battleaxe is a heavy offensive weapon. It is capable of bringing down small trees and can send foes flying.\n\nSpecial Ability: Block\nNatural Abilities:\n- Knockback\n- Area of Effect\n- (1x9)\n\nDamage: Average\nDurability: Average"); + addTierTwoButton(6, 13, 0, new int[] { 11, 8, 9, 9 }, new int[] { 2, 3, 2, 2 }, "Hammer", + "The Hammer is a broad mining tool. It harvests blocks in a wide range and is effective against undead.\n\nNatural Abilities:\nArea of Effect\n- (3x3x3)\n- Smite\n\nDurability: High"); + addTierTwoButton(5, 11, 0, new int[] { 6, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, "Lumber Axe", + "The Lumber Axe is a broad chopping tool. It can fell entire trees or gather wood in a wide range.\n\nNatural Abilities:\n- Fell Trees\nArea of Effect\n- (3x3x3)\n\nDurability: Average"); + addTierTwoButton(4, 12, 0, new int[] { 10, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, "Excavator", + "The Excavator is a broad digging tool. It harvests soil and snow in a wide range.\n\nNatural Ability:\n- Area of Effect\n- (3x3)\n\nDurability: Average"); + addTierTwoButton(4, 10, 0, new int[] { 8, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, "Scythe", + "The Scythe is a broad reaping tool. It is effective on plants and attacks enemies in a wide range.\n\nNatural Ability:\nArea of Effect\n- (3x3x3)\n\nDurability: Average\nDamage: Low, AoE"); + addTierTwoButton(5, 7, 1, new int[] { 6, 8, 9, 8 }, new int[] { 3, 3, 2, 3 }, "Cleaver", + "The Cleaver is a heavy defensive weapon. It has powerful strikes, but is difficult to wield.\n\nSpecial Ability: Block\nNatural Ability:\n- Beheading\n\nDamage: Very High\nDurability: Average"); + addTierTwoButton( + 5, + 8, + 1, + new int[] { 6, 8, 6, 9 }, + new int[] { 2, 3, 2, 3 }, + "Battleaxe", + "The Battleaxe is a heavy offensive weapon. It is capable of bringing down small trees and can send foes flying.\n\nSpecial Ability: Block\nNatural Abilities:\n- Knockback\n- Area of Effect\n- (1x9)\n\nDamage: Average\nDurability: Average"); } void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body) { TConstructClientRegistry.addToolButton(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, "/mods/tinker/textures/gui/icons.png")); } - + void addTierTwoButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body) { TConstructClientRegistry.addTierTwoButton(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, "/mods/tinker/textures/gui/icons.png")); @@ -587,11 +642,12 @@ public class TProxyClient extends TProxyCommon { String[] partTypes = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze", "alumite", "steel", "blueslime" }; - String[] effectTypes = { "diamond", "emerald", "redstone", "piston", "moss", "ice", "lava", "blaze", "necrotic", "electric", "lapis", "quartz", "silk", "beheading", "smite", "spider", "reinforced" }; + String[] effectTypes = { "diamond", "emerald", "redstone", "piston", "moss", "ice", "lava", "blaze", "necrotic", "electric", "lapis", "quartz", "silk", "beheading", "smite", "spider", + "reinforced" }; int[] universalEffects = { 0, 1, 4, 9, 16 }; - int[] weaponEffects = { 3, 5, 7, 8, 12, 13, 14, 15 }; + int[] weaponEffects = { 3, 5, 7, 8, 11, 13, 14, 15 }; int[] harvestEffects = { 2 }; - int[] nonUtility = { 6, 10, 11 }; + int[] nonUtility = { 6, 10, 12 }; for (int partIter = 0; partIter < partTypes.length; partIter++) { @@ -603,30 +659,30 @@ public class TProxyClient extends TProxyCommon List list = Arrays.asList(tool.toolCategories()); for (int i = 0; i < universalEffects.length; i++) { - TConstructClientRegistry.addEffectRenderMapping(universalEffects[i], "tinker", effectTypes[universalEffects[i]], true); + TConstructClientRegistry.addEffectRenderMapping(tool, universalEffects[i], "tinker", effectTypes[universalEffects[i]], true); } - + if (list.contains("harvest")) - { + { for (int i = 0; i < harvestEffects.length; i++) { - TConstructClientRegistry.addEffectRenderMapping(harvestEffects[i], "tinker", effectTypes[harvestEffects[i]], true); + TConstructClientRegistry.addEffectRenderMapping(tool, harvestEffects[i], "tinker", effectTypes[harvestEffects[i]], true); } } - + if (list.contains("weapon")) { for (int i = 0; i < weaponEffects.length; i++) { - TConstructClientRegistry.addEffectRenderMapping(weaponEffects[i], "tinker", effectTypes[weaponEffects[i]], true); + TConstructClientRegistry.addEffectRenderMapping(tool, weaponEffects[i], "tinker", effectTypes[weaponEffects[i]], true); } } - + if (list.contains("weapon") || list.contains("harvest")) { for (int i = 0; i < nonUtility.length; i++) { - TConstructClientRegistry.addEffectRenderMapping(nonUtility[i], "tinker", effectTypes[nonUtility[i]], true); + TConstructClientRegistry.addEffectRenderMapping(tool, nonUtility[i], "tinker", effectTypes[nonUtility[i]], true); } } } diff --git a/mods/tinker/tconstruct/client/gui/ArmorExtendedGui.java b/mods/tinker/tconstruct/client/gui/ArmorExtendedGui.java index e2d54080..545f678c 100644 --- a/mods/tinker/tconstruct/client/gui/ArmorExtendedGui.java +++ b/mods/tinker/tconstruct/client/gui/ArmorExtendedGui.java @@ -1,6 +1,7 @@ package mods.tinker.tconstruct.client.gui; import mods.tinker.tconstruct.client.TControls; +import mods.tinker.tconstruct.common.TContent; import mods.tinker.tconstruct.inventory.ArmorExtendedContainer; import mods.tinker.tconstruct.util.player.ArmorExtended; import mods.tinker.tconstruct.util.player.TPlayerStats; @@ -22,80 +23,96 @@ public class ArmorExtendedGui extends InventoryEffectRenderer { public InventoryPlayer inv; public ArmorExtended stats; - + private float xSize_lo; private float ySize_lo; - public ArmorExtendedGui(InventoryPlayer inventoryplayer, ArmorExtended holder) { super(new ArmorExtendedContainer(inventoryplayer, holder)); inv = inventoryplayer; stats = holder; } - - public void initGui() + + public void initGui () { super.initGui(); - - int cornerX = (this.width - this.xSize) / 2; + + int cornerX = guiLeft; int cornerY = (this.height - this.ySize) / 2; this.buttonList.clear(); - InventoryTab repairButton = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); - this.buttonList.add(repairButton); - repairButton = new InventoryTab(3, cornerX+28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); - repairButton.enabled = false; - this.buttonList.add(repairButton); + InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); + this.buttonList.add(tab); + tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); + tab.enabled = false; + this.buttonList.add(tab); } - protected void drawGuiContainerForegroundLayer(int par1, int par2) + protected void drawGuiContainerForegroundLayer (int par1, int par2) { //fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"), 60, 6, 0x404040); //fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040); } - - public void drawScreen(int par1, int par2, float par3) + + public void drawScreen (int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); - this.xSize_lo = (float)par1; - this.ySize_lo = (float)par2; + this.xSize_lo = (float) par1; + this.ySize_lo = (float) par2; + if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack) + { + if (this.buttonList.size() < 3) + { + int cornerX = guiLeft; + int cornerY = (this.height - this.ySize) / 2; + InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1); + this.buttonList.add(tab); + } + } + else + { + if (this.buttonList.size() >= 3) + { + buttonList.remove(2); + } + } } - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) + protected void drawGuiContainerBackgroundLayer (float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png"); - int cornerX = (width - xSize) / 2; + int cornerX = guiLeft; int cornerY = (height - ySize) / 2; drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); - + if (!stats.isStackInSlot(0)) - drawTexturedModalRect(cornerX+79, cornerY+16, 176, 9, 18, 18); + drawTexturedModalRect(cornerX + 79, cornerY + 16, 176, 9, 18, 18); if (!stats.isStackInSlot(1)) - drawTexturedModalRect(cornerX+79, cornerY+34, 176, 27, 18, 18); + drawTexturedModalRect(cornerX + 79, cornerY + 34, 176, 27, 18, 18); if (!stats.isStackInSlot(2)) - drawTexturedModalRect(cornerX+115, cornerY+16, 212, 9, 18, 18); + drawTexturedModalRect(cornerX + 115, cornerY + 16, 212, 9, 18, 18); if (!stats.isStackInSlot(3)) - drawTexturedModalRect(cornerX+115, cornerY+34, 212, 27, 18, 18); + drawTexturedModalRect(cornerX + 115, cornerY + 34, 212, 27, 18, 18); if (!stats.isStackInSlot(4)) - drawTexturedModalRect(cornerX+151, cornerY+16, 230, 0, 18, 18); + drawTexturedModalRect(cornerX + 151, cornerY + 16, 230, 0, 18, 18); if (!stats.isStackInSlot(5)) - drawTexturedModalRect(cornerX+151, cornerY+34, 230, 18, 18, 18); + drawTexturedModalRect(cornerX + 151, cornerY + 34, 230, 18, 18, 18); if (!stats.isStackInSlot(6)) - drawTexturedModalRect(cornerX+151, cornerY+52, 230, 36, 18, 18); + drawTexturedModalRect(cornerX + 151, cornerY + 52, 230, 36, 18, 18); cornerX = this.guiLeft; cornerY = this.guiTop; - drawPlayerOnGui(this.mc, cornerX + 33, cornerY + 75, 30, (float)(cornerX + 51) - this.xSize_lo, (float)(cornerY + 75 - 50) - this.ySize_lo); + drawPlayerOnGui(this.mc, cornerX + 33, cornerY + 75, 30, (float) (cornerX + 51) - this.xSize_lo, (float) (cornerY + 75 - 50) - this.ySize_lo); } - - public static void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) + + public static void drawPlayerOnGui (Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) { GL11.glEnable(GL11.GL_COLOR_MATERIAL); GL11.glPushMatrix(); - GL11.glTranslatef((float)par1, (float)par2, 50.0F); - GL11.glScalef((float)(-par3), (float)par3, (float)par3); + GL11.glTranslatef((float) par1, (float) par2, 50.0F); + GL11.glScalef((float) (-par3), (float) par3, (float) par3); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); float f2 = par0Minecraft.thePlayer.renderYawOffset; float f3 = par0Minecraft.thePlayer.rotationYaw; @@ -104,10 +121,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-((float)Math.atan((double)(par5 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); - par0Minecraft.thePlayer.renderYawOffset = (float)Math.atan((double)(par4 / 40.0F)) * 20.0F; - par0Minecraft.thePlayer.rotationYaw = (float)Math.atan((double)(par4 / 40.0F)) * 40.0F; - par0Minecraft.thePlayer.rotationPitch = -((float)Math.atan((double)(par5 / 40.0F))) * 20.0F; + GL11.glRotatef(-((float) Math.atan((double) (par5 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); + par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan((double) (par4 / 40.0F)) * 20.0F; + par0Minecraft.thePlayer.rotationYaw = (float) Math.atan((double) (par4 / 40.0F)) * 40.0F; + par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan((double) (par5 / 40.0F))) * 20.0F; par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw; GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F); RenderManager.instance.playerViewY = 180.0F; @@ -122,7 +139,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); } - + /*protected void keyTyped(char par1, int par2) { if (par2 == TControls.armorKey.keyCode) diff --git a/mods/tinker/tconstruct/client/gui/InventoryTab.java b/mods/tinker/tconstruct/client/gui/InventoryTab.java index 151c3efc..fe747693 100644 --- a/mods/tinker/tconstruct/client/gui/InventoryTab.java +++ b/mods/tinker/tconstruct/client/gui/InventoryTab.java @@ -4,7 +4,6 @@ import mods.tinker.tconstruct.client.TControls; import mods.tinker.tconstruct.client.TProxyClient; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.item.ItemStack; @@ -65,7 +64,9 @@ public class InventoryTab extends GuiButton if (this.id == 2) TProxyClient.openInventoryGui(); if (this.id == 3) - TControls.openArmorGui();//mc.thePlayer.username); + TControls.openArmorGui(); + if (this.id == 4) + TControls.openKnapsackGui(); } return inWindow; } diff --git a/mods/tinker/tconstruct/client/gui/KnapsackGui.java b/mods/tinker/tconstruct/client/gui/KnapsackGui.java new file mode 100644 index 00000000..2a376034 --- /dev/null +++ b/mods/tinker/tconstruct/client/gui/KnapsackGui.java @@ -0,0 +1,73 @@ +package mods.tinker.tconstruct.client.gui; + +import mods.tinker.tconstruct.common.TContent; +import mods.tinker.tconstruct.inventory.KnapsackContainer; +import mods.tinker.tconstruct.util.player.KnapsackInventory; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +public class KnapsackGui extends GuiContainer +{ + public InventoryPlayer inv; + public KnapsackInventory stats; + + public KnapsackGui(InventoryPlayer inventoryplayer, KnapsackInventory holder) + { + super(new KnapsackContainer(inventoryplayer, holder)); + inv = inventoryplayer; + stats = holder; + } + + public void initGui() + { + super.initGui(); + + int cornerX = guiLeft; + int cornerY = (this.height - this.ySize) / 2; + this.buttonList.clear(); + + InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); + this.buttonList.add(tab); + tab = new InventoryTab(3, cornerX+28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); + this.buttonList.add(tab); + tab = new InventoryTab(4, cornerX+56, cornerY - 28, new ItemStack(TContent.knapsack), 1); + tab.enabled = false; + this.buttonList.add(tab); + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) + { + fontRenderer.drawString(StatCollector.translateToLocal("inventory.knapsack"), 8, 6, 0x404040); + fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 4, 0x404040); + } + + protected void drawGuiContainerBackgroundLayer(float f, int i, int j) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + mc.renderEngine.bindTexture("/mods/tinker/textures/gui/knapsack.png"); + int cornerX = guiLeft; + int cornerY = (height - ySize) / 2; + drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); + } + + /*protected void keyTyped(char par1, int par2) + { + if (par2 == TControls.armorKey.keyCode) + { + this.mc.thePlayer.closeScreen(); + } + + super.keyTyped(par1, par2); + }*/ +} diff --git a/mods/tinker/tconstruct/common/TContent.java b/mods/tinker/tconstruct/common/TContent.java index 006be5ed..d923104d 100644 --- a/mods/tinker/tconstruct/common/TContent.java +++ b/mods/tinker/tconstruct/common/TContent.java @@ -176,6 +176,7 @@ public class TContent implements IFuelHandler public static Item heavyPants; public static Item heavyBoots; public static Item glove; + public static Item knapsack; public static Item heartCanister; @@ -446,6 +447,7 @@ public class TContent implements IFuelHandler heartCanister = new HeartCanister(PHConstruct.heartCanister).setUnlocalizedName("tconstruct.canister"); heavyBoots = new TArmorBase(PHConstruct.heavyBoots, 3).setUnlocalizedName("tconstruct.HeavyBoots"); glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); + knapsack = new Knapsack(PHConstruct.knapsack).setUnlocalizedName("tconstruct.storage"); /*public static Item heavyHelmet; public static Item heavyChestplate; public static Item heavyPants; @@ -636,7 +638,7 @@ public class TContent implements IFuelHandler tb.registerToolMod(new ModAntiSpider("Anti-Spider", new ItemStack[] { spidereyeball, spidereyeball }, 15, 2)); ItemStack obsidianPlate = new ItemStack(heavyPlate, 1, 6); - tb.registerToolMod(new ModReinforced( new ItemStack[] { obsidianPlate }, 16, 1)); + tb.registerToolMod(new ModReinforced( new ItemStack[] { obsidianPlate }, 16, 1)); TConstructRegistry.registerActiveToolMod(new TActiveOmniMod()); @@ -932,10 +934,13 @@ public class TContent implements IFuelHandler GameRegistry.addRecipe(new ItemStack(Block.pressurePlateGold), "ii", 'i', aluBrass); ItemStack necroticBone = new ItemStack(materials, 1, 8); + //Accessories GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(heartCanister, 1, 0), "##", "##", '#', "ingotNaturalAluminum")); GameRegistry.addRecipe(new ItemStack(diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Item.diamond), '#', new ItemStack(Item.appleRed)); GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 2), new ItemStack(diamondApple), necroticBone, new ItemStack(heartCanister, 1, 0), new ItemStack(heartCanister, 1, 1)); + GameRegistry.addRecipe(new ItemStack(knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Item.leather), 'r', new ItemStack(toughRod, 1, 2), 'm', new ItemStack(Item.ingotGold)); + GameRegistry.addRecipe(new ItemStack(knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Item.leather), 'r', new ItemStack(toughRod, 1, 2), 'm', new ItemStack(materials, 1, 14)); } void setupToolTabs () diff --git a/mods/tinker/tconstruct/common/TProxyCommon.java b/mods/tinker/tconstruct/common/TProxyCommon.java index cd46d6a4..228a9b55 100644 --- a/mods/tinker/tconstruct/common/TProxyCommon.java +++ b/mods/tinker/tconstruct/common/TProxyCommon.java @@ -4,12 +4,13 @@ import java.io.File; import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.inventory.ArmorExtendedContainer; +import mods.tinker.tconstruct.inventory.KnapsackContainer; import mods.tinker.tconstruct.library.blocks.InventoryLogic; import mods.tinker.tconstruct.util.player.TPlayerStats; +import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; - import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -25,9 +26,12 @@ public class TProxyCommon implements IGuiHandler public static int pshaperGuiID = 3; public static int frypanGuiID = 4; public static int toolForge = 5; - public static int smelteryGuiID = 7; + + public static int inventoryGui = 100; public static int armorGuiID = 101; + public static int knapsackGuiID = 102; + public static int manualGuiID = -1; @Override @@ -36,7 +40,7 @@ public class TProxyCommon implements IGuiHandler if (ID < 0) return null; - else if (ID <= 100) + else if (ID < 100) { TileEntity tile = world.getBlockTileEntity(x, y, z); if (tile != null && tile instanceof InventoryLogic) @@ -46,11 +50,21 @@ public class TProxyCommon implements IGuiHandler } else { + if (ID == inventoryGui) + { + //GuiInventory inv = new GuiInventory(player); + return player.inventoryContainer; + } if (ID == armorGuiID) { TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); return new ArmorExtendedContainer(player.inventory, stats.armor); } + if (ID == knapsackGuiID) + { + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + return new KnapsackContainer(player.inventory, stats.knapsack); + } } return null; } diff --git a/mods/tinker/tconstruct/inventory/KnapsackContainer.java b/mods/tinker/tconstruct/inventory/KnapsackContainer.java new file mode 100644 index 00000000..1a1b313f --- /dev/null +++ b/mods/tinker/tconstruct/inventory/KnapsackContainer.java @@ -0,0 +1,95 @@ +package mods.tinker.tconstruct.inventory; + +import mods.tinker.tconstruct.library.util.IPattern; +import mods.tinker.tconstruct.util.player.KnapsackInventory; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class KnapsackContainer extends Container +{ + public KnapsackInventory backpack; + public int progress = 0; + public int fuel = 0; + public int fuelGague = 0; + + public KnapsackContainer(InventoryPlayer inventoryplayer, KnapsackInventory knapsack) + { + backpack = knapsack; + for (int column = 0; column < 3; column++) + { + for (int row = 0; row < 9; row++) + { + this.addSlotToContainer(new Slot(knapsack, row + column * 9, 8 + row * 18, 18 + column * 18)); + } + } + + /* Player inventory */ + for (int column = 0; column < 3; column++) + { + for (int row = 0; row < 9; row++) + { + this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18)); + } + } + + for (int column = 0; column < 9; column++) + { + this.addSlotToContainer(new Slot(inventoryplayer, column, 8 + column * 18, 142)); + } + } + + + @Override + public boolean canInteractWith(EntityPlayer entityplayer) + { + return backpack.isUseableByPlayer(entityplayer); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int slotID) + { + ItemStack stack = null; + Slot slot = (Slot)this.inventorySlots.get(slotID); + + if (slot != null && slot.getHasStack()) + { + ItemStack slotStack = slot.getStack(); + stack = slotStack.copy(); + + if (slotID < backpack.getSizeInventory()) + { + if (!this.mergeItemStack(slotStack, backpack.getSizeInventory(), this.inventorySlots.size(), true)) + { + return null; + } + } + else if (!this.mergeItemStack(slotStack, 0, backpack.getSizeInventory(), false)) + { + return null; + } + + if (slotStack.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + } + + return stack; + } + + @Override + protected boolean mergeItemStack(ItemStack stack, int inventorySize, int slotSize, boolean par4) + { + if (!(stack.getItem() instanceof IPattern)) + return false; + + return super.mergeItemStack(stack, inventorySize, slotSize, par4); + } +} diff --git a/mods/tinker/tconstruct/items/HeartCanister.java b/mods/tinker/tconstruct/items/armor/HeartCanister.java similarity index 95% rename from mods/tinker/tconstruct/items/HeartCanister.java rename to mods/tinker/tconstruct/items/armor/HeartCanister.java index 09197122..0e4c6eeb 100644 --- a/mods/tinker/tconstruct/items/HeartCanister.java +++ b/mods/tinker/tconstruct/items/armor/HeartCanister.java @@ -1,8 +1,9 @@ -package mods.tinker.tconstruct.items; +package mods.tinker.tconstruct.items.armor; import java.util.List; import mods.tinker.tconstruct.TConstruct; +import mods.tinker.tconstruct.items.CraftingItem; import mods.tinker.tconstruct.util.player.ArmorExtended; import mods.tinker.tconstruct.util.player.TPlayerStats; import net.minecraft.entity.player.EntityPlayer; diff --git a/mods/tinker/tconstruct/items/armor/Knapsack.java b/mods/tinker/tconstruct/items/armor/Knapsack.java new file mode 100644 index 00000000..a476b5c1 --- /dev/null +++ b/mods/tinker/tconstruct/items/armor/Knapsack.java @@ -0,0 +1,62 @@ +package mods.tinker.tconstruct.items.armor; + +import java.util.List; + +import mods.tinker.tconstruct.TConstruct; +import mods.tinker.tconstruct.items.CraftingItem; +import mods.tinker.tconstruct.util.player.ArmorExtended; +import mods.tinker.tconstruct.util.player.TPlayerStats; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class Knapsack extends CraftingItem +{ + + public Knapsack(int id) + { + super(id, new String[] { "knapsack" }, new String[] { "knapsack" }, "armor/"); + this.setMaxStackSize(10); + } + + @Override + public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player) + { + /*if (!world.isRemote && stack.getItemDamage() == 2) + { + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + if (stats != null) + { + ArmorExtended armor = stats.armor; + ItemStack slotStack = armor.getStackInSlot(6); + if (slotStack == null)// || slotStack.getItem() == this) + { + armor.setInventorySlotContents(6, new ItemStack(this, 1, 2)); + stack.stackSize--; + } + else if (slotStack.getItem() == this && slotStack.stackSize < this.maxStackSize) + { + slotStack.stackSize++; + stack.stackSize--; + } + armor.recalculateHealth(player, stats); + } + }*/ + return stack; + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) + { + switch (stack.getItemDamage()) + { + case 0: + list.add("A Knapsack to hold your things."); + break; + } + } + +} diff --git a/mods/tinker/tconstruct/items/tools/Hammer.java b/mods/tinker/tconstruct/items/tools/Hammer.java index 292264fe..4e295bdd 100644 --- a/mods/tinker/tconstruct/items/tools/Hammer.java +++ b/mods/tinker/tconstruct/items/tools/Hammer.java @@ -2,9 +2,6 @@ package mods.tinker.tconstruct.items.tools; import java.util.ArrayList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import mods.tinker.tconstruct.common.TContent; import mods.tinker.tconstruct.library.ActiveToolMod; import mods.tinker.tconstruct.library.TConstructRegistry; @@ -13,6 +10,7 @@ import mods.tinker.tconstruct.library.tools.HarvestTool; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -23,6 +21,8 @@ import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class Hammer extends HarvestTool { @@ -213,6 +213,105 @@ public class Hammer extends HarvestTool ArrayList coords = new ArrayList(); + /*@Override + public boolean onBlockDestroyed (ItemStack stack, World world, int blockID, int x, int y, int z, EntityLiving entity) + { + System.out.println("Rawr!"); + //return AbilityHelper.onBlockChanged(stack, world, blockID, x, y, z, player, random); + int localID = blockID; + int meta = world.getBlockMetadata(x, y, z); + Block block = Block.blocksList[blockID]; + if (!stack.hasTagCompound()) + return false; + + boolean validStart = false; + for (int iter = 0; iter < materials.length; iter++) + { + if (materials[iter] == block.blockMaterial) + { + validStart = true; + break; + } + } + + MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(world, entity, true, 6); + if (mop == null || !validStart) + return AbilityHelper.onBlockChanged(stack, world, blockID, x, y, z, entity, random); + + int xRange = 1; + int yRange = 1; + int zRange = 1; + switch (mop.sideHit) + { + case 0: + case 1: + yRange = 0; + break; + case 2: + case 3: + zRange = 0; + break; + case 4: + case 5: + xRange = 0; + break; + } + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + for (int xPos = x - xRange; xPos <= x + xRange; xPos++) + { + for (int yPos = y - yRange; yPos <= y + yRange; yPos++) + { + for (int zPos = z - zRange; zPos <= z + zRange; zPos++) + { + if (!(tags.getBoolean("Broken"))) + { + int localblockID = world.getBlockId(xPos, yPos, zPos); + block = Block.blocksList[localblockID]; + meta = world.getBlockMetadata(xPos, yPos, zPos); + int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); + + if (hlvl <= tags.getInteger("HarvestLevel")) + { + boolean cancelHarvest = false; + for (ActiveToolMod mod : TConstructRegistry.activeModifiers) + { + if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, entity)) + cancelHarvest = true; + } + + if (!cancelHarvest) + { + if (block != null && !(block.blockHardness < 0)) + { + for (int iter = 0; iter < materials.length; iter++) + { + if (materials[iter] == block.blockMaterial) + { + world.setBlockToAir(xPos, yPos, zPos); + if (entity instanceof EntityPlayer) + { + if (!((EntityPlayer) entity).capabilities.isCreativeMode) + { + block.harvestBlock(world, (EntityPlayer) entity, xPos, yPos, zPos, meta); + AbilityHelper.onBlockChanged(stack, world, blockID, x, y, z, entity, random); + } + } + localID = localblockID; + } + } + } + } + } + } + } + } + } + AbilityHelper.onBlockChanged(stack, world, blockID, x, y, z, entity, random); + if (!world.isRemote) + world.playAuxSFX(2001, x, y, z, localID + (meta << 12)); + return true; + }*/ + @Override public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) { @@ -306,7 +405,7 @@ public class Hammer extends HarvestTool world.playAuxSFX(2001, x, y, z, blockID + (meta << 12)); return true; } - + @Override public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5) { diff --git a/mods/tinker/tconstruct/library/ActiveToolMod.java b/mods/tinker/tconstruct/library/ActiveToolMod.java index fe98cf79..760a20a1 100644 --- a/mods/tinker/tconstruct/library/ActiveToolMod.java +++ b/mods/tinker/tconstruct/library/ActiveToolMod.java @@ -17,7 +17,7 @@ public class ActiveToolMod } /* Harvesting */ - public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityPlayer player) + public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityLiving entity) { return false; } diff --git a/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java b/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java index 60af6775..0b143eb3 100644 --- a/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java +++ b/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java @@ -34,6 +34,14 @@ public class TConstructClientRegistry tool.registerPartPaths(materialID, toolIcons); } } + public static void addEffectRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) + { + String icon = domain + ":"; + if (useDefaultFolder) + icon += tool.getDefaultFolder() + "/"; + icon += renderName + tool.getEffectSuffix(); + tool.registerEffectPath(materialID, icon); + } public static void addEffectRenderMapping (int materialID, String domain, String renderName, boolean useDefaultFolder) { diff --git a/mods/tinker/tconstruct/library/crafting/ToolBuilder.java b/mods/tinker/tconstruct/library/crafting/ToolBuilder.java index 8d7b19dc..9f8047d6 100644 --- a/mods/tinker/tconstruct/library/crafting/ToolBuilder.java +++ b/mods/tinker/tconstruct/library/crafting/ToolBuilder.java @@ -237,7 +237,7 @@ public class ToolBuilder modifier /= handles; } - durability = (int) (durability * modifier * (0.5 + heads * 0.5) / heads * item.getDurabilityModifier()); + durability = (int) (durability / heads * (0.5 + heads * 0.5) * modifier * item.getDurabilityModifier()); attack = attack / heads + item.getDamageVsEntity(null); if (attack % heads != 0) attack++; diff --git a/mods/tinker/tconstruct/library/tools/ToolCore.java b/mods/tinker/tconstruct/library/tools/ToolCore.java index ad89ba81..79df01fd 100644 --- a/mods/tinker/tconstruct/library/tools/ToolCore.java +++ b/mods/tinker/tconstruct/library/tools/ToolCore.java @@ -680,28 +680,29 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox return false; } + boolean used = false; int hotbarSlot = player.inventory.currentItem; if (hotbarSlot == 0) { - ItemStack next = player.inventory.getStackInSlot(8); - if (next != null && next.getItem() instanceof ItemBlock) + ItemStack nearbyStack = player.inventory.getStackInSlot(8); + if (nearbyStack != null && nearbyStack.getItem() instanceof ItemBlock) { - next.getItem().onItemUse(next, player, world, x, y, z, side, clickX, clickY, clickZ); - if (next.stackSize < 1) + used = nearbyStack.getItem().onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ); + if (nearbyStack.stackSize < 1) player.inventory.setInventorySlotContents(8, null); } } else if (hotbarSlot < 8) { - ItemStack next = player.inventory.getStackInSlot(hotbarSlot + 1); - if (next != null && next.getItem() instanceof ItemBlock) + ItemStack nearbyStack = player.inventory.getStackInSlot(hotbarSlot + 1); + if (nearbyStack != null && nearbyStack.getItem() instanceof ItemBlock) { - next.getItem().onItemUse(next, player, world, x, y, z, side, clickX, clickY, clickZ); - if (next.stackSize < 1) + used = nearbyStack.getItem().onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ); + if (nearbyStack.stackSize < 1) player.inventory.setInventorySlotContents(hotbarSlot + 1, null); } } - return false; + return used; } /* IC2 Support diff --git a/mods/tinker/tconstruct/modifiers/ModPiston.java b/mods/tinker/tconstruct/modifiers/ModPiston.java index afb04dee..ee91aa77 100644 --- a/mods/tinker/tconstruct/modifiers/ModPiston.java +++ b/mods/tinker/tconstruct/modifiers/ModPiston.java @@ -19,7 +19,7 @@ public class ModPiston extends ToolMod super(items, effect, "Piston"); tooltipName = "\u00a77Knockback"; increase = inc; - max = 25; + max = 10; } @Override @@ -82,7 +82,7 @@ public class ModPiston extends ToolMod float knockback = tags.getFloat("Knockback"); - knockback += 0.015 * increase; + knockback += 0.1 * increase; tags.setFloat("Knockback", knockback); } diff --git a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java index ef0af9ea..e30e3aa6 100644 --- a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java +++ b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java @@ -48,17 +48,17 @@ public class TActiveOmniMod extends ActiveToolMod /* Harvesting */ @Override - public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityPlayer player) + public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityLiving entity) { - if (player.capabilities.isCreativeMode) + if (entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode) return false; if (tool instanceof HarvestTool) TContent.modL.midStreamModify(stack); NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - World world = player.worldObj; - int bID = player.worldObj.getBlockId(x, y, z); + World world = entity.worldObj; + int bID = entity.worldObj.getBlockId(x, y, z); int meta = world.getBlockMetadata(x, y, z); Block block = Block.blocksList[bID]; if (block == null || bID < 1 || bID > 4095) @@ -73,8 +73,8 @@ public class TActiveOmniMod extends ActiveToolMod if (result != null) { world.setBlockToAir(x, y, z); - if (!player.capabilities.isCreativeMode) - tool.onBlockDestroyed(stack, world, bID, x, y, z, player); + if (entity instanceof EntityPlayer && !((EntityPlayer)entity).capabilities.isCreativeMode) + tool.onBlockDestroyed(stack, world, bID, x, y, z, entity); if (!world.isRemote) { ItemStack spawnme = result.copy(); @@ -116,7 +116,7 @@ public class TActiveOmniMod extends ActiveToolMod { j = EntityXPOrb.getXPSplit(i); i -= j; - player.worldObj.spawnEntityInWorld(new EntityXPOrb(world, x, y + 0.5, z, j)); + entity.worldObj.spawnEntityInWorld(new EntityXPOrb(world, x, y + 0.5, z, j)); } } for (int i = 0; i < 6; i++) @@ -176,7 +176,6 @@ public class TActiveOmniMod extends ActiveToolMod int base = array[0] / 2; bonus += 1 + base + random.nextInt(base+1); } - System.out.println("Bonus damage: "+bonus); return bonus; } diff --git a/mods/tinker/tconstruct/util/PHConstruct.java b/mods/tinker/tconstruct/util/PHConstruct.java index ae57863e..218835ef 100644 --- a/mods/tinker/tconstruct/util/PHConstruct.java +++ b/mods/tinker/tconstruct/util/PHConstruct.java @@ -162,6 +162,7 @@ public class PHConstruct heavyPants = config.getItem("Equipables", "Heavy Pants", 14109).getInt(14109); heavyBoots = config.getItem("Equipables", "Heavy Boots", 14110).getInt(14110); glove = config.getItem("Equipables", "Gloves", 14111).getInt(14111); + knapsack = config.getItem("Equipables", "Knapsack", 14112).getInt(14112); boolean ic2 = true; boolean xycraft = true; @@ -363,6 +364,7 @@ public class PHConstruct public static int heavyPants; public static int heavyBoots; public static int glove; + public static int knapsack; public static int heartCanister; diff --git a/mods/tinker/tconstruct/util/network/TPacketHandler.java b/mods/tinker/tconstruct/util/network/TPacketHandler.java index b63712d6..0401c489 100644 --- a/mods/tinker/tconstruct/util/network/TPacketHandler.java +++ b/mods/tinker/tconstruct/util/network/TPacketHandler.java @@ -29,131 +29,142 @@ import cpw.mods.fml.relauncher.Side; public class TPacketHandler implements IPacketHandler { - @Override - public void onPacketData (INetworkManager manager, Packet250CustomPayload packet, Player player) - { - Side side = FMLCommonHandler.instance().getEffectiveSide(); + @Override + public void onPacketData (INetworkManager manager, Packet250CustomPayload packet, Player player) + { + Side side = FMLCommonHandler.instance().getEffectiveSide(); - if (packet.channel.equals("TConstruct")) - { - if (side == Side.SERVER) - handleServerPacket(packet, (EntityPlayerMP) player); - else - handleClientPacket(packet, (EntityPlayer) player); - } - } + if (packet.channel.equals("TConstruct")) + { + if (side == Side.SERVER) + handleServerPacket(packet, (EntityPlayerMP) player); + else + handleClientPacket(packet, (EntityPlayer) player); + } + } - void handleClientPacket (Packet250CustomPayload packet, EntityPlayer player) - { - DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); + void handleClientPacket (Packet250CustomPayload packet, EntityPlayer player) + { + DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); - byte packetID; + byte packetID; - try - { - packetID = inputStream.readByte(); - if (packetID == 1) - { - TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); - stats.skillList = new ArrayList(); - int size = inputStream.readInt(); - for (int i = 0; i < size; i++) - { - Skill skill = SkillRegistry.skillMapping.get(inputStream.readInt()).copy(); - skill.setActive(inputStream.readBoolean()); - stats.skillList.add(skill); - } - } - } - catch (Exception e) - { - System.out.println("Failed at reading client packet for TConstruct."); - e.printStackTrace(); - return; - } - } + try + { + packetID = inputStream.readByte(); + if (packetID == 1) + { + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + stats.skillList = new ArrayList(); + int size = inputStream.readInt(); + for (int i = 0; i < size; i++) + { + Skill skill = SkillRegistry.skillMapping.get(inputStream.readInt()).copy(); + skill.setActive(inputStream.readBoolean()); + stats.skillList.add(skill); + } + } + } + catch (Exception e) + { + System.out.println("Failed at reading client packet for TConstruct."); + e.printStackTrace(); + return; + } + } - void handleServerPacket (Packet250CustomPayload packet, EntityPlayerMP player) - { - DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); + void handleServerPacket (Packet250CustomPayload packet, EntityPlayerMP player) + { + DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); - byte packetID; + byte packetID; - try - { - packetID = inputStream.readByte(); + try + { + packetID = inputStream.readByte(); - if (packetID == 1) //Tool Station - { - int dimension = inputStream.readInt(); - World world = DimensionManager.getWorld(dimension); - int x = inputStream.readInt(); - int y = inputStream.readInt(); - int z = inputStream.readInt(); - TileEntity te = world.getBlockTileEntity(x, y, z); - - String toolName = inputStream.readUTF(); - if (te instanceof ToolStationLogic) - { - ((ToolStationLogic) te).setToolname(toolName); - } - if (te instanceof ToolForgeLogic) + if (packetID == 1) //Tool Station + { + int dimension = inputStream.readInt(); + World world = DimensionManager.getWorld(dimension); + int x = inputStream.readInt(); + int y = inputStream.readInt(); + int z = inputStream.readInt(); + TileEntity te = world.getBlockTileEntity(x, y, z); + + String toolName = inputStream.readUTF(); + if (te instanceof ToolStationLogic) + { + ((ToolStationLogic) te).setToolname(toolName); + } + if (te instanceof ToolForgeLogic) { ((ToolForgeLogic) te).setToolname(toolName); } - } - else if (packetID == 2) //Stencil Table - { - int dimension = inputStream.readInt(); - World world = DimensionManager.getWorld(dimension); - int x = inputStream.readInt(); - int y = inputStream.readInt(); - int z = inputStream.readInt(); - TileEntity te = world.getBlockTileEntity(x, y, z); - - Short itemID = inputStream.readShort(); - Short itemDamage = inputStream.readShort(); - if (te instanceof InventoryLogic) - { - ((InventoryLogic) te).setInventorySlotContents(1, new ItemStack(itemID, 1, itemDamage)); - } - } - - else if (packetID == 3) //Armor + } + else if (packetID == 2) //Stencil Table + { + int dimension = inputStream.readInt(); + World world = DimensionManager.getWorld(dimension); + int x = inputStream.readInt(); + int y = inputStream.readInt(); + int z = inputStream.readInt(); + TileEntity te = world.getBlockTileEntity(x, y, z); + + Short itemID = inputStream.readShort(); + Short itemDamage = inputStream.readShort(); + if (te instanceof InventoryLogic) + { + ((InventoryLogic) te).setInventorySlotContents(1, new ItemStack(itemID, 1, itemDamage)); + } + } + + else if (packetID == 3) //Armor { //String user = inputStream.readUTF(); //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); - player.openGui(TConstruct.instance, TConstruct.proxy.armorGuiID, player.worldObj, (int)player.posX, (int)player.posY, (int)player.posZ); + switch (inputStream.readByte()) + { + case 0: + player.openGui(TConstruct.instance, TConstruct.proxy.inventoryGui, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + case 1: + player.openGui(TConstruct.instance, TConstruct.proxy.armorGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + case 2: + player.openGui(TConstruct.instance, TConstruct.proxy.knapsackGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + } } - - else if (packetID == 4) //Active Skills - { - Byte id = inputStream.readByte(); - TConstruct.playerTracker.activateSkill(player, id); - } - - else if (packetID == 10) //Double jump - { - //String user = inputStream.readUTF(); - //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); - player.fallDistance = 0; - } - } - catch (IOException e) - { - System.out.println("Failed at reading server packet for TConstruct."); - e.printStackTrace(); - return; - } - } - Entity getEntity (World world, int id) - { - for (Object o : world.loadedEntityList) - { - if (((Entity)o).entityId == id) - return (Entity) o; - } - return null; - } + else if (packetID == 4) //Active Skills + { + Byte id = inputStream.readByte(); + TConstruct.playerTracker.activateSkill(player, id); + } + + else if (packetID == 10) //Double jump + { + //String user = inputStream.readUTF(); + //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); + player.fallDistance = 0; + } + } + catch (IOException e) + { + System.out.println("Failed at reading server packet for TConstruct."); + e.printStackTrace(); + return; + } + } + + Entity getEntity (World world, int id) + { + for (Object o : world.loadedEntityList) + { + if (((Entity) o).entityId == id) + return (Entity) o; + } + return null; + } } diff --git a/mods/tinker/tconstruct/util/player/ArmorExtended.java b/mods/tinker/tconstruct/util/player/ArmorExtended.java index c97a05ea..381e9fef 100644 --- a/mods/tinker/tconstruct/util/player/ArmorExtended.java +++ b/mods/tinker/tconstruct/util/player/ArmorExtended.java @@ -113,6 +113,11 @@ public class ArmorExtended implements IInventory TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); //recalculateSkills(player, stats); recalculateHealth(player, stats); + + if (inventory[2] != null && inventory[2].getItem() == TContent.knapsack) + { + + } } /*public void recalculateSkills(EntityPlayer player, TPlayerStats stats) diff --git a/mods/tinker/tconstruct/util/player/KnapsackInventory.java b/mods/tinker/tconstruct/util/player/KnapsackInventory.java new file mode 100644 index 00000000..2c05c2e0 --- /dev/null +++ b/mods/tinker/tconstruct/util/player/KnapsackInventory.java @@ -0,0 +1,155 @@ +package mods.tinker.tconstruct.util.player; + +import java.lang.ref.WeakReference; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class KnapsackInventory implements IInventory +{ + public ItemStack[] inventory = new ItemStack[27]; + public WeakReference parent; + + public void init(EntityPlayer player) + { + parent = new WeakReference(player); + } + + @Override + public ItemStack getStackInSlot(int slot) + { + return inventory[slot]; + } + + public boolean isStackInSlot(int slot) + { + return inventory[slot] != null; + } + + @Override + public int getSizeInventory() + { + return inventory.length; + } + + @Override + public int getInventoryStackLimit () + { + return 64; + } + + public boolean canDropInventorySlot(int slot) + { + return true; + } + + @Override + public void setInventorySlotContents(int slot, ItemStack itemstack) + { + inventory[slot] = itemstack; + if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) + { + itemstack.stackSize = getInventoryStackLimit(); + } + } + + @Override + public ItemStack decrStackSize(int slot, int quantity) + { + if (inventory[slot] != null) + { + if (inventory[slot].stackSize <= quantity) + { + ItemStack stack = inventory[slot]; + inventory[slot] = null; + return stack; + } + ItemStack split = inventory[slot].splitStack(quantity); + if (inventory[slot].stackSize == 0) + { + inventory[slot] = null; + } + return split; + } + else + { + return null; + } + } + + @Override + public String getInvName () + { + return "tconstruct.knapsack"; + } + + @Override + public boolean isInvNameLocalized () + { + return false; + } + + @Override + public void onInventoryChanged () + { + + } + + + public ItemStack getStackInSlotOnClosing (int slot) { return null; } + public void openChest () {} + public void closeChest () {} + + @Override + public boolean isStackValidForSlot (int i, ItemStack itemstack) + { + return true; + } + + @Override + public boolean isUseableByPlayer (EntityPlayer entityplayer) + { + return true; + } + + /* Save/Load */ + public void saveToNBT (EntityPlayer entityplayer) + { + NBTTagCompound tags = entityplayer.getEntityData(); + NBTTagList tagList = new NBTTagList(); + NBTTagCompound invSlot; + + for (int i = 0; i < this.inventory.length; ++i) + { + if (this.inventory[i] != null) + { + invSlot = new NBTTagCompound(); + invSlot.setByte("Slot", (byte) i); + this.inventory[i].writeToNBT(invSlot); + tagList.appendTag(invSlot); + } + } + + tags.setTag("TConstruct.Knapsack", tagList); + } + + public void readFromNBT (EntityPlayer entityplayer) + { + NBTTagCompound tags = entityplayer.getEntityData(); + NBTTagList tagList = tags.getTagList("TConstruct.Knapsack"); + for (int i = 0; i < tagList.tagCount(); ++i) + { + NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.tagAt(i); + int j = nbttagcompound.getByte("Slot") & 255; + ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound); + + if (itemstack != null) + { + this.inventory[j] = itemstack; + } + } + } +} \ No newline at end of file diff --git a/mods/tinker/tconstruct/util/player/TPlayerHandler.java b/mods/tinker/tconstruct/util/player/TPlayerHandler.java index 605a2bd6..ef672396 100644 --- a/mods/tinker/tconstruct/util/player/TPlayerHandler.java +++ b/mods/tinker/tconstruct/util/player/TPlayerHandler.java @@ -51,6 +51,10 @@ public class TPlayerHandler implements IPlayerTracker stats.armor = new ArmorExtended(); stats.armor.init(entityplayer); stats.armor.readFromNBT(entityplayer); + + stats.knapsack = new KnapsackInventory(); + stats.knapsack.init(entityplayer); + stats.knapsack.readFromNBT(entityplayer); stats.level = entityplayer.experienceLevel; stats.hunger = entityplayer.getFoodStats().getFoodLevel(); diff --git a/mods/tinker/tconstruct/util/player/TPlayerStats.java b/mods/tinker/tconstruct/util/player/TPlayerStats.java index 52d6f99f..92f19b7f 100644 --- a/mods/tinker/tconstruct/util/player/TPlayerStats.java +++ b/mods/tinker/tconstruct/util/player/TPlayerStats.java @@ -17,5 +17,6 @@ public class TPlayerStats public boolean materialManual; public boolean smelteryManual; public ArmorExtended armor; + public KnapsackInventory knapsack; public List skillList; } diff --git a/mods/tinker/textures/gui/armorextended.png b/mods/tinker/textures/gui/armorextended.png index 89f379e6..21e646f2 100644 Binary files a/mods/tinker/textures/gui/armorextended.png and b/mods/tinker/textures/gui/armorextended.png differ diff --git a/mods/tinker/textures/gui/icons.png b/mods/tinker/textures/gui/icons.png index 17536d72..e98203e3 100644 Binary files a/mods/tinker/textures/gui/icons.png and b/mods/tinker/textures/gui/icons.png differ diff --git a/mods/tinker/textures/gui/knapsack.png b/mods/tinker/textures/gui/knapsack.png new file mode 100644 index 00000000..11cdfe29 Binary files /dev/null and b/mods/tinker/textures/gui/knapsack.png differ diff --git a/mods/tinker/textures/items/armor/knapsack.png b/mods/tinker/textures/items/armor/knapsack.png new file mode 100644 index 00000000..eecfded6 Binary files /dev/null and b/mods/tinker/textures/items/armor/knapsack.png differ diff --git a/mods/tinker/textures/items/axe/reinforced_axe_effect.png b/mods/tinker/textures/items/axe/reinforced_axe_effect.png new file mode 100644 index 00000000..60803180 Binary files /dev/null and b/mods/tinker/textures/items/axe/reinforced_axe_effect.png differ diff --git a/mods/tinker/textures/items/chisel/reinforced_chisel_effect.png b/mods/tinker/textures/items/chisel/reinforced_chisel_effect.png new file mode 100644 index 00000000..96b82874 Binary files /dev/null and b/mods/tinker/textures/items/chisel/reinforced_chisel_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/Diamond.png b/mods/tinker/textures/items/cutlass/Diamond.png new file mode 100644 index 00000000..03bfc458 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/Diamond.png differ diff --git a/mods/tinker/textures/items/cutlass/alumite_cutlass_blade.png b/mods/tinker/textures/items/cutlass/alumite_cutlass_blade.png new file mode 100644 index 00000000..2f8801e9 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/alumite_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/alumite_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/alumite_cutlass_blade_broken.png new file mode 100644 index 00000000..1ce29b22 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/alumite_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/alumite_cutlass_guard.png b/mods/tinker/textures/items/cutlass/alumite_cutlass_guard.png new file mode 100644 index 00000000..e9d2ec59 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/alumite_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/alumite_cutlass_handle.png b/mods/tinker/textures/items/cutlass/alumite_cutlass_handle.png new file mode 100644 index 00000000..4614db03 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/alumite_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/ardite_cutlass_blade.png b/mods/tinker/textures/items/cutlass/ardite_cutlass_blade.png new file mode 100644 index 00000000..0cb545fd Binary files /dev/null and b/mods/tinker/textures/items/cutlass/ardite_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/ardite_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/ardite_cutlass_blade_broken.png new file mode 100644 index 00000000..e1fbe412 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/ardite_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/ardite_cutlass_guard.png b/mods/tinker/textures/items/cutlass/ardite_cutlass_guard.png new file mode 100644 index 00000000..a6533ee9 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/ardite_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/ardite_cutlass_handle.png b/mods/tinker/textures/items/cutlass/ardite_cutlass_handle.png new file mode 100644 index 00000000..375595c7 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/ardite_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/blaze_cutlass_effect.png b/mods/tinker/textures/items/cutlass/blaze_cutlass_effect.png new file mode 100644 index 00000000..e3763ec3 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/blaze_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade.png b/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade.png new file mode 100644 index 00000000..6a2a6cb5 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade_broken.png new file mode 100644 index 00000000..981ae987 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/blueslime_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/blueslime_cutlass_guard.png b/mods/tinker/textures/items/cutlass/blueslime_cutlass_guard.png new file mode 100644 index 00000000..c0f1f9a5 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/blueslime_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/blueslime_cutlass_handle.png b/mods/tinker/textures/items/cutlass/blueslime_cutlass_handle.png new file mode 100644 index 00000000..71184af0 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/blueslime_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/bone_cutlass_blade.png b/mods/tinker/textures/items/cutlass/bone_cutlass_blade.png new file mode 100644 index 00000000..6bcfabec Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bone_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/bone_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/bone_cutlass_blade_broken.png new file mode 100644 index 00000000..1f592baf Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bone_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/bone_cutlass_guard.png b/mods/tinker/textures/items/cutlass/bone_cutlass_guard.png new file mode 100644 index 00000000..5bff6fe0 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bone_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/bone_cutlass_handle.png b/mods/tinker/textures/items/cutlass/bone_cutlass_handle.png new file mode 100644 index 00000000..fe1cd72e Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bone_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/bronze_cutlass_blade.png b/mods/tinker/textures/items/cutlass/bronze_cutlass_blade.png new file mode 100644 index 00000000..e21979d8 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bronze_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/bronze_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/bronze_cutlass_blade_broken.png new file mode 100644 index 00000000..715f261f Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bronze_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/bronze_cutlass_guard.png b/mods/tinker/textures/items/cutlass/bronze_cutlass_guard.png new file mode 100644 index 00000000..8e2d9600 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bronze_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/bronze_cutlass_handle.png b/mods/tinker/textures/items/cutlass/bronze_cutlass_handle.png new file mode 100644 index 00000000..668b1804 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/bronze_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade.png b/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade.png new file mode 100644 index 00000000..aadff608 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade_broken.png new file mode 100644 index 00000000..0248c020 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/cobalt_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/cobalt_cutlass_guard.png b/mods/tinker/textures/items/cutlass/cobalt_cutlass_guard.png new file mode 100644 index 00000000..86e82241 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/cobalt_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/cobalt_cutlass_handle.png b/mods/tinker/textures/items/cutlass/cobalt_cutlass_handle.png new file mode 100644 index 00000000..3b3b329c Binary files /dev/null and b/mods/tinker/textures/items/cutlass/cobalt_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/copper_cutlass_blade.png b/mods/tinker/textures/items/cutlass/copper_cutlass_blade.png new file mode 100644 index 00000000..6462f900 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/copper_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/copper_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/copper_cutlass_blade_broken.png new file mode 100644 index 00000000..13aeee6b Binary files /dev/null and b/mods/tinker/textures/items/cutlass/copper_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/copper_cutlass_guard.png b/mods/tinker/textures/items/cutlass/copper_cutlass_guard.png new file mode 100644 index 00000000..724febc3 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/copper_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/copper_cutlass_handle.png b/mods/tinker/textures/items/cutlass/copper_cutlass_handle.png new file mode 100644 index 00000000..1aa4b855 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/copper_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/electric_cutlass_effect.png b/mods/tinker/textures/items/cutlass/electric_cutlass_effect.png new file mode 100644 index 00000000..396229ca Binary files /dev/null and b/mods/tinker/textures/items/cutlass/electric_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/emerald_cutlass_effect.png b/mods/tinker/textures/items/cutlass/emerald_cutlass_effect.png new file mode 100644 index 00000000..82a3c79e Binary files /dev/null and b/mods/tinker/textures/items/cutlass/emerald_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/flint_cutlass_blade.png b/mods/tinker/textures/items/cutlass/flint_cutlass_blade.png new file mode 100644 index 00000000..487e8d22 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/flint_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/flint_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/flint_cutlass_blade_broken.png new file mode 100644 index 00000000..e1211af9 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/flint_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/flint_cutlass_guard.png b/mods/tinker/textures/items/cutlass/flint_cutlass_guard.png new file mode 100644 index 00000000..9f2ef6ca Binary files /dev/null and b/mods/tinker/textures/items/cutlass/flint_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/flint_cutlass_handle.png b/mods/tinker/textures/items/cutlass/flint_cutlass_handle.png new file mode 100644 index 00000000..f2a125c3 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/flint_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/ice_cutlass_effect.png b/mods/tinker/textures/items/cutlass/ice_cutlass_effect.png new file mode 100644 index 00000000..24822a98 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/ice_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/iron_cutlass_blade.png b/mods/tinker/textures/items/cutlass/iron_cutlass_blade.png new file mode 100644 index 00000000..a2acce95 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/iron_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/iron_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/iron_cutlass_blade_broken.png new file mode 100644 index 00000000..6d861d79 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/iron_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/iron_cutlass_guard.png b/mods/tinker/textures/items/cutlass/iron_cutlass_guard.png new file mode 100644 index 00000000..9f2ef6ca Binary files /dev/null and b/mods/tinker/textures/items/cutlass/iron_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/iron_cutlass_handle.png b/mods/tinker/textures/items/cutlass/iron_cutlass_handle.png new file mode 100644 index 00000000..960ef170 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/iron_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/lapis_cutlass_effect.png b/mods/tinker/textures/items/cutlass/lapis_cutlass_effect.png new file mode 100644 index 00000000..bd7a2290 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/lapis_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/lava_cutlass_effect.png b/mods/tinker/textures/items/cutlass/lava_cutlass_effect.png new file mode 100644 index 00000000..89e268f0 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/lava_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade.png b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade.png new file mode 100644 index 00000000..44035bcd Binary files /dev/null and b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade_broken.png new file mode 100644 index 00000000..39d14a04 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/manyullyn_cutlass_guard.png b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_guard.png new file mode 100644 index 00000000..09c97eae Binary files /dev/null and b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/manyullyn_cutlass_handle.png b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_handle.png new file mode 100644 index 00000000..ad16d799 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/manyullyn_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/necrotic_cutlass_effect.png b/mods/tinker/textures/items/cutlass/necrotic_cutlass_effect.png new file mode 100644 index 00000000..7257829c Binary files /dev/null and b/mods/tinker/textures/items/cutlass/necrotic_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade.png b/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade.png new file mode 100644 index 00000000..3d1fd311 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade_broken.png new file mode 100644 index 00000000..b01ce583 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/netherrack_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/netherrack_cutlass_guard.png b/mods/tinker/textures/items/cutlass/netherrack_cutlass_guard.png new file mode 100644 index 00000000..910d5c1f Binary files /dev/null and b/mods/tinker/textures/items/cutlass/netherrack_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/netherrack_cutlass_handle.png b/mods/tinker/textures/items/cutlass/netherrack_cutlass_handle.png new file mode 100644 index 00000000..6ee17554 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/netherrack_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade.png b/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade.png new file mode 100644 index 00000000..16590e1e Binary files /dev/null and b/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade_broken.png new file mode 100644 index 00000000..de94de18 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/obsidian_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/obsidian_cutlass_guard.png b/mods/tinker/textures/items/cutlass/obsidian_cutlass_guard.png new file mode 100644 index 00000000..0d3da92c Binary files /dev/null and b/mods/tinker/textures/items/cutlass/obsidian_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/obsidian_cutlass_handle.png b/mods/tinker/textures/items/cutlass/obsidian_cutlass_handle.png new file mode 100644 index 00000000..ff1ca820 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/obsidian_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/quartz_cutlass_effect.png b/mods/tinker/textures/items/cutlass/quartz_cutlass_effect.png new file mode 100644 index 00000000..e8a4e0ce Binary files /dev/null and b/mods/tinker/textures/items/cutlass/quartz_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/silk_cutlass_effect.png b/mods/tinker/textures/items/cutlass/silk_cutlass_effect.png new file mode 100644 index 00000000..9cb41ff0 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/silk_cutlass_effect.png differ diff --git a/mods/tinker/textures/items/cutlass/slime_cutlass_blade.png b/mods/tinker/textures/items/cutlass/slime_cutlass_blade.png new file mode 100644 index 00000000..54d41247 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/slime_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/slime_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/slime_cutlass_blade_broken.png new file mode 100644 index 00000000..b5e59e93 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/slime_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/slime_cutlass_guard.png b/mods/tinker/textures/items/cutlass/slime_cutlass_guard.png new file mode 100644 index 00000000..2ae9de06 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/slime_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/slime_cutlass_handle.png b/mods/tinker/textures/items/cutlass/slime_cutlass_handle.png new file mode 100644 index 00000000..1fdfbe17 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/slime_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/steel_cutlass_blade.png b/mods/tinker/textures/items/cutlass/steel_cutlass_blade.png new file mode 100644 index 00000000..21765f06 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/steel_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/steel_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/steel_cutlass_blade_broken.png new file mode 100644 index 00000000..251bd56b Binary files /dev/null and b/mods/tinker/textures/items/cutlass/steel_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/steel_cutlass_guard.png b/mods/tinker/textures/items/cutlass/steel_cutlass_guard.png new file mode 100644 index 00000000..784679c7 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/steel_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/steel_cutlass_handle.png b/mods/tinker/textures/items/cutlass/steel_cutlass_handle.png new file mode 100644 index 00000000..0869cd6f Binary files /dev/null and b/mods/tinker/textures/items/cutlass/steel_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/stone_cutlass_blade.png b/mods/tinker/textures/items/cutlass/stone_cutlass_blade.png new file mode 100644 index 00000000..b6e02091 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/stone_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/stone_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/stone_cutlass_blade_broken.png new file mode 100644 index 00000000..a1f2370a Binary files /dev/null and b/mods/tinker/textures/items/cutlass/stone_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/stone_cutlass_guard.png b/mods/tinker/textures/items/cutlass/stone_cutlass_guard.png new file mode 100644 index 00000000..f081dc71 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/stone_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/stone_cutlass_handle.png b/mods/tinker/textures/items/cutlass/stone_cutlass_handle.png new file mode 100644 index 00000000..3a4fa67b Binary files /dev/null and b/mods/tinker/textures/items/cutlass/stone_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/cutlass/wood_cutlass_blade.png b/mods/tinker/textures/items/cutlass/wood_cutlass_blade.png new file mode 100644 index 00000000..6326ddfa Binary files /dev/null and b/mods/tinker/textures/items/cutlass/wood_cutlass_blade.png differ diff --git a/mods/tinker/textures/items/cutlass/wood_cutlass_blade_broken.png b/mods/tinker/textures/items/cutlass/wood_cutlass_blade_broken.png new file mode 100644 index 00000000..00265766 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/wood_cutlass_blade_broken.png differ diff --git a/mods/tinker/textures/items/cutlass/wood_cutlass_guard.png b/mods/tinker/textures/items/cutlass/wood_cutlass_guard.png new file mode 100644 index 00000000..8864cfa5 Binary files /dev/null and b/mods/tinker/textures/items/cutlass/wood_cutlass_guard.png differ diff --git a/mods/tinker/textures/items/cutlass/wood_cutlass_handle.png b/mods/tinker/textures/items/cutlass/wood_cutlass_handle.png new file mode 100644 index 00000000..c2124f7e Binary files /dev/null and b/mods/tinker/textures/items/cutlass/wood_cutlass_handle.png differ diff --git a/mods/tinker/textures/items/excavator/reinforced_excavator_effect.png b/mods/tinker/textures/items/excavator/reinforced_excavator_effect.png new file mode 100644 index 00000000..0683d3fe Binary files /dev/null and b/mods/tinker/textures/items/excavator/reinforced_excavator_effect.png differ diff --git a/mods/tinker/textures/items/frypan/beheading_frypan_effect.png b/mods/tinker/textures/items/frypan/beheading_frypan_effect.png new file mode 100644 index 00000000..393d26b3 Binary files /dev/null and b/mods/tinker/textures/items/frypan/beheading_frypan_effect.png differ diff --git a/mods/tinker/textures/items/frypan/piston_frypan_effect.png b/mods/tinker/textures/items/frypan/piston_frypan_effect.png new file mode 100644 index 00000000..a38945f3 Binary files /dev/null and b/mods/tinker/textures/items/frypan/piston_frypan_effect.png differ diff --git a/mods/tinker/textures/items/frypan/quartz_frypan_effect.png b/mods/tinker/textures/items/frypan/quartz_frypan_effect.png index 93e79193..43aef195 100644 Binary files a/mods/tinker/textures/items/frypan/quartz_frypan_effect.png and b/mods/tinker/textures/items/frypan/quartz_frypan_effect.png differ diff --git a/mods/tinker/textures/items/frypan/reinforced_frypan_effect.png b/mods/tinker/textures/items/frypan/reinforced_frypan_effect.png new file mode 100644 index 00000000..934b257b Binary files /dev/null and b/mods/tinker/textures/items/frypan/reinforced_frypan_effect.png differ diff --git a/mods/tinker/textures/items/frypan/smite_frypan_effect.png b/mods/tinker/textures/items/frypan/smite_frypan_effect.png new file mode 100644 index 00000000..d0a399e5 Binary files /dev/null and b/mods/tinker/textures/items/frypan/smite_frypan_effect.png differ diff --git a/mods/tinker/textures/items/frypan/spider_frypan_effect.png b/mods/tinker/textures/items/frypan/spider_frypan_effect.png new file mode 100644 index 00000000..5a888637 Binary files /dev/null and b/mods/tinker/textures/items/frypan/spider_frypan_effect.png differ diff --git a/mods/tinker/textures/items/hammer/beheading_hammer_effect.png b/mods/tinker/textures/items/hammer/beheading_hammer_effect.png new file mode 100644 index 00000000..fa103823 Binary files /dev/null and b/mods/tinker/textures/items/hammer/beheading_hammer_effect.png differ diff --git a/mods/tinker/textures/items/hammer/piston_hammer_effect.png b/mods/tinker/textures/items/hammer/piston_hammer_effect.png new file mode 100644 index 00000000..6a01d1a9 Binary files /dev/null and b/mods/tinker/textures/items/hammer/piston_hammer_effect.png differ diff --git a/mods/tinker/textures/items/hammer/reinforced_hammer_effect.png b/mods/tinker/textures/items/hammer/reinforced_hammer_effect.png new file mode 100644 index 00000000..be9f78b1 Binary files /dev/null and b/mods/tinker/textures/items/hammer/reinforced_hammer_effect.png differ diff --git a/mods/tinker/textures/items/hammer/smite_hammer_effect.png b/mods/tinker/textures/items/hammer/smite_hammer_effect.png new file mode 100644 index 00000000..a2c8d064 Binary files /dev/null and b/mods/tinker/textures/items/hammer/smite_hammer_effect.png differ diff --git a/mods/tinker/textures/items/hammer/spider_hammer_effect.png b/mods/tinker/textures/items/hammer/spider_hammer_effect.png new file mode 100644 index 00000000..633966b7 Binary files /dev/null and b/mods/tinker/textures/items/hammer/spider_hammer_effect.png differ diff --git a/mods/tinker/textures/items/longsword/beheading_longsword_effect.png b/mods/tinker/textures/items/longsword/beheading_longsword_effect.png new file mode 100644 index 00000000..c45499e9 Binary files /dev/null and b/mods/tinker/textures/items/longsword/beheading_longsword_effect.png differ diff --git a/mods/tinker/textures/items/longsword/piston_longsword_effect.png b/mods/tinker/textures/items/longsword/piston_longsword_effect.png new file mode 100644 index 00000000..7d331672 Binary files /dev/null and b/mods/tinker/textures/items/longsword/piston_longsword_effect.png differ diff --git a/mods/tinker/textures/items/longsword/reinforced_longsword_effect.png b/mods/tinker/textures/items/longsword/reinforced_longsword_effect.png new file mode 100644 index 00000000..0599eabe Binary files /dev/null and b/mods/tinker/textures/items/longsword/reinforced_longsword_effect.png differ diff --git a/mods/tinker/textures/items/longsword/smite_longsword_effect.png b/mods/tinker/textures/items/longsword/smite_longsword_effect.png new file mode 100644 index 00000000..4086701b Binary files /dev/null and b/mods/tinker/textures/items/longsword/smite_longsword_effect.png differ diff --git a/mods/tinker/textures/items/longsword/spider_longsword_effect.png b/mods/tinker/textures/items/longsword/spider_longsword_effect.png new file mode 100644 index 00000000..8b546d8d Binary files /dev/null and b/mods/tinker/textures/items/longsword/spider_longsword_effect.png differ diff --git a/mods/tinker/textures/items/lumberaxe/reinforced_lumberaxe_effect.png b/mods/tinker/textures/items/lumberaxe/reinforced_lumberaxe_effect.png new file mode 100644 index 00000000..04695805 Binary files /dev/null and b/mods/tinker/textures/items/lumberaxe/reinforced_lumberaxe_effect.png differ diff --git a/mods/tinker/textures/items/materials/pattern_hammerhead.png b/mods/tinker/textures/items/materials/pattern_hammerhead.png index 1851e744..73ea2e8c 100644 Binary files a/mods/tinker/textures/items/materials/pattern_hammerhead.png and b/mods/tinker/textures/items/materials/pattern_hammerhead.png differ diff --git a/mods/tinker/textures/items/mattock/reinforced_mattock_effect.png b/mods/tinker/textures/items/mattock/reinforced_mattock_effect.png new file mode 100644 index 00000000..a6d446f8 Binary files /dev/null and b/mods/tinker/textures/items/mattock/reinforced_mattock_effect.png differ diff --git a/mods/tinker/textures/items/pickaxe/reinforced_pickaxe_effect.png b/mods/tinker/textures/items/pickaxe/reinforced_pickaxe_effect.png new file mode 100644 index 00000000..63f6ecba Binary files /dev/null and b/mods/tinker/textures/items/pickaxe/reinforced_pickaxe_effect.png differ diff --git a/mods/tinker/textures/items/rapier/beheading_rapier_effect.png b/mods/tinker/textures/items/rapier/beheading_rapier_effect.png new file mode 100644 index 00000000..261e486e Binary files /dev/null and b/mods/tinker/textures/items/rapier/beheading_rapier_effect.png differ diff --git a/mods/tinker/textures/items/rapier/piston_rapier_effect.png b/mods/tinker/textures/items/rapier/piston_rapier_effect.png new file mode 100644 index 00000000..55413eaa Binary files /dev/null and b/mods/tinker/textures/items/rapier/piston_rapier_effect.png differ diff --git a/mods/tinker/textures/items/rapier/reinforced_rapier_effect.png b/mods/tinker/textures/items/rapier/reinforced_rapier_effect.png new file mode 100644 index 00000000..68e440b6 Binary files /dev/null and b/mods/tinker/textures/items/rapier/reinforced_rapier_effect.png differ diff --git a/mods/tinker/textures/items/rapier/smite_rapier_effect.png b/mods/tinker/textures/items/rapier/smite_rapier_effect.png new file mode 100644 index 00000000..c84e2179 Binary files /dev/null and b/mods/tinker/textures/items/rapier/smite_rapier_effect.png differ diff --git a/mods/tinker/textures/items/rapier/spider_rapier_effect.png b/mods/tinker/textures/items/rapier/spider_rapier_effect.png new file mode 100644 index 00000000..21d1faf9 Binary files /dev/null and b/mods/tinker/textures/items/rapier/spider_rapier_effect.png differ diff --git a/mods/tinker/textures/items/scythe/beheading_scythe_effect.png b/mods/tinker/textures/items/scythe/beheading_scythe_effect.png new file mode 100644 index 00000000..d3e9d110 Binary files /dev/null and b/mods/tinker/textures/items/scythe/beheading_scythe_effect.png differ diff --git a/mods/tinker/textures/items/scythe/piston_scythe_effect.png b/mods/tinker/textures/items/scythe/piston_scythe_effect.png new file mode 100644 index 00000000..ef12d6be Binary files /dev/null and b/mods/tinker/textures/items/scythe/piston_scythe_effect.png differ diff --git a/mods/tinker/textures/items/scythe/reinforced_scythe_effect.png b/mods/tinker/textures/items/scythe/reinforced_scythe_effect.png new file mode 100644 index 00000000..e1ed8876 Binary files /dev/null and b/mods/tinker/textures/items/scythe/reinforced_scythe_effect.png differ diff --git a/mods/tinker/textures/items/scythe/smite_scythe_effect.png b/mods/tinker/textures/items/scythe/smite_scythe_effect.png new file mode 100644 index 00000000..52b47c8b Binary files /dev/null and b/mods/tinker/textures/items/scythe/smite_scythe_effect.png differ diff --git a/mods/tinker/textures/items/scythe/spider_scythe_effect.png b/mods/tinker/textures/items/scythe/spider_scythe_effect.png new file mode 100644 index 00000000..bf910d58 Binary files /dev/null and b/mods/tinker/textures/items/scythe/spider_scythe_effect.png differ diff --git a/mods/tinker/textures/items/shovel/reinforced_shovel_effect.png b/mods/tinker/textures/items/shovel/reinforced_shovel_effect.png new file mode 100644 index 00000000..6f82f539 Binary files /dev/null and b/mods/tinker/textures/items/shovel/reinforced_shovel_effect.png differ diff --git a/spritesheets/axes.png b/spritesheets/axes.png index 3f96b352..42d908a2 100644 Binary files a/spritesheets/axes.png and b/spritesheets/axes.png differ diff --git a/spritesheets/broadheads.png b/spritesheets/broadheads.png deleted file mode 100644 index db6216f8..00000000 Binary files a/spritesheets/broadheads.png and /dev/null differ diff --git a/spritesheets/chisels.png b/spritesheets/chisels.png index 74a99244..fe542097 100644 Binary files a/spritesheets/chisels.png and b/spritesheets/chisels.png differ diff --git a/spritesheets/excavator.png b/spritesheets/excavator.png index c2beea91..7d63ba1c 100644 Binary files a/spritesheets/excavator.png and b/spritesheets/excavator.png differ diff --git a/spritesheets/frypans.png b/spritesheets/frypans.png index 4c1b9ee1..7d1a9ddb 100644 Binary files a/spritesheets/frypans.png and b/spritesheets/frypans.png differ diff --git a/spritesheets/hammer.png b/spritesheets/hammer.png index ec7d7fb1..a53f8323 100644 Binary files a/spritesheets/hammer.png and b/spritesheets/hammer.png differ diff --git a/spritesheets/longsword.png b/spritesheets/longsword.png index 298c2fd1..0869a38e 100644 Binary files a/spritesheets/longsword.png and b/spritesheets/longsword.png differ diff --git a/spritesheets/lumberaxe.png b/spritesheets/lumberaxe.png index ef439a60..f00efea1 100644 Binary files a/spritesheets/lumberaxe.png and b/spritesheets/lumberaxe.png differ diff --git a/spritesheets/mattock.png b/spritesheets/mattock.png index 4fa0634a..c471652c 100644 Binary files a/spritesheets/mattock.png and b/spritesheets/mattock.png differ diff --git a/spritesheets/pickaxes.png b/spritesheets/pickaxes.png index aa184094..eb35e2f9 100644 Binary files a/spritesheets/pickaxes.png and b/spritesheets/pickaxes.png differ diff --git a/spritesheets/rapier.png b/spritesheets/rapier.png index a8fe5588..7cd9e07a 100644 Binary files a/spritesheets/rapier.png and b/spritesheets/rapier.png differ diff --git a/spritesheets/scythes.png b/spritesheets/scythes.png index 28dc114a..27f1c1f2 100644 Binary files a/spritesheets/scythes.png and b/spritesheets/scythes.png differ