mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +00:00
Spontanously added slimeleaf fletchling
This commit is contained in:
1 parent
e7666e031b
commit
26181dd916
9 files changed
+21
-16
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user