diff --git a/resources/tinkertextures/ConstructBlocks.png b/resources/tinkertextures/ConstructBlocks.png index 0945b862..406e9a23 100644 Binary files a/resources/tinkertextures/ConstructBlocks.png and b/resources/tinkertextures/ConstructBlocks.png differ diff --git a/resources/tinkertextures/armor/wood_1.png b/resources/tinkertextures/armor/wood_1.png new file mode 100644 index 00000000..0b6d4d68 Binary files /dev/null and b/resources/tinkertextures/armor/wood_1.png differ diff --git a/resources/tinkertextures/armor/wood_2.png b/resources/tinkertextures/armor/wood_2.png new file mode 100644 index 00000000..03732706 Binary files /dev/null and b/resources/tinkertextures/armor/wood_2.png differ diff --git a/resources/tinkertextures/gui/description.png b/resources/tinkertextures/gui/description.png index 427692f9..26f5cfda 100644 Binary files a/resources/tinkertextures/gui/description.png and b/resources/tinkertextures/gui/description.png differ diff --git a/resources/tinkertextures/materials.png b/resources/tinkertextures/materials.png index fb5e235d..34de8509 100644 Binary files a/resources/tinkertextures/materials.png and b/resources/tinkertextures/materials.png differ diff --git a/resources/tinkertextures/tools/axes.png b/resources/tinkertextures/tools/axes.png index 2ab68c61..539d2cce 100644 Binary files a/resources/tinkertextures/tools/axes.png and b/resources/tinkertextures/tools/axes.png differ diff --git a/resources/tinkertextures/tools/baseaccessories.png b/resources/tinkertextures/tools/baseaccessories.png index 310dfb46..0e5a6349 100644 Binary files a/resources/tinkertextures/tools/baseaccessories.png and b/resources/tinkertextures/tools/baseaccessories.png differ diff --git a/resources/tinkertextures/tools/baseheads.png b/resources/tinkertextures/tools/baseheads.png index 72fdc484..155cbd08 100644 Binary files a/resources/tinkertextures/tools/baseheads.png and b/resources/tinkertextures/tools/baseheads.png differ diff --git a/resources/tinkertextures/tools/battlesigns.png b/resources/tinkertextures/tools/battlesigns.png index 65e2b1de..d57a8403 100644 Binary files a/resources/tinkertextures/tools/battlesigns.png and b/resources/tinkertextures/tools/battlesigns.png differ diff --git a/resources/tinkertextures/tools/frypans.png b/resources/tinkertextures/tools/frypans.png index 1eab5bb1..5b342cbe 100644 Binary files a/resources/tinkertextures/tools/frypans.png and b/resources/tinkertextures/tools/frypans.png differ diff --git a/resources/tinkertextures/tools/jokeparts.png b/resources/tinkertextures/tools/jokeparts.png index 330b68f6..8f6da2e1 100644 Binary files a/resources/tinkertextures/tools/jokeparts.png and b/resources/tinkertextures/tools/jokeparts.png differ diff --git a/resources/tinkertextures/tools/mattock.png b/resources/tinkertextures/tools/mattock.png index bbd3313c..0a2b3139 100644 Binary files a/resources/tinkertextures/tools/mattock.png and b/resources/tinkertextures/tools/mattock.png differ diff --git a/resources/tinkertextures/tools/pickaxes.png b/resources/tinkertextures/tools/pickaxes.png index 53ca4229..eefeb61b 100644 Binary files a/resources/tinkertextures/tools/pickaxes.png and b/resources/tinkertextures/tools/pickaxes.png differ diff --git a/resources/tinkertextures/tools/shovels.png b/resources/tinkertextures/tools/shovels.png index 275fcc0a..25c82a4d 100644 Binary files a/resources/tinkertextures/tools/shovels.png and b/resources/tinkertextures/tools/shovels.png differ diff --git a/resources/tinkertextures/tools/swordbroad.png b/resources/tinkertextures/tools/swordbroad.png index a3e79af4..77a1bb04 100644 Binary files a/resources/tinkertextures/tools/swordbroad.png and b/resources/tinkertextures/tools/swordbroad.png differ diff --git a/resources/tinkertextures/tools/swordlong.png b/resources/tinkertextures/tools/swordlong.png index b4d9cdf6..173a4d38 100644 Binary files a/resources/tinkertextures/tools/swordlong.png and b/resources/tinkertextures/tools/swordlong.png differ diff --git a/resources/tinkertextures/tools/swordparts.png b/resources/tinkertextures/tools/swordparts.png index b016a964..f2116cab 100644 Binary files a/resources/tinkertextures/tools/swordparts.png and b/resources/tinkertextures/tools/swordparts.png differ diff --git a/resources/tinkertextures/tools/swordrapier.png b/resources/tinkertextures/tools/swordrapier.png index 2c00fb5f..4ac7695d 100644 Binary files a/resources/tinkertextures/tools/swordrapier.png and b/resources/tinkertextures/tools/swordrapier.png differ diff --git a/tinker/tconstruct/AbilityHelper.java b/tinker/tconstruct/AbilityHelper.java index 472ac659..8163249f 100644 --- a/tinker/tconstruct/AbilityHelper.java +++ b/tinker/tconstruct/AbilityHelper.java @@ -239,18 +239,21 @@ public class AbilityHelper int attack = (int) ((tags.getCompoundTag("InfiTool").getInteger("Attack") + damageModifier) * bonusDamage); if (player instanceof EntityPlayer) - mob.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) player), attack); + if (mob.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) player), attack)) + { + damageTool(stack, 1, tags, player, false); + if (tags.getCompoundTag("InfiTool").getBoolean("Necrotic")) + player.heal(1); + } else mob.attackEntityFrom(DamageSource.causeMobDamage(player), attack); - } - //if (mob.hurtResistantTime <= 0) - damageTool(stack, 1, tags, player, false); - if (tags.getCompoundTag("InfiTool").hasKey("Fiery")) - { - System.out.println("Fiery: "+tags.getInteger("Fiery")); - mob.setFire(tags.getCompoundTag("InfiTool").getInteger("Fiery")/5+1); - } + if (tags.getCompoundTag("InfiTool").hasKey("Fiery")) + { + System.out.println("Fiery: "+tags.getInteger("Fiery")); + mob.setFire(tags.getCompoundTag("InfiTool").getInteger("Fiery")/5+1); + } + } } public static DamageSource causePiercingDamage (EntityLiving mob) diff --git a/tinker/tconstruct/EnumMaterial.java b/tinker/tconstruct/EnumMaterial.java index e14e29b0..c44c5d3a 100644 --- a/tinker/tconstruct/EnumMaterial.java +++ b/tinker/tconstruct/EnumMaterial.java @@ -9,18 +9,20 @@ public enum EnumMaterial Iron (2, 250, 600, 2, 1.3F, 1, 0), Flint (1, 171, 525, 2, 0.7F, 0, 1f), Cactus (1, 150, 500, 2, 1.0F, 0, -1f), - Obsidian (3, 89, 800, 2, 0.8F, 5, 0), Bone (1, 200, 500, 2, 1.0F, 0, 0), + Obsidian (3, 89, 700, 2, 0.8F, 3, 0), Netherrack (2, 131, 400, 1, 1.2F, 0, 1f), Slime (3, 1500, 150, 0, 5.0F, 0, 0), Paper (0, 131, 200, 0, 0.1F, 0, 0), Cobalt (4, 800, 800, 3, 1.8F, 2, 0), Ardite (4, 800, 800, 3, 1.8F, 0, 0), Manyullyn (5, 1200, 1000, 4, 2.5F, 0, 0), + Copper (1, 180, 500, 2, 1.8F, 0, 0), + Bronze (2, 250, 600, 2, 2.5F, 1, 0), Demonite (5, 1790, 900, 5, 1.66F, 0, 0), Holyshell (5, 1000, 700, 1, 1.5F, 0, 0); - //mining level, durability, mining speed, baseDamage, handle modifier, Durability level, shoddy/spiny level + //mining level, durability, mining speed, baseDamage, handle modifier, Reinforced level, shoddy/spiny level private final int harvestLevel; private final int durability; @@ -128,7 +130,7 @@ public enum EnumMaterial return getEnumByType(type).shoddy(); } - static EnumMaterial getEnumByType(int type) + public static EnumMaterial getEnumByType(int type) { switch (type) { @@ -137,16 +139,16 @@ public enum EnumMaterial case 2: return Iron; case 3: return Flint; case 4: return Cactus; - case 5: return Obsidian; - case 6: return Bone; + case 5: return Bone; + case 6: return Obsidian; case 7: return Netherrack; case 8: return Slime; case 9: return Paper; case 10: return Cobalt; case 11: return Ardite; case 12: return Manyullyn; - case 13: return Demonite; - case 14: return Holyshell; + case 13: return Copper; + case 14: return Bronze; } return null; } diff --git a/tinker/tconstruct/TConstruct.java b/tinker/tconstruct/TConstruct.java index 3c069ced..7162e065 100644 --- a/tinker/tconstruct/TConstruct.java +++ b/tinker/tconstruct/TConstruct.java @@ -8,6 +8,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; import tinker.tconstruct.client.gui.ToolGuiElement; +import tinker.tconstruct.crafting.PatternBuilder; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; @@ -23,7 +24,7 @@ import cpw.mods.fml.common.network.NetworkRegistry; * @author: mDiyo */ -@Mod(modid = "TConstruct", name = "TConstruct", version = "Beta 1") +@Mod(modid = "TConstruct", name = "TConstruct", version = "Beta 3") @NetworkMod(serverSideRequired = false, clientSideRequired = true, channels={"TConstruct"}, packetHandler = tinker.tconstruct.TConstructPacketHandler.class) public class TConstruct { @@ -61,11 +62,18 @@ public class TConstruct @ForgeSubscribe public void registerOre(OreRegisterEvent evt) { + System.out.println("Ore event: "+evt.Name); if (evt.Name == "battery") content.modE.batteries.add(evt.Ore); if (evt.Name == "basicCircuit") content.modE.circuits.add(evt.Ore); + + if (evt.Name == "ingotCopper") + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "copper"); + + if (evt.Name == "ingotBronze") + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "bronze"); } static int[][] slotTypes = { @@ -116,11 +124,11 @@ public class TConstruct static String[] toolDescriptions = { "The main way to repair or change your tools. Place a tool and a material on the left to get started.", "The Pickaxe is a basic mining tool. It is effective on stone and ores.\n\nRequired parts:\n- Pickaxe Head\n- Tool Binding\n- Handle", - "The Shovel is a basic digging tool. It is effective on dirt and sand.\n\nRequired parts:\n- Shovel Head\n- Handle", + "The Shovel is a basic digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle", "The Axe is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle", //"The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle", //"The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle", - "The Cutter Mattock is a multi-use tool. It is effective on wood, leaves, dirt, and sand.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle", + "The Cutter Mattock is a versatile farming tool. It is effective on wood, dirt, and plants.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle", "The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle", "The Longsword is a balanced weapon. It is useful for knocking enemies away or getting in and out of battle quickly.\n\nSpecial Ability: Lunge\nDamage: Moderate\nDurability: Moderate\n\nRequired parts:\n- Sword Blade\n- Hand Guard\n- Handle", "The Rapier is an offensive weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\nDamage: High\nDurability: Low\n\nRequired parts:\n- Sword Blade\n- Crossbar\n- Handle", diff --git a/tinker/tconstruct/TConstructContent.java b/tinker/tconstruct/TConstructContent.java index 8e08c411..a1405863 100644 --- a/tinker/tconstruct/TConstructContent.java +++ b/tinker/tconstruct/TConstructContent.java @@ -8,14 +8,40 @@ import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.oredict.ShapedOreRecipe; -import tinker.tconstruct.blocks.*; -import tinker.tconstruct.crafting.*; -import tinker.tconstruct.items.*; -import tinker.tconstruct.modifiers.*; -import tinker.tconstruct.tools.*; +import tinker.tconstruct.blocks.EquipBlock; +import tinker.tconstruct.blocks.TConstructBlock; +import tinker.tconstruct.blocks.ToolStationBlock; +import tinker.tconstruct.crafting.PatternBuilder; +import tinker.tconstruct.crafting.ToolBuilder; +import tinker.tconstruct.items.CraftingItem; +import tinker.tconstruct.items.Materials; +import tinker.tconstruct.items.Pattern; +import tinker.tconstruct.items.ToolPart; +import tinker.tconstruct.modifiers.ModBlaze; +import tinker.tconstruct.modifiers.ModBoolean; +import tinker.tconstruct.modifiers.ModDurability; +import tinker.tconstruct.modifiers.ModElectric; +import tinker.tconstruct.modifiers.ModInteger; +import tinker.tconstruct.modifiers.ModLapisBase; +import tinker.tconstruct.modifiers.ModLapisIncrease; +import tinker.tconstruct.modifiers.ModRedstone; +import tinker.tconstruct.modifiers.ModRepair; +import tinker.tconstruct.tools.Axe; +import tinker.tconstruct.tools.BattleSign; +import tinker.tconstruct.tools.Broadsword; +import tinker.tconstruct.tools.FryingPan; +import tinker.tconstruct.tools.Longsword; +import tinker.tconstruct.tools.LumberAxe; +import tinker.tconstruct.tools.Mattock; +import tinker.tconstruct.tools.Pickaxe; +import tinker.tconstruct.tools.Rapier; +import tinker.tconstruct.tools.Shovel; +import tinker.tconstruct.tools.ToolCore; +import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.registry.GameRegistry; public class TConstructContent + implements IFuelHandler { //Patterns and other materials public static Item blankPattern; @@ -78,6 +104,7 @@ public class TConstructContent addToolRecipes(); addCraftingRecipes(); setupToolTabs(); + GameRegistry.registerFuelHandler(this); } void createItems () @@ -87,6 +114,7 @@ public class TConstructContent GameRegistry.registerTileEntity(tinker.tconstruct.logic.ToolStationLogic.class, "ToolStation"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.PartCrafterLogic.class, "PartCrafter"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternChestLogic.class, "PatternHolder"); + GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternShaperLogic.class, "PatternShaper"); heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood); GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock"); @@ -158,11 +186,13 @@ public class TConstructContent pb.registerFullMaterial(Item.ingotIron, 2, "iron", 2); pb.registerFullMaterial(Item.flint, 2, "flint", 3); pb.registerFullMaterial(Block.cactus, 2, "cactus", 4); - pb.registerFullMaterial(Item.bone, 2, "bone", new ItemStack(toolShard, 1, 5), new ItemStack(Item.bone), 5); + pb.registerFullMaterial(Item.bone, 2, "bone", new ItemStack(Item.dyePowder, 1, 0), new ItemStack(Item.bone), 5); pb.registerFullMaterial(Block.obsidian, 2, "obsidian", 6); pb.registerFullMaterial(Block.netherrack, 2, "netherrack", 7); pb.registerFullMaterial(new ItemStack(materials, 1, 1), 2, "slime", new ItemStack(toolShard, 1, 8), new ItemStack(toolRod, 1, 8), 8); pb.registerFullMaterial(new ItemStack(materials, 1, 0), 2, "paper", new ItemStack(Item.paper), new ItemStack(toolRod, 1, 9), 9); + pb.registerMaterialSet("copper", new ItemStack(toolShard, 1, 13), new ItemStack(toolRod, 1, 13), 13); + pb.registerMaterialSet("bronze", new ItemStack(toolShard, 1, 14), new ItemStack(toolRod, 1, 14), 14); patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, largeGuard, medGuard, crossbar, binding, frypanHead, signHead }; for (int iter = 0; iter < patternOutputs.length; iter++) @@ -209,10 +239,7 @@ public class TConstructContent ItemStack reBattery = ic2.api.Items.getItem("reBattery"); if (reBattery != null) - modE.batteries.add(reBattery); - ItemStack chargedReBattery = ic2.api.Items.getItem("chargedReBattery"); - if (chargedReBattery != null) - modE.batteries.add(chargedReBattery); + modE.batteries.add(new ItemStack(reBattery.getItem(), 1, -1)); ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit"); if (electronicCircuit != null) modE.circuits.add(electronicCircuit); @@ -228,8 +255,12 @@ public class TConstructContent GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 3), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 2)); GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 4), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 3)); GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 5), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.chest); - GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.planks); + GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 0)); + GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 11), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 1)); + GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 12), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 2)); + GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 13), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.planks, 1, 3)); GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 1), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "logWood")); + GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "plankWood")); GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(blankPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', Item.stick)); /*GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.cobblestone, 's', new ItemStack(toolRod, 1, 1)); @@ -238,7 +269,7 @@ public class TConstructContent GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); //Paper stack GameRegistry.addRecipe(new ItemStack(materials, 1, 6), "ppp", "ppp", "ppp", 'p', Block.cobblestoneMossy); //Moss ball - GameRegistry.addRecipe(new ItemStack(materials, 1, 7), " c ", "cbc", " c ", 'b', Item.bucketLava, 'c', Item.coal); //Auto-smelt + GameRegistry.addRecipe(new ItemStack(materials, 1, 7), "xcx", "cbc", "xcx", 'b', Item.bucketLava, 'c', Item.coal, 'x', Block.netherrack); //Auto-smelt GameRegistry.addShapelessRecipe(new ItemStack(materials, 1, 8), Item.bone, Item.rottenFlesh, Item.chickenRaw, Item.beefRaw, Item.porkRaw, Item.fishRaw); //Necrotic bone GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 0), Item.slimeBall, Item.slimeBall, Item.slimeBall, Item.slimeBall, Block.sand, Block.dirt); //Slimy sand GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 1), Item.clay, Block.sand, Block.gravel); //Grout, Add stone dust? @@ -290,4 +321,12 @@ public class TConstructContent public static String bowTexture = "/tinkertextures/tools/bows.png"; public static String mattockTexture = "/tinkertextures/tools/mattock.png"; public static String lumberaxeTexture = "/tinkertextures/tools/lumberaxe.png"; + + @Override + public int getBurnTime (ItemStack fuel) + { + if (fuel.itemID == materials.itemID && fuel.getItemDamage() == 7) + return 26400; + return 0; + } } \ No newline at end of file diff --git a/tinker/tconstruct/blocks/ToolStationBlock.java b/tinker/tconstruct/blocks/ToolStationBlock.java index 1bb39b4f..c5ad6fd7 100644 --- a/tinker/tconstruct/blocks/ToolStationBlock.java +++ b/tinker/tconstruct/blocks/ToolStationBlock.java @@ -115,6 +115,9 @@ public class ToolStationBlock extends InventoryBlock case 8: return new PatternChestLogic(); case 9: return new PatternChestLogic(); case 10: return new PatternShaperLogic(); + case 11: return new PatternShaperLogic(); + case 12: return new PatternShaperLogic(); + case 13: return new PatternShaperLogic(); default: return null; } } @@ -148,6 +151,11 @@ public class ToolStationBlock extends InventoryBlock { list.add(new ItemStack(id, 1, iter)); } + + for (int iter = 10; iter < 14; iter++) + { + list.add(new ItemStack(id, 1, iter)); + } } public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y, int z) diff --git a/tinker/tconstruct/blocks/ToolStationItemBlock.java b/tinker/tconstruct/blocks/ToolStationItemBlock.java index 510a8e14..023d3e77 100644 --- a/tinker/tconstruct/blocks/ToolStationItemBlock.java +++ b/tinker/tconstruct/blocks/ToolStationItemBlock.java @@ -7,7 +7,7 @@ public class ToolStationItemBlock extends ItemBlock { public static final String blockType[] = { - "Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper" + "Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper", "PatternShaper", "PatternShaper", "PatternShaper" }; public ToolStationItemBlock(int id) diff --git a/tinker/tconstruct/client/TProxyClient.java b/tinker/tconstruct/client/TProxyClient.java index 2bcc16c1..239fbe53 100644 --- a/tinker/tconstruct/client/TProxyClient.java +++ b/tinker/tconstruct/client/TProxyClient.java @@ -55,9 +55,9 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.instance().addStringLocalization("crafters.Frypan", "Frying Pan"); LanguageRegistry.instance().addStringLocalization("ToolStation.Crafter.name", "Tool Station"); - LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Crafting"); + LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Builder"); LanguageRegistry.instance().addStringLocalization("ToolStation.PatternChest.name", "Pattern Chest"); - LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Pattern Shaper"); + LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Stencil Table"); LanguageRegistry.instance().addStringLocalization("CraftedSoil.Slime.name", "Slimy Mud"); LanguageRegistry.instance().addStringLocalization("CraftedSoil.Grout.name", "Grout"); @@ -114,7 +114,7 @@ public class TProxyClient extends TProxyCommon "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone" }; public static final String[] toolMaterialNames = new String[] { - "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn" }; + "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" }; public static final String[] materialTypes = new String[] { "ToolRod", "PickaxeHead", "ToolShard", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" }; diff --git a/tinker/tconstruct/client/gui/PartCrafterGui.java b/tinker/tconstruct/client/gui/PartCrafterGui.java index a79d64c1..7e6daec8 100644 --- a/tinker/tconstruct/client/gui/PartCrafterGui.java +++ b/tinker/tconstruct/client/gui/PartCrafterGui.java @@ -1,20 +1,25 @@ package tinker.tconstruct.client.gui; -import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; +import tinker.tconstruct.EnumMaterial; +import tinker.tconstruct.crafting.PatternBuilder; import tinker.tconstruct.logic.PartCrafterLogic; public class PartCrafterGui extends GuiContainer { PartCrafterLogic logic; - String title, body = ""; + String title, otherTitle = ""; boolean drawChestPart; + boolean hasTop, hasBottom; + ItemStack topMaterial, bottomMaterial; + EnumMaterial topEnum, bottomEnum; public PartCrafterGui(InventoryPlayer inventoryplayer, PartCrafterLogic partlogic, World world, int x, int y, int z) { @@ -23,7 +28,6 @@ public class PartCrafterGui extends GuiContainer drawChestPart = ((PartCrafterContainer)inventorySlots).largeInventory; title = "\u00A7nTool Part Crafting"; - body = "Place a pattern and a material on the left to get started.\n\nDescriptions not done yet, stay tuned."; } protected void drawGuiContainerForegroundLayer (int par1, int par2) @@ -33,13 +37,95 @@ public class PartCrafterGui extends GuiContainer if (drawChestPart) this.fontRenderer.drawString(StatCollector.translateToLocal("inventory.PatternChest"), -108, this.ySize - 148, 4210752); - drawToolInformation(); + drawMaterialInformation(); } - void drawToolInformation () + void drawDefaultInformation() { + title = "\u00A7nTool Part Building"; this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 16777215); - fontRenderer.drawSplitString(body, xSize + 8, 24, 115, 16777215); + fontRenderer.drawSplitString("Place a pattern and a material on the left to get started.", xSize + 8, 24, 115, 16777215); + } + + void drawMaterialInformation () + { + ItemStack top = logic.getStackInSlot(1); + ItemStack bottom = logic.getStackInSlot(3); + if (topMaterial != top) + { + topMaterial = top; + int topID = PatternBuilder.instance.getPartID(top); + + if (topID != -1) + { + topEnum = EnumMaterial.getEnumByType(topID); + hasTop = true; + title = "\u00A7n"+topEnum.name(); + } + else + hasTop = false; + } + + if (bottomMaterial != bottom) + { + bottomMaterial = bottom; + int bottomID = PatternBuilder.instance.getPartID(bottom); + + if (bottomID != -1) + { + bottomEnum = EnumMaterial.getEnumByType(bottomID); + hasBottom = true; + otherTitle = "\u00A7n"+bottomEnum.name(); + } + else + hasBottom = false; + } + + int offset = 8; + if (hasTop) + { + this.drawCenteredString(fontRenderer, title, xSize + 63, offset, 16777215); + this.fontRenderer.drawString("Base Durability: "+topEnum.durability(), xSize + 8, offset+16, 16777215); + this.fontRenderer.drawString("Handle Modifier: "+topEnum.handleDurability()+"x", xSize + 8, offset+27, 16777215); + this.fontRenderer.drawString("Mining Speed: "+topEnum.toolSpeed()/100f, xSize + 8, offset+38, 16777215); + this.fontRenderer.drawString("Mining Level: "+getHarvestLevelName(topEnum.harvestLevel()), xSize + 8, offset+49, 16777215); + this.fontRenderer.drawString("Base Attack: "+topEnum.attack(), xSize + 8, offset+60, 16777215); + } + + offset = 90; + if (hasBottom) + { + this.drawCenteredString(fontRenderer, otherTitle, xSize + 63, offset, 16777215); + this.fontRenderer.drawString("Base Durability: "+bottomEnum.durability(), xSize + 8, offset+16, 16777215); + this.fontRenderer.drawString("Handle Modifier: "+bottomEnum.handleDurability()+"x", xSize + 8, offset+27, 16777215); + this.fontRenderer.drawString("Mining Speed: "+bottomEnum.toolSpeed()/100f, xSize + 8, offset+38, 16777215); + this.fontRenderer.drawString("Mining Level: "+getHarvestLevelName(bottomEnum.harvestLevel()), xSize + 8, offset+49, 16777215); + this.fontRenderer.drawString("Base Attack: "+bottomEnum.attack(), xSize + 8, offset+60, 16777215); + } + + if (!hasTop && !hasBottom) + drawDefaultInformation(); + } + + String getHarvestLevelName (int num) + { + switch (num) + { + case 0: + return "Stone"; + case 1: + return "Iron"; + case 2: + return "Redstone"; + case 3: + return "Obsidian"; //Mithril + case 4: + return "Vulcanite"; + case 5: + return "Adamantine"; + default: + return String.valueOf(num); + } } protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3) @@ -86,6 +172,6 @@ public class PartCrafterGui extends GuiContainer this.mc.renderEngine.bindTexture(texID); cornerX = (this.width + this.xSize) / 2; cornerY = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize); + this.drawTexturedModalRect(cornerX, cornerY, 126, 0, 126, this.ySize); } } diff --git a/tinker/tconstruct/client/gui/ToolStationGui.java b/tinker/tconstruct/client/gui/ToolStationGui.java index 059fa310..f65cc92a 100644 --- a/tinker/tconstruct/client/gui/ToolStationGui.java +++ b/tinker/tconstruct/client/gui/ToolStationGui.java @@ -171,8 +171,7 @@ public class ToolStationGui extends GuiContainer fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 57, 0xffffff); if (tags.hasKey("Tooltip1")) - ; - fontRenderer.drawString("Modifiers:", xSize + 8, 68, 0xffffff); + fontRenderer.drawString("Modifiers:", xSize + 8, 68, 0xffffff); boolean displayToolTips = true; int tipNum = 0; @@ -204,8 +203,7 @@ public class ToolStationGui extends GuiContainer fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 79, 0xffffff); if (tags.hasKey("Tooltip1")) - ; - fontRenderer.drawString("Modifiers:", xSize + 8, 90, 0xffffff); + fontRenderer.drawString("Modifiers:", xSize + 8, 90, 0xffffff); boolean displayToolTips = true; int tipNum = 0; @@ -239,8 +237,7 @@ public class ToolStationGui extends GuiContainer fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 90, 0xffffff); if (tags.hasKey("Tooltip1")) - ; - fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff); + fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff); boolean displayToolTips = true; int tipNum = 0; @@ -318,24 +315,27 @@ public class ToolStationGui extends GuiContainer this.mc.renderEngine.bindTexture(texID); cornerX = (this.width + this.xSize) / 2; cornerY = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize); + this.drawTexturedModalRect(cornerX, cornerY, 0, 0, 126, this.ySize); } protected void keyTyped (char par1, int keyCode) { - text.textboxKeyTyped(par1, keyCode); - toolName = text.getText().trim(); - logic.setToolname(toolName); - updateServer(); - if (keyCode == 1) { + updateServer(""); Keyboard.enableRepeatEvents(false); this.mc.thePlayer.closeScreen(); } + else + { + text.textboxKeyTyped(par1, keyCode); + toolName = text.getText().trim(); + logic.setToolname(toolName); + updateServer(toolName); + } } - void updateServer () + void updateServer (String name) { ByteArrayOutputStream bos = new ByteArrayOutputStream(8); DataOutputStream outputStream = new DataOutputStream(bos); @@ -346,7 +346,7 @@ public class ToolStationGui extends GuiContainer outputStream.writeInt(logic.xCoord); outputStream.writeInt(logic.yCoord); outputStream.writeInt(logic.zCoord); - outputStream.writeUTF(toolName); + outputStream.writeUTF(name); } catch (Exception ex) { diff --git a/tinker/tconstruct/crafting/ToolBuilder.java b/tinker/tconstruct/crafting/ToolBuilder.java index eb38bad7..cb60439d 100644 --- a/tinker/tconstruct/crafting/ToolBuilder.java +++ b/tinker/tconstruct/crafting/ToolBuilder.java @@ -60,6 +60,7 @@ public class ToolBuilder //System.out.println("Tool name: "+item.getToolName()); int head = headStack.getItemDamage(); + System.out.println("Head:"+head); int handle = handleStack.getItemDamage(); int accessory = -1; if (accessoryStack != null) diff --git a/tinker/tconstruct/items/TArmor.java b/tinker/tconstruct/items/TArmor.java new file mode 100644 index 00000000..1e2ee9d1 --- /dev/null +++ b/tinker/tconstruct/items/TArmor.java @@ -0,0 +1,23 @@ +package tinker.tconstruct.items; + +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.IArmorTextureProvider; + +public class TArmor extends ItemArmor + implements IArmorTextureProvider +{ + + public TArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) + { + super(par1, par2EnumArmorMaterial, par3, par4); + } + + @Override + public String getArmorTextureFile (ItemStack itemstack) + { + return "/tinkertextures/armor/wood_1.png"; + } + +} diff --git a/tinker/tconstruct/items/ToolPart.java b/tinker/tconstruct/items/ToolPart.java index 63cc6b19..fa50d53f 100644 --- a/tinker/tconstruct/items/ToolPart.java +++ b/tinker/tconstruct/items/ToolPart.java @@ -23,16 +23,16 @@ public class ToolPart extends CraftingItem public String getItemNameIS(ItemStack stack) { - int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 12); + int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 15); return getItemName() + "." +toolMaterialNames[arr]; } public void getSubItems(int id, CreativeTabs tab, List list) { - for (int i = 0; i < 13; i++) + for (int i = 0; i < 15; i++) list.add(new ItemStack(id, 1, i)); } public static final String[] toolMaterialNames = new String[] { - "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn" }; + "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" }; } diff --git a/tinker/tconstruct/modifiers/ModLapisBase.java b/tinker/tconstruct/modifiers/ModLapisBase.java index 1fb6c966..864e7bc4 100644 --- a/tinker/tconstruct/modifiers/ModLapisBase.java +++ b/tinker/tconstruct/modifiers/ModLapisBase.java @@ -30,7 +30,7 @@ public class ModLapisBase extends ToolMod tags.setBoolean(key, true); String modName = "\u00a79Lapis (0/100)"; - int tooltipIndex = addToolTip(tool, "\u00a79Fortune", modName); + int tooltipIndex = addToolTip(tool, "\u00a79Luck", modName); int[] keyPair = new int[] { 0, tooltipIndex }; tags.setIntArray(key, keyPair); diff --git a/tinker/tconstruct/modifiers/ModLapisIncrease.java b/tinker/tconstruct/modifiers/ModLapisIncrease.java index 6d64dc79..eea95894 100644 --- a/tinker/tconstruct/modifiers/ModLapisIncrease.java +++ b/tinker/tconstruct/modifiers/ModLapisIncrease.java @@ -8,6 +8,7 @@ import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import tinker.tconstruct.tools.Weapon; public class ModLapisIncrease extends ToolMod { @@ -26,7 +27,6 @@ public class ModLapisIncrease extends ToolMod if (!tags.hasKey(key)) return false; - System.out.println("Checking modify"); int keyPair[] = tags.getIntArray(key); if (keyPair[0] + increase <= 100) @@ -43,12 +43,24 @@ public class ModLapisIncrease extends ToolMod int keyPair[] = tags.getIntArray(key); keyPair[0] += increase; tags.setIntArray(key, keyPair); - if (keyPair[0] >= 100) - addEnchantment(tool, Enchantment.fortune, 3); - else if (keyPair[0] >= 40) - addEnchantment(tool, Enchantment.fortune, 2); - else if (keyPair[0] >= 10) - addEnchantment(tool, Enchantment.fortune, 1); + if (tool.getItem() instanceof Weapon) + { + if (keyPair[0] >= 100) + addEnchantment(tool, Enchantment.looting, 3); + else if (keyPair[0] >= 40) + addEnchantment(tool, Enchantment.looting, 2); + else if (keyPair[0] >= 10) + addEnchantment(tool, Enchantment.looting, 1); + } + else + { + if (keyPair[0] >= 100) + addEnchantment(tool, Enchantment.fortune, 3); + else if (keyPair[0] >= 40) + addEnchantment(tool, Enchantment.fortune, 2); + else if (keyPair[0] >= 10) + addEnchantment(tool, Enchantment.fortune, 1); + } updateModTag(tool, keyPair); } diff --git a/tinker/tconstruct/modifiers/ModRepair.java b/tinker/tconstruct/modifiers/ModRepair.java index 954c6384..4bfa01c1 100644 --- a/tinker/tconstruct/modifiers/ModRepair.java +++ b/tinker/tconstruct/modifiers/ModRepair.java @@ -49,7 +49,7 @@ public class ModRepair extends ToolMod NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); tags.setBoolean("Broken", false); int damage = tags.getInteger("Damage"); - int dur = tags.getInteger("TotalDurability"); + int dur = tags.getInteger("BaseDurability"); int materialValue = 0; if (input [0] != null) diff --git a/tinker/tconstruct/tools/Axe.java b/tinker/tconstruct/tools/Axe.java index d07f7ab1..f6bc7c57 100644 --- a/tinker/tconstruct/tools/Axe.java +++ b/tinker/tconstruct/tools/Axe.java @@ -45,7 +45,7 @@ public class Axe extends HarvestTool return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random); } - static Material[] materials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin }; + static Material[] materials = { Material.wood, Material.leaves, Material.circuits, Material.cactus, Material.pumpkin }; @Override protected Item getHeadItem () diff --git a/tinker/tconstruct/tools/Mattock.java b/tinker/tconstruct/tools/Mattock.java index 05377255..2c81cb60 100644 --- a/tinker/tconstruct/tools/Mattock.java +++ b/tinker/tconstruct/tools/Mattock.java @@ -44,8 +44,8 @@ public class Mattock extends DualHarvestTool return "shovel"; } - static Material[] axeMaterials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin, Material.leaves }; - static Material[] shovelMaterials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay }; + static Material[] axeMaterials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin, Material.plants }; + static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay }; public float getDurabilityModifier () {