diff --git a/resources/tinkertextures/ConstructBlocks.png b/resources/tinkertextures/ConstructBlocks.png index 2dd1a9a2..0945b862 100644 Binary files a/resources/tinkertextures/ConstructBlocks.png and b/resources/tinkertextures/ConstructBlocks.png differ diff --git a/resources/tinkertextures/gui/icons.png b/resources/tinkertextures/gui/icons.png index d0103059..5f6972d9 100644 Binary files a/resources/tinkertextures/gui/icons.png and b/resources/tinkertextures/gui/icons.png differ diff --git a/resources/tinkertextures/gui/patternshaper.png b/resources/tinkertextures/gui/patternshaper.png new file mode 100644 index 00000000..7e5364ea Binary files /dev/null and b/resources/tinkertextures/gui/patternshaper.png differ diff --git a/resources/tinkertextures/gui/toolstation.png b/resources/tinkertextures/gui/toolstation.png index 9d793490..d516c7e9 100644 Binary files a/resources/tinkertextures/gui/toolstation.png and b/resources/tinkertextures/gui/toolstation.png differ diff --git a/resources/tinkertextures/materials.png b/resources/tinkertextures/materials.png index 4e3b071f..376e1492 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 087c79fa..2ab68c61 100644 Binary files a/resources/tinkertextures/tools/axes.png and b/resources/tinkertextures/tools/axes.png differ diff --git a/resources/tinkertextures/tools/battlesigns.png b/resources/tinkertextures/tools/battlesigns.png index b14f82c1..65e2b1de 100644 Binary files a/resources/tinkertextures/tools/battlesigns.png and b/resources/tinkertextures/tools/battlesigns.png differ diff --git a/resources/tinkertextures/tools/daggers.png b/resources/tinkertextures/tools/daggers.png deleted file mode 100644 index d9f14ab0..00000000 Binary files a/resources/tinkertextures/tools/daggers.png and /dev/null differ diff --git a/resources/tinkertextures/tools/frypans.png b/resources/tinkertextures/tools/frypans.png index 1ae2fe7c..1eab5bb1 100644 Binary files a/resources/tinkertextures/tools/frypans.png and b/resources/tinkertextures/tools/frypans.png differ diff --git a/resources/tinkertextures/tools/iceaxes.png b/resources/tinkertextures/tools/iceaxes.png index 42f1ee60..41b0bed4 100644 Binary files a/resources/tinkertextures/tools/iceaxes.png and b/resources/tinkertextures/tools/iceaxes.png differ diff --git a/resources/tinkertextures/tools/mattock.png b/resources/tinkertextures/tools/mattock.png index 00585cde..bbd3313c 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 a9bca07b..53ca4229 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 0c4c567e..275fcc0a 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 d37142ac..a3e79af4 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 2395aecb..b4d9cdf6 100644 Binary files a/resources/tinkertextures/tools/swordlong.png and b/resources/tinkertextures/tools/swordlong.png differ diff --git a/resources/tinkertextures/tools/swordrapier.png b/resources/tinkertextures/tools/swordrapier.png index df550c25..2c00fb5f 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 779136f8..472ac659 100644 --- a/tinker/tconstruct/AbilityHelper.java +++ b/tinker/tconstruct/AbilityHelper.java @@ -3,7 +3,6 @@ package tinker.tconstruct; import ic2.api.ElectricItem; import ic2.api.ICustomElectricItem; import ic2.api.IElectricItem; -import ic2.core.util.StackUtil; import java.util.Random; @@ -60,7 +59,7 @@ public class AbilityHelper { int damage = tags.getCompoundTag("InfiTool").getInteger("Damage"); int damageTrue = damage + dam; - System.out.println("Damaging tool, damageTrue "+damageTrue+", ignoring charge: "+ignoreCharge); + //System.out.println("Damaging tool, damageTrue "+damageTrue+", ignoring charge: "+ignoreCharge); int maxDamage = tags.getCompoundTag("InfiTool").getInteger("TotalDurability"); if (damage + dam <= 0) { @@ -165,7 +164,7 @@ public class AbilityHelper amount = ielectricitem.getTransferLimit(); } - NBTTagCompound tags = StackUtil.getOrCreateNbtData(itemStack); + NBTTagCompound tags = itemStack.getTagCompound();//StackUtil.getOrCreateNbtData(itemStack); int charge = tags.getInteger("charge"); if (amount > charge) @@ -244,9 +243,14 @@ public class AbilityHelper else mob.attackEntityFrom(DamageSource.causeMobDamage(player), attack); } - System.out.println("Hit entity"); //if (mob.hurtResistantTime <= 0) - damageTool(stack, 1, tags, player, false); + 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); + } + } public static DamageSource causePiercingDamage (EntityLiving mob) diff --git a/tinker/tconstruct/EnumMaterial.java b/tinker/tconstruct/EnumMaterial.java index 22ee270d..e14e29b0 100644 --- a/tinker/tconstruct/EnumMaterial.java +++ b/tinker/tconstruct/EnumMaterial.java @@ -4,23 +4,23 @@ package tinker.tconstruct; */ public enum EnumMaterial { - Wood(0, 59, 200, 0, 1.0F, 0, 0), - Stone(1, 131, 400, 1, 0.5F, 0, 1f), - 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), - 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, 1200, 4, 2.5F, 0, 0), - Demonite(5, 1790, 900, 5, 1.66F, 0, 0), - Holyshell(5, 1000, 700, 1, 1.5F, 0, 0); + Wood (0, 59, 200, 0, 1.0F, 0, 0), + Stone (1, 131, 400, 1, 0.5F, 0, 1f), + 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), + 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), + 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 level, spiny level + //mining level, durability, mining speed, baseDamage, handle modifier, Durability level, shoddy/spiny level private final int harvestLevel; private final int durability; diff --git a/tinker/tconstruct/TConstruct.java b/tinker/tconstruct/TConstruct.java index 766e9597..e23e47d7 100644 --- a/tinker/tconstruct/TConstruct.java +++ b/tinker/tconstruct/TConstruct.java @@ -121,8 +121,8 @@ public class TConstruct //"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 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- Large 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- Medium Guard\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", "The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Bash\nShift+rClick: Place Frying Pan\nDamage: High\nDurability: High\n\nRequired parts:\n- Pan\n- Handle", "The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nShift-rClick: Place sign\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Board\n- Handle" diff --git a/tinker/tconstruct/TConstructContent.java b/tinker/tconstruct/TConstructContent.java index 0b8a8b3c..618e85cb 100644 --- a/tinker/tconstruct/TConstructContent.java +++ b/tinker/tconstruct/TConstructContent.java @@ -35,7 +35,7 @@ public class TConstructContent public static ToolCore frypan; public static ToolCore battlesign; - public static ToolCore longbow; + //public static ToolCore longbow; public static ToolCore mattock; public static ToolCore lumberaxe; @@ -126,7 +126,7 @@ public class TConstructContent frypan = new FryingPan(PHConstruct.frypan, frypanTexture); battlesign = new BattleSign(PHConstruct.battlesign, signTexture); - longbow = new RangedWeapon(PHConstruct.longbow, bowTexture); + //longbow = new RangedWeapon(PHConstruct.longbow, bowTexture); mattock = new Mattock(PHConstruct.mattock, mattockTexture); lumberaxe = new LumberAxe(PHConstruct.lumberaxe, lumberaxeTexture); @@ -181,7 +181,7 @@ public class TConstructContent tb.addToolRecipe(frypan, frypanHead); tb.addToolRecipe(battlesign, signHead); tb.addToolRecipe(mattock, axeHead, shovelHead); - tb.addToolRecipe(longbow, toolRod, toolRod); + //tb.addToolRecipe(longbow, toolRod, toolRod); //tb.addToolRecipe(lumberaxe, lumberHead); tb.registerToolMod(new ModRepair()); @@ -193,8 +193,15 @@ public class TConstructContent tb.registerToolMod(new ModRedstone(new ItemStack[] { new ItemStack(Item.redstone), new ItemStack(Item.redstone) }, 2, 2)); tb.registerToolMod(new ModLapisBase(new ItemStack[] {new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis)}, 10)); tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4)}, 10, 1)); + tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Item.dyePowder, 1, 4)}, 10, 2)); tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Block.blockLapis)}, 10, 9)); + tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Item.dyePowder, 1, 4), new ItemStack(Block.blockLapis)}, 10, 10)); + tb.registerToolMod(new ModLapisIncrease(new ItemStack[] {new ItemStack(Block.blockLapis), new ItemStack(Block.blockLapis)}, 10, 18)); tb.registerToolMod(new ModInteger(new ItemStack[] {new ItemStack(materials, 1, 6)}, 4, "Moss", 3, "\u00a72", "Auto-Repair")); + tb.registerToolMod(new ModBlaze(new ItemStack[] {new ItemStack(Item.blazePowder)}, 7, 1)); + tb.registerToolMod(new ModBlaze(new ItemStack[] {new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder)}, 7, 2)); + tb.registerToolMod(new ModBoolean(new ItemStack[] {new ItemStack(materials, 1, 7)}, 6, "Lava", "\u00a74", "Auto-Smelt")); + tb.registerToolMod(new ModInteger(new ItemStack[] {new ItemStack(materials, 1, 8)}, 8, "Necrotic", 1, "\u00a78", "Life Steal")); ItemStack reBattery = ic2.api.Items.getItem("reBattery"); if (reBattery != null) @@ -217,6 +224,7 @@ public class TConstructContent GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 3), "p", "w", 'p', new ItemStack(woodPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 2)); GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 4), "p", "w", 'p', new ItemStack(woodPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 3)); GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 5), "p", "w", 'p', new ItemStack(woodPattern, 1, 0), 'w', Block.chest); + GameRegistry.addRecipe(new ItemStack(woodCrafter, 1, 10), "p", "w", 'p', new ItemStack(woodPattern, 1, 0), 'w', Block.planks); GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodCrafter, 1, 1), "p", "w", 'p', new ItemStack(woodPattern, 1, 0), 'w', "logWood")); GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(woodPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', Item.stick)); @@ -224,10 +232,12 @@ public class TConstructContent GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.stone, 's', new ItemStack(toolRod, 1, 1)); GameRegistry.addRecipe(new ItemStack(netherPattern, 1, 0), "ps", "sp", 'p', Block.netherrack, 's', new ItemStack(toolRod, 1, 7));*/ - GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); - GameRegistry.addRecipe(new ItemStack(materials, 1, 6), "ppp", "ppp", "ppp", 'p', Block.cobblestoneMossy); - GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 0), Item.slimeBall, Item.slimeBall, Item.slimeBall, Item.slimeBall, Block.sand, Block.dirt); - GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 1, 1), Item.clay, Block.sand, Block.gravel); //Add stone dust? + 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.addShapelessRecipe(new ItemStack(materials, 1, 8), Item.bone, Item.rottenFlesh, Item.chickenRaw, Item.beefRaw, Item.porkRaw); //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? FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 0, new ItemStack(materials, 1, 1), 2f); //Slime FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 1, new ItemStack(materials, 1, 2), 2f); //Seared brick item diff --git a/tinker/tconstruct/TConstructGuiHandler.java b/tinker/tconstruct/TConstructGuiHandler.java index 38a9028d..68f8dd4a 100644 --- a/tinker/tconstruct/TConstructGuiHandler.java +++ b/tinker/tconstruct/TConstructGuiHandler.java @@ -13,9 +13,11 @@ public class TConstructGuiHandler implements IGuiHandler public static int stationID = 0; public static int partID = 1; public static int pchestID = 2; - public static int smeltery = 3; + public static int pshaperID = 3; public static int frypanID = 4; + public static int smeltery = 7; + @Override public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { @@ -34,10 +36,10 @@ public class TConstructGuiHandler implements IGuiHandler return new PartCrafterGui(player.inventory, (PartCrafterLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == pchestID) return new PatternChestGui(player.inventory, (PatternChestLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); - if (ID == smeltery) - return new SmelteryGui(player.inventory, (SmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == frypanID) return new FrypanGui(player.inventory, (FrypanLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); + if (ID == smeltery) + return new SmelteryGui(player.inventory, (SmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); return null; } diff --git a/tinker/tconstruct/blocks/ToolStationBlock.java b/tinker/tconstruct/blocks/ToolStationBlock.java index 84e01b48..380a3448 100644 --- a/tinker/tconstruct/blocks/ToolStationBlock.java +++ b/tinker/tconstruct/blocks/ToolStationBlock.java @@ -46,10 +46,18 @@ public class ToolStationBlock extends InventoryBlock else return 2; } - else + else if (meta <= 4) { return 1 + meta * 3 + getBlockTextureFromSide(side); } + else if (meta <= 9) + { + return 16 + getBlockTextureFromSide(side); + } + else + { + return -14 + meta * 3 + getBlockTextureFromSide(side); + } } public int getBlockTextureFromSide (int side) diff --git a/tinker/tconstruct/blocks/ToolStationItemBlock.java b/tinker/tconstruct/blocks/ToolStationItemBlock.java index c4667715..510a8e14 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", "Smeltery" + "Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper" }; public ToolStationItemBlock(int id) diff --git a/tinker/tconstruct/client/TProxyClient.java b/tinker/tconstruct/client/TProxyClient.java index 1fe48bc0..ac40d689 100644 --- a/tinker/tconstruct/client/TProxyClient.java +++ b/tinker/tconstruct/client/TProxyClient.java @@ -48,6 +48,7 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.instance().addStringLocalization("crafters.ToolStation", "Tool Station"); LanguageRegistry.instance().addStringLocalization("crafters.PartBuilder", "Part Builder"); + LanguageRegistry.instance().addStringLocalization("crafters.PatternShaper", "Pattern Shaper"); LanguageRegistry.instance().addStringLocalization("inventory.PatternChest", "Pattern Chest"); LanguageRegistry.instance().addStringLocalization("crafters.Smeltery", "Smeltery"); LanguageRegistry.instance().addStringLocalization("crafters.Frypan", "Frying Pan"); @@ -55,6 +56,7 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.instance().addStringLocalization("ToolStation.Crafter.name", "Tool Station"); LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Crafting"); LanguageRegistry.instance().addStringLocalization("ToolStation.PatternChest.name", "Pattern Chest"); + LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Pattern Shaper"); LanguageRegistry.instance().addStringLocalization("CraftedSoil.Slime.name", "Slimy Mud"); LanguageRegistry.instance().addStringLocalization("CraftedSoil.Grout.name", "Grout"); @@ -105,10 +107,10 @@ public class TProxyClient extends TProxyCommon } public static final String[] materialItemInternalNames = new String[] { - "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball" }; + "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone" }; public static final String[] materialItemNames = new String[] { - "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of moss" }; + "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" }; @@ -117,11 +119,11 @@ public class TProxyClient extends TProxyCommon "ToolRod", "PickaxeHead", "ToolShard", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" }; public static final String[] materialNames = new String[] { - " Rod", " Pickaxe Head", " Shard", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Cover", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" }; + " Rod", " Pickaxe Head", " Shard", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" }; public static final String[] patterns = new String[] { "blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" }; public static final String[] patternNames = new String[] { - "Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Large Guard", "Medium Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" }; + "Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" }; } diff --git a/tinker/tconstruct/client/gui/PatternShaperContainer.java b/tinker/tconstruct/client/gui/PatternShaperContainer.java new file mode 100644 index 00000000..4e854cdf --- /dev/null +++ b/tinker/tconstruct/client/gui/PatternShaperContainer.java @@ -0,0 +1,6 @@ +package tinker.tconstruct.client.gui; + +public class PatternShaperContainer +{ + +} diff --git a/tinker/tconstruct/client/gui/PatternShaperInventory.java b/tinker/tconstruct/client/gui/PatternShaperInventory.java new file mode 100644 index 00000000..c11f1bb1 --- /dev/null +++ b/tinker/tconstruct/client/gui/PatternShaperInventory.java @@ -0,0 +1,107 @@ +package tinker.tconstruct.client.gui; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class PatternShaperInventory implements IInventory +{ + /** A list of one item containing the result of the crafting formula */ + private ItemStack[] inventory = new ItemStack[2]; + + /** + * Returns the number of slots in the inventory. + */ + public int getSizeInventory() + { + return inventory.length; + } + + /** + * Returns the stack in slot i + */ + public ItemStack getStackInSlot(int slot) + { + return this.inventory[slot]; + } + + /** + * Returns the name of the inventory. + */ + public String getInvName() + { + return "crafters.PatternShaper"; + } + + /** + * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a + * new stack. + */ + public ItemStack decrStackSize(int slot, int number) + { + if (this.inventory[slot] != null) + { + ItemStack stack = this.inventory[slot]; + this.inventory[slot] = null; + if (slot == 1) + decrStackSize(0, 1); + return stack; + } + else + { + return null; + } + } + + /** + * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - + * like when you close a workbench GUI. + */ + public ItemStack getStackInSlotOnClosing(int slot) + { + if (this.inventory[slot] != null) + { + ItemStack stack = this.inventory[slot]; + this.inventory[slot] = null; + return stack; + } + else + { + return null; + } + } + + /** + * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + */ + public void setInventorySlotContents(int slot, ItemStack stack) + { + this.inventory[slot] = stack; + } + + /** + * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't + * this more of a set than a get?* + */ + public int getInventoryStackLimit() + { + return 64; + } + + /** + * Called when an the contents of an Inventory change, usually + */ + public void onInventoryChanged() {} + + /** + * Do not make give this method the name canInteractWith because it clashes with Container + */ + public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) + { + return true; + } + + public void openChest() {} + + public void closeChest() {} +} diff --git a/tinker/tconstruct/client/gui/ToolStationGui.java b/tinker/tconstruct/client/gui/ToolStationGui.java index acb6d2ec..172983fc 100644 --- a/tinker/tconstruct/client/gui/ToolStationGui.java +++ b/tinker/tconstruct/client/gui/ToolStationGui.java @@ -136,8 +136,8 @@ public class ToolStationGui extends GuiContainer */ protected void drawGuiContainerForegroundLayer (int par1, int par2) { - this.fontRenderer.drawString(StatCollector.translateToLocal("crafters.ToolStation"), 6, 6, 4210752); - this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRenderer.drawString(StatCollector.translateToLocal("crafters.ToolStation"), 6, 6, 0x000000); + this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x000000); this.fontRenderer.drawString(toolName + "_", this.xSize / 2 - 5, 8, 0); if (logic.isStackInSlot(0)) diff --git a/tinker/tconstruct/items/Materials.java b/tinker/tconstruct/items/Materials.java index c716b9dc..334cbfb0 100644 --- a/tinker/tconstruct/items/Materials.java +++ b/tinker/tconstruct/items/Materials.java @@ -28,16 +28,16 @@ public class Materials extends Item public String getItemNameIS(ItemStack stack) { - int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 7); + int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 9); return getItemName() + "." +materialNames[arr]; } public void getSubItems(int id, CreativeTabs tab, List list) { - for (int i = 0; i < 7; i++) + for (int i = 0; i < 9; i++) list.add(new ItemStack(id, 1, i)); } public static final String[] materialNames = new String[] { - "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball" }; + "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone" }; } diff --git a/tinker/tconstruct/items/Pattern.java b/tinker/tconstruct/items/Pattern.java index ac062cfc..65746ee4 100644 --- a/tinker/tconstruct/items/Pattern.java +++ b/tinker/tconstruct/items/Pattern.java @@ -39,6 +39,8 @@ public class Pattern extends CraftingItem public ItemStack getContainerItemStack (ItemStack stack) { + if (stack.getItemDamage() == 0) + stack.stackSize--; return stack; } @@ -60,10 +62,10 @@ public class Pattern extends CraftingItem else list.add("Material Cost: "+cost); } - else + /*else { list.add("Temporary: Craft any pattern to get another"); - } + }*/ } //2 for full material, 1 for half. @@ -82,7 +84,7 @@ public class Pattern extends CraftingItem case 9: return 1; case 10: return 2; case 11: return 2; - case 12: return 4; + case 12: return 10; default: return 0; } } diff --git a/tinker/tconstruct/modifiers/ModBlaze.java b/tinker/tconstruct/modifiers/ModBlaze.java new file mode 100644 index 00000000..b62f9f51 --- /dev/null +++ b/tinker/tconstruct/modifiers/ModBlaze.java @@ -0,0 +1,89 @@ +package tinker.tconstruct.modifiers; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class ModBlaze extends ToolMod +{ + String tooltipName; + int increase; + int max; + + public ModBlaze(ItemStack[] items, int effect, int inc) + { + super(items, effect, "Blaze"); + tooltipName = "\u00a76Fiery"; + increase = inc; + max = 25; + } + + @Override + protected boolean canModify (ItemStack tool, ItemStack[] input) + { + + NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey(key)) + return tags.getInteger("Modifiers") > 0; + + int keyPair[] = tags.getIntArray(key); + if (keyPair[0] + increase <= keyPair[1]) + return true; + + + else if (keyPair[0] == keyPair[1]) + return tags.getInteger("Modifiers") > 0; + + else + return false; + } + + @Override + public void modify (ItemStack[] input, ItemStack tool) + { + System.out.println("Moood"); + NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + if (tags.hasKey(key)) + { + int[] keyPair = tags.getIntArray(key); + if (keyPair[0] == max) + { + keyPair[0] += increase; + keyPair[1] += max; + tags.setIntArray(key, keyPair); + + int modifiers = tags.getInteger("Modifiers"); + modifiers -= 1; + tags.setInteger("Modifiers", modifiers); + } + else + { + keyPair[0] += increase; + tags.setIntArray(key, keyPair); + } + updateModTag(tool, keyPair); + } + else + { + int modifiers = tags.getInteger("Modifiers"); + modifiers -= 1; + tags.setInteger("Modifiers", modifiers); + String modName = "\u00a76Blaze ("+increase+"/"+max+")"; + int tooltipIndex = addToolTip(tool, tooltipName, modName); + int[] keyPair = new int[] { increase, max, tooltipIndex }; + tags.setIntArray(key, keyPair); + } + + int fiery = tags.getInteger("Fiery"); + fiery += (increase); + tags.setInteger("Fiery", fiery); + + } + + void updateModTag(ItemStack tool, int[] keys) + { + NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + String tip = "ModifierTip"+keys[2]; + String modName = "\u00a76Blaze ("+keys[0]+"/"+keys[1]+")"; + tags.setString(tip, modName); + } +} diff --git a/tinker/tconstruct/modifiers/ModBoolean.java b/tinker/tconstruct/modifiers/ModBoolean.java index 72f67db4..7f002c30 100644 --- a/tinker/tconstruct/modifiers/ModBoolean.java +++ b/tinker/tconstruct/modifiers/ModBoolean.java @@ -6,13 +6,19 @@ import net.minecraft.nbt.NBTTagCompound; /* Adds a boolean NBTTag */ public class ModBoolean extends ToolMod -{ - public ModBoolean(ItemStack[] items, int effect, String tag) +{ + String color; + String tooltipName; + + public ModBoolean(ItemStack[] items, int effect, String tag, String c, String tip) { super(items, effect, tag); + color = c; + tooltipName = tip; } - protected boolean canModify (ItemStack tool) + @Override + protected boolean canModify (ItemStack tool, ItemStack[] input) { NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist @@ -23,13 +29,13 @@ public class ModBoolean extends ToolMod { NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if (!tags.hasKey(key)) - { - tags.setBoolean(key, true); + tags.setBoolean(key, true); + System.out.println("Key: "+key+" "+tags.getBoolean(key)); - int modifiers = tags.getInteger("Modifiers"); - modifiers -= 1; - tags.setInteger("Modifiers", modifiers); - } + int modifiers = tags.getInteger("Modifiers"); + modifiers -= 1; + tags.setInteger("Modifiers", modifiers); + + addToolTip(tool, color+tooltipName, color+key); } } diff --git a/tinker/tconstruct/modifiers/ModElectric.java b/tinker/tconstruct/modifiers/ModElectric.java index a1c9d6e3..96f3bb8e 100644 --- a/tinker/tconstruct/modifiers/ModElectric.java +++ b/tinker/tconstruct/modifiers/ModElectric.java @@ -14,7 +14,7 @@ public class ModElectric extends ModBoolean public ModElectric() { - super(new ItemStack[0], 9, "Electric"); + super(new ItemStack[0], 9, "Electric", "\u00a7e", ""); } @Override @@ -37,18 +37,18 @@ public class ModElectric extends ModBoolean if (stack.isItemEqual(input[0]) || stack.isItemEqual(input[1])) battery = true; } - return circuit && battery && canModify(tool); + return circuit && battery && canModify(tool, input); } - @Override - protected boolean canModify (ItemStack tool) + /*@Override + protected boolean canModify (ItemStack tool, ItemStack[] input) { NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0; return false; - } + }*/ @Override public void modify (ItemStack[] input, ItemStack tool) diff --git a/tinker/tconstruct/modifiers/ModInteger.java b/tinker/tconstruct/modifiers/ModInteger.java index 7044f277..3dfa8d3b 100644 --- a/tinker/tconstruct/modifiers/ModInteger.java +++ b/tinker/tconstruct/modifiers/ModInteger.java @@ -48,7 +48,6 @@ public class ModInteger extends ToolMod modifiers -= 1; tags.setInteger("Modifiers", modifiers); - System.out.println("tooltip: "+color+key); addToolTip(tool, color+tooltipName, color+key); } diff --git a/tinker/tconstruct/modifiers/ModRedstone.java b/tinker/tconstruct/modifiers/ModRedstone.java index d74ef885..6f3c42d7 100644 --- a/tinker/tconstruct/modifiers/ModRedstone.java +++ b/tinker/tconstruct/modifiers/ModRedstone.java @@ -12,7 +12,7 @@ public class ModRedstone extends ToolMod public ModRedstone(ItemStack[] items, int effect, int inc) { super(items, effect, "Redstone"); - tooltipName = "\u00a74Speed"; + tooltipName = "\u00a74Haste"; increase = inc; max = 25; } diff --git a/tinker/tconstruct/tools/DualHarvestTool.java b/tinker/tconstruct/tools/DualHarvestTool.java index 5fe14be7..71fc1c40 100644 --- a/tinker/tconstruct/tools/DualHarvestTool.java +++ b/tinker/tconstruct/tools/DualHarvestTool.java @@ -3,8 +3,10 @@ package tinker.tconstruct.tools; import tinker.tconstruct.EnumMaterial; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -36,7 +38,31 @@ public abstract class DualHarvestTool extends HarvestTool int shlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getSecondHarvestType()); if (hlvl <= tags.getInteger("HarvestLevel") && shlvl <= tags.getInteger("HarvestLevel2")) + { + if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0) + { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(bID, 1, meta)); + if (result == null) + result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(block.idDropped(bID, random, 0), 1, block.damageDropped(meta))); + if (result != null) + { + System.out.println("Woo~"); + world.setBlockWithNotify(x, y, z, 0); + if (!player.capabilities.isCreativeMode) + onBlockDestroyed(stack, world, bID, x, y, z, player); + if (!world.isRemote) + { + EntityItem entityitem = new EntityItem(world, x+0.5, y+0.5, z+0.5, result.copy()); + + entityitem.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(entityitem); + world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); + } + return true; + } + } return false; + } else { if (!player.capabilities.isCreativeMode) diff --git a/tinker/tconstruct/tools/HarvestTool.java b/tinker/tconstruct/tools/HarvestTool.java index 623b29bc..b708ac89 100644 --- a/tinker/tconstruct/tools/HarvestTool.java +++ b/tinker/tconstruct/tools/HarvestTool.java @@ -1,10 +1,11 @@ package tinker.tconstruct.tools; -import tinker.tconstruct.EnumMaterial; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -30,12 +31,36 @@ public abstract class HarvestTool extends ToolCore int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); if (hlvl <= tags.getInteger("HarvestLevel")) + { + if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0) + { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(bID, 1, meta)); + if (result == null) + result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(block.idDropped(bID, random, 0), 1, block.damageDropped(meta))); + if (result != null) + { + System.out.println("Woo~"); + world.setBlockWithNotify(x, y, z, 0); + if (!player.capabilities.isCreativeMode) + onBlockDestroyed(stack, world, bID, x, y, z, player); + if (!world.isRemote) + { + EntityItem entityitem = new EntityItem(world, x+0.5, y+0.5, z+0.5, result.copy()); + + entityitem.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(entityitem); + world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); + } + return true; + } + } return false; + } else { + world.setBlockWithNotify(x, y, z, 0); if (!player.capabilities.isCreativeMode) onBlockDestroyed(stack, world, bID, x, y, z, player); - world.setBlockWithNotify(x, y, z, 0); if (!world.isRemote) world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); return true; diff --git a/tinker/tconstruct/tools/ToolCore.java b/tinker/tconstruct/tools/ToolCore.java index 59f5d8ed..927cde0e 100644 --- a/tinker/tconstruct/tools/ToolCore.java +++ b/tinker/tconstruct/tools/ToolCore.java @@ -10,12 +10,15 @@ import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; import tinker.tconstruct.AbilityHelper; import tinker.tconstruct.TConstruct; import tinker.tconstruct.TConstructContent; @@ -207,20 +210,24 @@ public abstract class ToolCore extends Item { int head = tags.getCompoundTag("InfiTool").getInteger("Head") + 1; int handle = tags.getCompoundTag("InfiTool").getInteger("Handle") + 1; - int binding = tags.getCompoundTag("InfiTool").getInteger("Binding") + 1; + int binding = tags.getCompoundTag("InfiTool").getInteger("Accessory") + 1; String headName = getAbilityNameForType(head); - if (headName != "") + if (!headName.equals("")) list.add(getColorCodeForType(head) + headName); String handleName = getAbilityNameForType(handle); - if (handleName != "" && handleName != headName) + if (!handleName.equals("") && handle != head) list.add(getColorCodeForType(handle) + handleName); String bindingName = getAbilityNameForType(binding); - if (bindingName != "" && bindingName != headName && bindingName != handleName) + if (!bindingName.equals("") && binding != head && binding != handle) list.add(getColorCodeForType(binding) + bindingName); + String reinforced = getReinforcedName(head, handle, binding); + if (!reinforced.equals("")) + list.add(reinforced); + boolean displayToolTips = true; int tipNum = 0; while (displayToolTips) @@ -275,7 +282,7 @@ public abstract class ToolCore extends Item return colorCode; } - public static String getAbilityNameForType (int type) + public String getAbilityNameForType (int type) { switch (type) { @@ -284,7 +291,7 @@ public abstract class ToolCore extends Item case 2: return "Shoddy"; //Stone case 3: - return "Reinforced I"; //Iron + return ""; //Iron case 4: return "Shoddy"; //Flint case 5: @@ -292,7 +299,7 @@ public abstract class ToolCore extends Item case 6: return ""; //Bone case 7: - return "Reinforced III"; //Obsidian + return ""; //Obsidian case 8: return "Shoddy"; //Netherrack case 9: @@ -300,7 +307,7 @@ public abstract class ToolCore extends Item case 10: return "Writable"; //Paper case 11: - return "Reinforced II"; //Cobalt + return ""; //Cobalt case 12: return ""; //Ardite case 13: @@ -310,6 +317,18 @@ public abstract class ToolCore extends Item } } + //This method is temporary + public static String getReinforcedName(int head, int handle, int accessory) + { + if (head == 7 || handle == 7 || accessory == 7) + return "\u00A7dReinforced III"; + else if (head == 11 || handle == 11 || accessory == 11) + return "\u00A73Reinforced II"; + else if (head == 3 || handle == 3 || accessory == 3) + return "\u00A7fReinforced I"; + return ""; + } + static String[] toolMaterialNames = { "Wooden ", "Stone ", "Iron ", "Flint ", "Cactus ", "Bone ", "Obsidian ", "Nethrrack ", "Slime ", "Paper ", "Cobalt ", "Ardite ", "Manyullyn " }; @@ -352,6 +371,41 @@ public abstract class ToolCore extends Item } /* Tool uses */ + @Override + public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) + { + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + World world = player.worldObj; + int bID = player.worldObj.getBlockId(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + Block block = Block.blocksList[bID]; + + if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0) + { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(bID, 1, meta)); + if (result == null) + result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(block.idDropped(bID, random, 0), 1, block.damageDropped(meta))); + if (result != null) + { + System.out.println("Woo~"); + world.setBlockWithNotify(x, y, z, 0); + if (!player.capabilities.isCreativeMode) + onBlockDestroyed(stack, world, bID, x, y, z, player); + if (!world.isRemote) + { + EntityItem entityitem = new EntityItem(world, x+0.5, y+0.5, z+0.5, result.copy()); + + entityitem.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(entityitem); + world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); + } + return true; + } + } + + return false; + } + @Override public boolean onBlockDestroyed (ItemStack itemstack, World world, int bID, int x, int y, int z, EntityLiving player) {