diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-04-18 05:57:46 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-04-18 05:57:46 -0500 |
| commit | 061df55c4c0f21a5a0c2003a86ecf87462133cde (patch) | |
| tree | b2993f7c525853adec6cfe3bfb0cf4c3e1ceecaa | |
| parent | 3c7ae149edc1b929717ebdbcca4ab6a5b20762cf (diff) | |
Added wrenches and a steve model.
23 files changed, 179 insertions, 14 deletions
diff --git a/Gimp files/Wrenches.xcf b/Gimp files/Wrenches.xcf Binary files differnew file mode 100644 index 0000000..040a576 --- /dev/null +++ b/Gimp files/Wrenches.xcf diff --git a/Techne Models/CrestMount.tcn b/Models/CrestMount.tcn Binary files differindex 77f597a..77f597a 100644 --- a/Techne Models/CrestMount.tcn +++ b/Models/CrestMount.tcn diff --git a/Models/Steve.blend b/Models/Steve.blend Binary files differnew file mode 100644 index 0000000..4dbf954 --- /dev/null +++ b/Models/Steve.blend diff --git a/Models/Steve.blend1 b/Models/Steve.blend1 Binary files differnew file mode 100644 index 0000000..cc06cb7 --- /dev/null +++ b/Models/Steve.blend1 diff --git a/Techne Models/TinkerArmor.tcn b/Models/TinkerArmor.tcn Binary files differindex f967b25..f967b25 100644 --- a/Techne Models/TinkerArmor.tcn +++ b/Models/TinkerArmor.tcn diff --git a/Techne Models/TinkerHelm.tcn b/Models/TinkerHelm.tcn Binary files differindex 4344f18..4344f18 100644 --- a/Techne Models/TinkerHelm.tcn +++ b/Models/TinkerHelm.tcn diff --git a/src/api/java/buildcraft/api/tools/IToolWrench.java b/src/api/java/buildcraft/api/tools/IToolWrench.java new file mode 100644 index 0000000..c5c9d86 --- /dev/null +++ b/src/api/java/buildcraft/api/tools/IToolWrench.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * The BuildCraft API is distributed under the terms of the MIT License. + * Please check the contents of the license, which should be located + * as "LICENSE.API" in the BuildCraft source code distribution. + */ +package buildcraft.api.tools; + +import net.minecraft.entity.player.EntityPlayer; + +/*** + * Implement this interface on subclasses of Item to have that item work as a wrench for buildcraft + */ +public interface IToolWrench { + + /*** + * Called to ensure that the wrench can be used. To get the ItemStack that is used, check player.inventory.getCurrentItem() + * + * @param player + * - The player doing the wrenching + * @param x + * ,y,z - The coordinates for the block being wrenched + * + * @return true if wrenching is allowed, false if not + */ + boolean canWrench(EntityPlayer player, int x, int y, int z); + + /*** + * Callback after the wrench has been used. This can be used to decrease durability or for other purposes. To get the ItemStack that was used, check + * player.inventory.getCurrentItem() + * + * @param player + * - The player doing the wrenching + * @param x + * ,y,z - The coordinates of the block being wrenched + */ + void wrenchUsed(EntityPlayer player, int x, int y, int z); +} diff --git a/src/main/java/gmail/Lance5057/TinkersDefense.java b/src/main/java/gmail/Lance5057/TinkersDefense.java index 7ca5f92..c1f9f01 100644 --- a/src/main/java/gmail/Lance5057/TinkersDefense.java +++ b/src/main/java/gmail/Lance5057/TinkersDefense.java @@ -4,21 +4,21 @@ import static net.minecraft.util.EnumChatFormatting.DARK_RED; import static net.minecraft.util.EnumChatFormatting.GOLD; import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; import gmail.Lance5057.armor.blocks.ArmorAnvil; +import gmail.Lance5057.armor.tools.Item_Cloth; +import gmail.Lance5057.armor.tools.Item_Glowthread; +import gmail.Lance5057.armor.tools.Item_Thread; import gmail.Lance5057.blocks.AeonSteelBlock; import gmail.Lance5057.blocks.CrestMount; import gmail.Lance5057.blocks.DogbeariumBlock; import gmail.Lance5057.blocks.JewelersBench; import gmail.Lance5057.blocks.QueensGoldBlock; import gmail.Lance5057.items.AeonSteelIngot; -import gmail.Lance5057.items.Crest_Feathers; import gmail.Lance5057.items.DogbeariumIngot; -import gmail.Lance5057.items.HeaterShield; -import gmail.Lance5057.items.Item_Cloth; -import gmail.Lance5057.items.Item_Glowthread; -import gmail.Lance5057.items.Item_Thread; import gmail.Lance5057.items.QueensGoldIngot; -import gmail.Lance5057.items.RoundShield; import gmail.Lance5057.items.TD_Patterns; +import gmail.Lance5057.items.tools.HeaterShield; +import gmail.Lance5057.items.tools.RoundShield; +import gmail.Lance5057.items.tools.TinkerWrench; import gmail.Lance5057.liquids.moltenAeonsteelFluid; import gmail.Lance5057.liquids.moltenDogbeariumFluid; import gmail.Lance5057.liquids.moltenQueensGoldFluid; @@ -49,7 +49,6 @@ import tconstruct.library.crafting.Smeltery; import tconstruct.library.crafting.StencilBuilder; import tconstruct.library.tools.DynamicToolPart; import tconstruct.library.tools.ToolCore; -import tconstruct.library.util.IPattern; import tconstruct.smeltery.TinkerSmeltery; import tconstruct.tools.TinkerTools; import tconstruct.tools.items.Pattern; @@ -103,6 +102,7 @@ public static Block moltenDogbeariumBlock; public static ToolCore tool_roundShield; public static ToolCore tool_heaterShield; +public static ToolCore tool_wrench; public static Block block_CrestMount; public static Block block_ArmorAnvil; @@ -258,6 +258,8 @@ public void preInit(FMLPreInitializationEvent e) tool_roundShield = new RoundShield(); tool_heaterShield = new HeaterShield(); + tool_wrench = new TinkerWrench(); + item_Crest_Feathers = new Item() .setCreativeTab(tabName) .setMaxStackSize(1) @@ -278,8 +280,10 @@ public void preInit(FMLPreInitializationEvent e) GameRegistry.registerItem(tool_roundShield, "Round Shield"); GameRegistry.registerItem(tool_heaterShield, "Heater Shield"); + GameRegistry.registerItem(tool_wrench,"Tinker Wrench"); TConstructRegistry.addItemToDirectory("Round Shield", tool_roundShield); TConstructRegistry.addItemToDirectory("Heater Shield", tool_heaterShield); + TConstructRegistry.addItemToDirectory("Tinker Wrench", tool_wrench); GameRegistry.registerItem(item_thread = new Item_Thread(), "thread"); GameRegistry.registerItem(item_glowthread = new Item_Glowthread(), "glowthread"); @@ -380,6 +384,8 @@ public void init(FMLInitializationEvent e) TConstructRegistry.addToolRecipe(tool_heaterShield, TinkerTools.largePlate, TinkerTools.toughRod, TinkerTools.largePlate, TinkerTools.toughBinding); + TConstructRegistry.addToolRecipe(tool_wrench, TinkerTools.handGuard, TinkerTools.toolRod, TinkerTools.binding); + StencilBuilder.registerStencil(50, woodPattern, 0); // rivets StencilBuilder.registerStencil(51, woodPattern, 1); // spike StencilBuilder.registerStencil(52, woodPattern, 2); // armorplate diff --git a/src/main/java/gmail/Lance5057/items/Item_Cloth.java b/src/main/java/gmail/Lance5057/armor/tools/Item_Cloth.java index 945fc9a..d236ac7 100644 --- a/src/main/java/gmail/Lance5057/items/Item_Cloth.java +++ b/src/main/java/gmail/Lance5057/armor/tools/Item_Cloth.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.armor.tools; import gmail.Lance5057.TinkersDefense; diff --git a/src/main/java/gmail/Lance5057/items/Item_Glowthread.java b/src/main/java/gmail/Lance5057/armor/tools/Item_Glowthread.java index 39c5ce4..7fbed32 100644 --- a/src/main/java/gmail/Lance5057/items/Item_Glowthread.java +++ b/src/main/java/gmail/Lance5057/armor/tools/Item_Glowthread.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.armor.tools; import gmail.Lance5057.TinkersDefense; diff --git a/src/main/java/gmail/Lance5057/items/Item_Thread.java b/src/main/java/gmail/Lance5057/armor/tools/Item_Thread.java index 9277974..dda0d14 100644 --- a/src/main/java/gmail/Lance5057/items/Item_Thread.java +++ b/src/main/java/gmail/Lance5057/armor/tools/Item_Thread.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.armor.tools; import gmail.Lance5057.TinkersDefense; diff --git a/src/main/java/gmail/Lance5057/items/HeaterShield.java b/src/main/java/gmail/Lance5057/items/tools/HeaterShield.java index 99cbd77..9d6395e 100644 --- a/src/main/java/gmail/Lance5057/items/HeaterShield.java +++ b/src/main/java/gmail/Lance5057/items/tools/HeaterShield.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.items.tools; import java.util.List; diff --git a/src/main/java/gmail/Lance5057/items/RoundShield.java b/src/main/java/gmail/Lance5057/items/tools/RoundShield.java index da59e6b..17aec1c 100644 --- a/src/main/java/gmail/Lance5057/items/RoundShield.java +++ b/src/main/java/gmail/Lance5057/items/tools/RoundShield.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.items.tools; import java.util.List; import java.util.Random; diff --git a/src/main/java/gmail/Lance5057/items/Shield.java b/src/main/java/gmail/Lance5057/items/tools/Shield.java index 85e6864..479c28c 100644 --- a/src/main/java/gmail/Lance5057/items/Shield.java +++ b/src/main/java/gmail/Lance5057/items/tools/Shield.java @@ -1,4 +1,4 @@ -package gmail.Lance5057.items; +package gmail.Lance5057.items.tools; import tconstruct.library.tools.ToolCore; import cpw.mods.fml.relauncher.*; diff --git a/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java b/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java new file mode 100644 index 0000000..bf541a5 --- /dev/null +++ b/src/main/java/gmail/Lance5057/items/tools/TinkerWrench.java @@ -0,0 +1,118 @@ +package gmail.Lance5057.items.tools; + +import java.util.List; + +import buildcraft.api.tools.IToolWrench; +import mods.battlegear2.api.ISheathed; +import mods.battlegear2.api.shield.IArrowCatcher; +import mods.battlegear2.api.shield.IArrowDisplay; +import mods.battlegear2.api.shield.IShield; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import tconstruct.library.tools.AbilityHelper; +import tconstruct.library.tools.HarvestTool; +import tconstruct.library.tools.Weapon; +import tconstruct.tools.TinkerTools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + + +public class TinkerWrench extends Weapon implements IToolWrench +{ + int induceDamage = 0; + + public TinkerWrench() + { + super(0); + this.setUnlocalizedName("tinkerwrench"); + } + @Override + public Item getHeadItem () + { + return TinkerTools.handGuard; + } + @Override + public Item getHandleItem () + { + return TinkerTools.toolRod; + } + @Override + public Item getAccessoryItem () + { + return TinkerTools.binding; + } + @Override + public int durabilityTypeAccessory () + { + return 2; + } + @Override + public float getRepairCost () + { + return 1.0f; + } + @Override + public float getDurabilityModifier () + { + return 2.5f; + } + @Override + public float getDamageModifier () + { + return 0.4f; + } + @SideOnly(Side.CLIENT) + @Override + public int getPartAmount () + { + return 3; + } + @Override + public String getIconSuffix (int partType) + { + switch (partType) + { + case 0: + return "_wrench_head"; + case 1: + return "_wrench_head_broken"; + case 2: + return "_wrench_handle"; + case 3: + return "_wrench_binding"; + default: + return ""; + } + } + @Override + public String getEffectSuffix () + { + return "_wrench_effect"; + } + @Override + public String getDefaultFolder () + { + return "wrench"; + } + @Override + public boolean canWrench(EntityPlayer player, int x, int y, int z) + { + return true; + } + @Override + public void wrenchUsed(EntityPlayer player, int x, int y, int z) + { + player.swingItem(); + AbilityHelper.damageTool(player.getCurrentEquippedItem(), 1, player, false); + } +}
\ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/proxy/ClientProxy.java b/src/main/java/gmail/Lance5057/proxy/ClientProxy.java index 843ee1c..0c844dc 100644 --- a/src/main/java/gmail/Lance5057/proxy/ClientProxy.java +++ b/src/main/java/gmail/Lance5057/proxy/ClientProxy.java @@ -2,7 +2,7 @@ package gmail.Lance5057.proxy; import gmail.Lance5057.TinkersDefense; import gmail.Lance5057.items.ModelTinkerArmor; -import gmail.Lance5057.items.RoundShield; +import gmail.Lance5057.items.tools.RoundShield; import gmail.Lance5057.models.Renderer_ArmorAnvil; import gmail.Lance5057.models.Renderer_CrestMount; import gmail.Lance5057.models.Renderer_JewelersBench; @@ -25,6 +25,7 @@ public class ClientProxy extends CommonProxy FlexibleToolRenderer renderer = new FlexibleToolRenderer(); MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_roundShield, renderer); MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_heaterShield, renderer); + MinecraftForgeClient.registerItemRenderer(TinkersDefense.tool_wrench, renderer); ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_CrestMount.class, new Renderer_CrestMount()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_ArmorAnvil.class, new Renderer_ArmorAnvil()); diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_face.png b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_face.png Binary files differnew file mode 100644 index 0000000..c8a4aeb --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_face.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_handle.png b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_handle.png Binary files differnew file mode 100644 index 0000000..142d91a --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_handle.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_head.png b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_head.png Binary files differnew file mode 100644 index 0000000..474ed4d --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_head.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_wrench.png b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_wrench.png Binary files differnew file mode 100644 index 0000000..e104f1c --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_battlewrench_wrench.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_wrench_binding.png b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_binding.png Binary files differnew file mode 100644 index 0000000..36f04f5 --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_binding.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_wrench_handle.png b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_handle.png Binary files differnew file mode 100644 index 0000000..c73651f --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_handle.png diff --git a/src/main/resources/assets/tinker/textures/items/wrench/_wrench_head.png b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_head.png Binary files differnew file mode 100644 index 0000000..de99581 --- /dev/null +++ b/src/main/resources/assets/tinker/textures/items/wrench/_wrench_head.png |
