diff --git a/resources/assets/tinker/textures/items/arrow/slimeleaf_arrow_fletching.png b/resources/assets/tinker/textures/items/arrow/slimeleaf_arrow_fletching.png new file mode 100644 index 00000000..0246e41a Binary files /dev/null and b/resources/assets/tinker/textures/items/arrow/slimeleaf_arrow_fletching.png differ diff --git a/resources/assets/tinker/textures/items/parts/leaf_fletching.png b/resources/assets/tinker/textures/items/parts/leaf_fletching .png similarity index 100% rename from resources/assets/tinker/textures/items/parts/leaf_fletching.png rename to resources/assets/tinker/textures/items/parts/leaf_fletching .png diff --git a/resources/assets/tinker/textures/items/parts/slimeleaf_fletching.png b/resources/assets/tinker/textures/items/parts/slimeleaf_fletching.png new file mode 100644 index 00000000..726b9c1b Binary files /dev/null and b/resources/assets/tinker/textures/items/parts/slimeleaf_fletching.png differ diff --git a/src/main/java/tconstruct/library/TConstructRegistry.java b/src/main/java/tconstruct/library/TConstructRegistry.java index e6a310d2..967c2809 100644 --- a/src/main/java/tconstruct/library/TConstructRegistry.java +++ b/src/main/java/tconstruct/library/TConstructRegistry.java @@ -446,9 +446,9 @@ public class TConstructRegistry customMaterials.add(mat); } - public static void addFletchingMaterial (int materialID, int value, ItemStack input, ItemStack craftingMaterial, float accuracy, float breakChance, float mass, int color) + public static void addFletchingMaterial (int materialID, int value, ItemStack input, ItemStack craftingMaterial, float accuracy, float breakChance, float mass, float durabilityModifier, int color) { - FletchingMaterial mat = new FletchingMaterial(materialID, value, input, craftingMaterial, accuracy, breakChance, mass, color); + FletchingMaterial mat = new FletchingMaterial(materialID, value, input, craftingMaterial, accuracy, breakChance, mass, durabilityModifier, color); customMaterials.add(mat); } diff --git a/src/main/java/tconstruct/library/tools/FletchingMaterial.java b/src/main/java/tconstruct/library/tools/FletchingMaterial.java index a165150a..ffe76a4d 100644 --- a/src/main/java/tconstruct/library/tools/FletchingMaterial.java +++ b/src/main/java/tconstruct/library/tools/FletchingMaterial.java @@ -7,32 +7,35 @@ public class FletchingMaterial extends CustomMaterial public final float accuracy; public final float breakChance; public final float mass; + public final float durabilityModifier; - public FletchingMaterial(int materialID, int value, ItemStack input, ItemStack craftingItem, float accuracy, float breakChance, float mass, int color) + public FletchingMaterial(int materialID, int value, ItemStack input, ItemStack craftingItem, float accuracy, float breakChance, float mass, float durabilityModifier, int color) { super(materialID, value, input, craftingItem, color); this.accuracy = accuracy; this.breakChance = breakChance; this.mass = mass; + this.durabilityModifier = durabilityModifier; } @Deprecated public FletchingMaterial(int materialID, int value, ItemStack input, ItemStack craftingItem, float accuracy, float breakChance, float mass) { - this(materialID, value, input, craftingItem, accuracy, breakChance, mass, 0xffffffff); + this(materialID, value, input, craftingItem, accuracy, breakChance, mass, 1f, 0xffffffff); } - public FletchingMaterial(int materialID, int value, String oredict, ItemStack craftingItem, float accuracy, float breakChance, float mass, int color) + public FletchingMaterial(int materialID, int value, String oredict, ItemStack craftingItem, float accuracy, float breakChance, float mass, float durabilityModifier, int color) { super(materialID, value, oredict, craftingItem, color); this.accuracy = accuracy; this.breakChance = breakChance; this.mass = mass; + this.durabilityModifier = durabilityModifier; } @Deprecated public FletchingMaterial(int materialID, int value, String oredict, ItemStack craftingItem, float accuracy, float breakChance, float mass) { - this(materialID, value, oredict, craftingItem, accuracy, breakChance, mass, 0xffffffff); + this(materialID, value, oredict, craftingItem, accuracy, breakChance, mass, 1f, 0xffffffff); } } diff --git a/src/main/java/tconstruct/library/tools/FletchlingLeafMaterial.java b/src/main/java/tconstruct/library/tools/FletchlingLeafMaterial.java index fff76f0c..ae574405 100644 --- a/src/main/java/tconstruct/library/tools/FletchlingLeafMaterial.java +++ b/src/main/java/tconstruct/library/tools/FletchlingLeafMaterial.java @@ -8,7 +8,7 @@ public class FletchlingLeafMaterial extends FletchingMaterial { public FletchlingLeafMaterial(int materialID, int value, String oredict, ItemStack craftingItem, float accuracy, float breakChance, float mass) { - super(materialID, value, oredict, craftingItem, accuracy, breakChance, mass, 0x5ece46); + super(materialID, value, oredict, craftingItem, accuracy, breakChance, mass, 1.6f, 0x5ece46); } @Override diff --git a/src/main/java/tconstruct/tools/items/Fletching.java b/src/main/java/tconstruct/tools/items/Fletching.java index c063f27f..0704f331 100644 --- a/src/main/java/tconstruct/tools/items/Fletching.java +++ b/src/main/java/tconstruct/tools/items/Fletching.java @@ -27,9 +27,9 @@ public class Fletching extends CraftingItem implements IToolPart return names; } - public static final String[] toolMaterialNames = new String[] { "feather", "leaf", "slime", "blueslime" }; + public static final String[] toolMaterialNames = new String[] { "feather", "leaf", "slime", "blueslime", "slimeleaf" }; - public static final String[] toolTextureNames = new String[] { "feather", "leaf", "slime", "blueslime" }; + public static final String[] toolTextureNames = new String[] { "feather", "leaf", "slime", "blueslime", "slimeleaf" }; @Override public int getMaterialID (ItemStack stack) diff --git a/src/main/java/tconstruct/weaponry/TinkerWeaponry.java b/src/main/java/tconstruct/weaponry/TinkerWeaponry.java index aa4876f1..95a2fbf9 100644 --- a/src/main/java/tconstruct/weaponry/TinkerWeaponry.java +++ b/src/main/java/tconstruct/weaponry/TinkerWeaponry.java @@ -37,6 +37,7 @@ import tconstruct.library.weaponry.AmmoWeapon; import tconstruct.library.weaponry.ArrowShaftMaterial; import tconstruct.library.weaponry.ProjectileWeapon; import tconstruct.weaponry.weapons.*; +import tconstruct.world.TinkerWorld; import java.util.Map; import java.util.Random; @@ -263,10 +264,11 @@ public class TinkerWeaponry { TConstructRegistry.addCustomMaterial(ArrowShaftMaterial.createMaterial(1, TinkerTools.toolRod, MaterialID.Bone, 0.95f, 1.2f, 0.01f, 0xede6bf)); // bone: heavier, but durable // Arrow Fletching Materials - TConstructRegistry.addFletchingMaterial(0, 2, new ItemStack(Items.feather), new ItemStack(TinkerWeaponry.fletching, 1, 0), 100F, 0F, 0.05F, 0xffffff); // Feather + TConstructRegistry.addFletchingMaterial(0, 2, new ItemStack(Items.feather), new ItemStack(TinkerWeaponry.fletching, 1, 0), 95F, 0F, 0.05F, 1f, 0xffffff); // Feather TConstructRegistry.addCustomMaterial(new FletchlingLeafMaterial(1, 2, "treeLeaves", new ItemStack(TinkerWeaponry.fletching, 1, 1), 75F, 0F, 0.2F)); // all vanilla and oredicted leaves. and all leaves in general. - TConstructRegistry.addFletchingMaterial(2, 2, new ItemStack(TinkerTools.materials, 1, 1), new ItemStack(TinkerWeaponry.fletching, 1, 2), 100F, 0F, 0.12F, 0x82c873); // Slime - TConstructRegistry.addFletchingMaterial(3, 2, new ItemStack(TinkerTools.materials, 1, 17), new ItemStack(TinkerWeaponry.fletching, 1, 3), 100F, 0F, 0.12F, 0x74c8c7); // BlueSlime + TConstructRegistry.addFletchingMaterial(2, 2, new ItemStack(TinkerTools.materials, 1, 1), new ItemStack(TinkerWeaponry.fletching, 1, 2), 100F, 0F, 0.12F, 0.95f, 0x82c873); // Slime + TConstructRegistry.addFletchingMaterial(3, 2, new ItemStack(TinkerTools.materials, 1, 17), new ItemStack(TinkerWeaponry.fletching, 1, 3), 100F, 0F, 0.12F, 0.95f, 0x74c8c7); // BlueSlime + TConstructRegistry.addFletchingMaterial(4, 2, new ItemStack(TinkerWorld.slimeLeaves, 1, 0), new ItemStack(TinkerWeaponry.fletching, 1, 4), 98F, 0.03F, 0.08F, 1.2f, 0x74e8c7); // Slime leaves // Bowstring Materials TConstructRegistry.addBowstringMaterial(0, 2, new ItemStack(Items.string), new ItemStack(TinkerWeaponry.bowstring, 1, 0), 1F, 1F, 1f, 0xeeeeee); // String diff --git a/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java b/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java index 96300393..1dbb63fe 100644 --- a/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java +++ b/src/main/java/tconstruct/weaponry/WeaponryClientProxy.java @@ -69,11 +69,11 @@ public class WeaponryClientProxy extends WeaponryCommonProxy { ToolCore arrow = TinkerWeaponry.arrowAmmo; String pre = Reference.resource(arrow.getDefaultFolder()) + "/"; - String[] shaft = {"wood", "bone", "blaze", "reed"}; - String[] fletching = { "feather", "leaf", "slime", "blueslime" }; + String[] shaft = {"wood", "bone", "blaze", "reed", null}; + String[] fletching = { "feather", "leaf", "slime", "blueslime", "slimeleaf" }; // we register different textures for the different parts per index - for(int i = 0; i < 4; i++) { + for(int i = 0; i < 5; i++) { String handletex = pre + shaft[i] + arrow.getIconSuffix(2); String acctex = pre + fletching[i] + arrow.getIconSuffix(3); arrow.registerAlternatePartPaths(i, new String[]{null, null, handletex, acctex}); @@ -82,7 +82,7 @@ public class WeaponryClientProxy extends WeaponryCommonProxy { // for bolts too pre = Reference.resource(TinkerWeaponry.boltAmmo.getDefaultFolder()) + "/"; - for(int i = 0; i < 4; i++) { + for(int i = 0; i < 5; i++) { String acctex = pre + fletching[i] + TinkerWeaponry.boltAmmo.getIconSuffix(3); TinkerWeaponry.boltAmmo.registerAlternatePartPaths(i, new String[]{null, null, null, acctex}); }