diff --git a/resources/assets/tinker/textures/gui/icons.png b/resources/assets/tinker/textures/gui/icons.png index 0ac16916dde..c0a0a8e415f 100644 Binary files a/resources/assets/tinker/textures/gui/icons.png and b/resources/assets/tinker/textures/gui/icons.png differ diff --git a/resources/assets/tinker/textures/items/parts/iron_shuriken.png b/resources/assets/tinker/textures/items/parts/iron_shuriken.png deleted file mode 100644 index fd987cc31d4..00000000000 Binary files a/resources/assets/tinker/textures/items/parts/iron_shuriken.png and /dev/null differ diff --git a/resources/assets/tinker/textures/items/shuriken/iron_shuriken.png b/resources/assets/tinker/textures/items/shuriken/iron_shuriken.png deleted file mode 100644 index e2ac4b08aeb..00000000000 Binary files a/resources/assets/tinker/textures/items/shuriken/iron_shuriken.png and /dev/null differ diff --git a/resources/assets/tinker/textures/items/throwingknife/iron_knife_blade.png b/resources/assets/tinker/textures/items/throwingknife/iron_knife_blade.png deleted file mode 100644 index 76da8a1076e..00000000000 Binary files a/resources/assets/tinker/textures/items/throwingknife/iron_knife_blade.png and /dev/null differ diff --git a/resources/assets/tinker/textures/items/throwingknife/iron_knife_handle.png b/resources/assets/tinker/textures/items/throwingknife/iron_knife_handle.png deleted file mode 100644 index fc158163f33..00000000000 Binary files a/resources/assets/tinker/textures/items/throwingknife/iron_knife_handle.png and /dev/null differ diff --git a/src/main/java/tconstruct/client/AmmoItemRenderer.java b/src/main/java/tconstruct/client/AmmoItemRenderer.java index 13d048c6733..6570a85cdd7 100644 --- a/src/main/java/tconstruct/client/AmmoItemRenderer.java +++ b/src/main/java/tconstruct/client/AmmoItemRenderer.java @@ -48,7 +48,7 @@ public void renderAmmoCount(ItemStack item) GL11.glScalef(0.7f, 0.7f, 0.7f); FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; - fontRenderer.drawStringWithShadow(str, 7 + 19 - 2 - fontRenderer.getStringWidth(str), 7 + 6 + 3, 16777215); + //fontRenderer.drawStringWithShadow(str, 7 + 19 - 2 - fontRenderer.getStringWidth(str), 7 + 6 + 3, 16777215); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); diff --git a/src/main/java/tconstruct/tools/TinkerTools.java b/src/main/java/tconstruct/tools/TinkerTools.java index f6cd1a710c2..fe6ceba3447 100644 --- a/src/main/java/tconstruct/tools/TinkerTools.java +++ b/src/main/java/tconstruct/tools/TinkerTools.java @@ -212,6 +212,8 @@ public void preInit (FMLPreInitializationEvent event) TinkerTools.hammer = new Hammer(); TinkerTools.battleaxe = new Battleaxe(); + TinkerTools.arrow = new Arrow(); // to prevent nullpointers + Item[] tools = { TinkerTools.pickaxe, TinkerTools.shovel, TinkerTools.hatchet, TinkerTools.broadsword, TinkerTools.longsword, TinkerTools.rapier, TinkerTools.dagger, TinkerTools.cutlass, TinkerTools.frypan, TinkerTools.battlesign, TinkerTools.mattock, TinkerTools.chisel, TinkerTools.lumberaxe, TinkerTools.cleaver, TinkerTools.scythe, TinkerTools.excavator, TinkerTools.hammer, TinkerTools.battleaxe}; String[] toolStrings = { "pickaxe", "shovel", "hatchet", "broadsword", "longsword", "rapier", "dagger", "cutlass", "frypan", "battlesign", "mattock", "chisel", "lumberaxe", "cleaver", "scythe", "excavator", "hammer", "battleaxe"}; diff --git a/src/main/java/tconstruct/tools/ToolProxyClient.java b/src/main/java/tconstruct/tools/ToolProxyClient.java index 066888c6484..33650f37075 100644 --- a/src/main/java/tconstruct/tools/ToolProxyClient.java +++ b/src/main/java/tconstruct/tools/ToolProxyClient.java @@ -427,9 +427,6 @@ void addToolButtons () addToolButton(itemIconsT1[i][0], itemIconsT1[i][1], itemIconsT1[i][2], iconCoordsT1[i * 2], iconCoordsT1[i * 2 + 1], tier1Tools[i].getLocalizedToolName(), locString); } - addToolButton(3, 9, 1, new int[] { 0, 10, 0, 13 }, new int[] { 3, 3, 3, 13 }, TinkerTools.shortbow.getLocalizedToolName(), "gui.toolstation.chisel.desc"); - addToolButton(7, 10, 1, new int[] { 11, 0, 12, 13 }, new int[] { 3, 3, 3, 13 }, TinkerTools.arrow.getLocalizedToolName(), "gui.toolstation.arrow.desc"); - // tier 2 tools for (int i = 0; i < tier2Tools.length; i++) { diff --git a/src/main/java/tconstruct/tools/gui/ToolForgeGui.java b/src/main/java/tconstruct/tools/gui/ToolForgeGui.java index 0891860b7ef..46dd352fb85 100644 --- a/src/main/java/tconstruct/tools/gui/ToolForgeGui.java +++ b/src/main/java/tconstruct/tools/gui/ToolForgeGui.java @@ -117,6 +117,14 @@ void setSlotType (int type) slotX = new int[] { 56, 56, 56, 14 }; // Three parts reverse slotY = new int[] { 19, 37, 55, 37 }; break; + case 8: + slotX = new int[] { 20, 38, 56, 38 }; // Double head middle + slotY = new int[] { 28, 46, 28, 28 }; + break; + case 9: + slotX = new int[] { 38, 56, 47, 47 }; // Four parts, crossbow. + slotY = new int[] { 37, 37, 55, 19 }; + break; } toolSlots.resetSlots(slotX, slotY); } diff --git a/src/main/java/tconstruct/weaponry/TinkerWeaponry.java b/src/main/java/tconstruct/weaponry/TinkerWeaponry.java index 2aae3e6503e..80a901dc17e 100644 --- a/src/main/java/tconstruct/weaponry/TinkerWeaponry.java +++ b/src/main/java/tconstruct/weaponry/TinkerWeaponry.java @@ -133,7 +133,7 @@ private void registerItems() throwingknife = new ThrowingKnife(); javelin = new Javelin(); // create projectile weapons - shortbow = new ShortBow(); + TinkerTools.shortbow = shortbow = new ShortBow(); longbow = new LongBow(); crossbow = new Crossbow(); // create ammo @@ -144,7 +144,7 @@ private void registerItems() metalPattern = new WeaponryPattern("cast_", "Cast"); // register tool parts - GameRegistry.registerItem(bowstring, "bowstring"); // 1.8 todo: rename properly + GameRegistry.registerItem(bowstring, "bowstring"); // 1.8 todo: rename properly? GameRegistry.registerItem(arrowhead, "arrowhead"); GameRegistry.registerItem(fletching, "fletching"); GameRegistry.registerItem(partShuriken, "ShurikenPart"); diff --git a/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java b/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java index 5c3b813ff85..0710a82a48d 100644 --- a/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java +++ b/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java @@ -21,6 +21,8 @@ import tconstruct.library.tools.ToolCore; import tconstruct.tools.TinkerTools; +import static tconstruct.weaponry.TinkerWeaponry.*; + public class WeaponryClientProxy extends WeaponryCommonProxy { public static AmmoItemRenderer renderer; @@ -98,17 +100,63 @@ private void registerMaterialRendering() private void buttons() { - TConstructClientRegistry.addStencilButton2(11, 3, 21, Reference.RESOURCE, "textures/gui/icons.png"); // arrow head - TConstructClientRegistry.addStencilButton2(12, 3, 22, Reference.RESOURCE, "textures/gui/icons.png"); // fletchling + final String tex = "textures/gui/icons.png"; + + // Stencil Table + TConstructClientRegistry.addStencilButton2(11, 3, 21, Reference.RESOURCE, tex); // arrow head + TConstructClientRegistry.addStencilButton2(12, 3, 22, Reference.RESOURCE, tex); // fletchling TConstructClientRegistry.addStencilButton2(0,0, -1, null, null); TConstructClientRegistry.addStencilButton2(0,0, -1, null, null); - TConstructClientRegistry.addStencilButton2(3, 4, 27, Reference.RESOURCE, "textures/gui/icons.png"); // bow limb - TConstructClientRegistry.addStencilButton2(10, 3, 23, Reference.RESOURCE, "textures/gui/icons.png"); // bowstring - TConstructClientRegistry.addStencilButton2(1, 4, 25, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow limb - TConstructClientRegistry.addStencilButton2(2, 4, 26, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow body + TConstructClientRegistry.addStencilButton2(3, 4, 27, Reference.RESOURCE, tex); // bow limb + TConstructClientRegistry.addStencilButton2(10, 3, 23, Reference.RESOURCE, tex); // bowstring + TConstructClientRegistry.addStencilButton2(1, 4, 25, Reference.RESOURCE, tex); // crossbow limb + TConstructClientRegistry.addStencilButton2(2, 4, 26, Reference.RESOURCE, tex); // crossbow body - TConstructClientRegistry.addStencilButton2(0, 4, 24, Reference.RESOURCE, "textures/gui/icons.png"); // shuriken + TConstructClientRegistry.addStencilButton2(0, 4, 24, Reference.RESOURCE, tex); // shuriken //TConstructClientRegistry.addStencilButton2(4, 4, index, Reference.RESOURCE, "textures/gui/icons.png"); // bolt + + + // Tool Station + ToolCore[] tools = {shortbow, arrowAmmo, throwingknife, javelin}; + int[][] icons = { + new int[] {3, 9, 1}, // shortbow + new int[] {7, 10, 1}, // arrow + new int[] {2, 1, 5}, // throwingknife + new int[] {1, 2, 5} // javelin + }; + int[][] coords = { + new int[] { 3, 10, 3, 13 }, new int[] { 4, 3, 4, 13 }, // shortbow + new int[] { 11, 0, 12, 13 }, new int[] { 3, 3, 3, 13 }, // arrow + new int[] { 7, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // throwingknife + new int[] { 11, 8, 8, 13 }, new int[] { 3, 3, 3, 13 } // javelin + }; + + for (int i = 0; i < tools.length; i++) + { + String locString = String.format("gui.toolstation.%s.desc", tools[i].getToolName().toLowerCase()); + TConstructClientRegistry.addToolButton(icons[i][0], icons[i][1], icons[i][2], coords[i*2], coords[i*2+1], tools[i].getLocalizedToolName(), locString, Reference.RESOURCE, tex); + } + + // Tool Forge + tools = new ToolCore[] {longbow, crossbow, boltAmmo, shuriken}; + icons = new int[][] { + new int[] {8, 11, 1}, // longbow + new int[] {9, 12, 1}, // crossbow + new int[] {2, 13, 1}, // bolt + new int[] {4, 0, 5} // shuriken + }; + coords = new int[][] { + new int[] { 3, 10, 3, 9 }, new int[] { 4, 3, 4, 2 }, // longbow + new int[] { 1, 2, 10, 9 }, new int[] { 4, 4, 3, 3 }, // crossbow + new int[] { 4, 12, 13, 13 }, new int[] { 4, 3, 13, 13 }, // bolt + new int[] { 0, 0, 0, 0 }, new int[] { 4, 4, 4, 4 } // shuriken + }; + + for (int i = 0; i < tools.length; i++) + { + String locString = String.format("gui.toolstation.%s.desc", tools[i].getToolName().toLowerCase()); + TConstructClientRegistry.addTierTwoButton(icons[i][0], icons[i][1], icons[i][2], coords[i*2], coords[i*2+1], tools[i].getLocalizedToolName(), locString, Reference.RESOURCE, tex); + } } }