Update modifiers, start travellers gear

This commit is contained in:
mDiyo committed 2014-06-30 22:26:00 -08:00
1 parent 0230307f0a
commit c525493545
96 files changed
+2827 -1573

No files matched your search

@@ -4,6 +4,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import mantle.lib.TabTools;
@@ -16,13 +17,14 @@ import org.apache.logging.log4j.Logger;
import tconstruct.library.crafting.Detailing;
import tconstruct.library.crafting.LiquidCasting;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.modifier.ActiveArmorMod;
import tconstruct.library.tools.ArrowMaterial;
import tconstruct.library.tools.BowMaterial;
import tconstruct.library.tools.BowstringMaterial;
import tconstruct.library.tools.CustomMaterial;
import tconstruct.library.tools.FletchingMaterial;
import tconstruct.library.tools.TToolMaterial;
import tconstruct.library.tools.ToolCore;
import tconstruct.library.tools.ToolMaterial;
/**
* A registry to store any relevant API work
@@ -41,6 +43,7 @@ public class TConstructRegistry
public static TabTools partTab;
public static TabTools materialTab;
public static TabTools blockTab;
public static TabTools equipableTab;
/* Items */
@@ -231,8 +234,8 @@ public class TConstructRegistry
}
// Materials
public static HashMap<Integer, TToolMaterial> toolMaterials = new HashMap<Integer, TToolMaterial>(40);
public static HashMap<String, TToolMaterial> toolMaterialStrings = new HashMap<String, TToolMaterial>(40);
public static HashMap<Integer, ToolMaterial> toolMaterials = new HashMap<Integer, ToolMaterial>(40);
public static HashMap<String, ToolMaterial> toolMaterialStrings = new HashMap<String, ToolMaterial>(40);
/**
* Adds a tool material to the registry
@@ -265,10 +268,10 @@ public class TConstructRegistry
public static void addToolMaterial (int materialID, String materialName, int harvestLevel, int durability, int miningspeed, int attack, float handleModifier, int reinforced, float stonebound,
String style, String ability)
{
TToolMaterial mat = toolMaterials.get(materialID);
ToolMaterial mat = toolMaterials.get(materialID);
if (mat == null)
{
mat = new TToolMaterial(materialName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, style, ability);
mat = new ToolMaterial(materialName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, style, ability);
toolMaterials.put(materialID, mat);
toolMaterialStrings.put(materialName, mat);
}
@@ -309,10 +312,10 @@ public class TConstructRegistry
public static void addToolMaterial (int materialID, String materialName, String displayName, int harvestLevel, int durability, int miningspeed, int attack, float handleModifier, int reinforced,
float stonebound, String style, String ability)
{
TToolMaterial mat = toolMaterials.get(materialID);
ToolMaterial mat = toolMaterials.get(materialID);
if (mat == null)
{
mat = new TToolMaterial(materialName, displayName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, style, ability);
mat = new ToolMaterial(materialName, displayName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, style, ability);
toolMaterials.put(materialID, mat);
toolMaterialStrings.put(materialName, mat);
}
@@ -332,9 +335,9 @@ public class TConstructRegistry
* for lookup purposes.
*/
public static void addtoolMaterial (int materialID, TToolMaterial material)
public static void addtoolMaterial (int materialID, ToolMaterial material)
{
TToolMaterial mat = toolMaterials.get(materialID);
ToolMaterial mat = toolMaterials.get(materialID);
if (mat == null)
{
toolMaterials.put(materialID, mat);
@@ -352,7 +355,7 @@ public class TConstructRegistry
* @return Tool Material
*/
public static TToolMaterial getMaterial (int key)
public static ToolMaterial getMaterial (int key)
{
return (toolMaterials.get(key));
}
@@ -365,7 +368,7 @@ public class TConstructRegistry
* @return Tool Material
*/
public static TToolMaterial getMaterial (String key)
public static ToolMaterial getMaterial (String key)
{
return (toolMaterialStrings.get(key));
}
@@ -545,12 +548,18 @@ public class TConstructRegistry
}
public static ArrayList<ActiveToolMod> activeModifiers = new ArrayList<ActiveToolMod>();
public static LinkedList<ActiveArmorMod> activeArmorModifiers = new LinkedList<ActiveArmorMod>();
public static void registerActiveToolMod (ActiveToolMod mod)
{
activeModifiers.add(mod);
}
public static void registerActiveArmorMod (ActiveArmorMod mod)
{
activeArmorModifiers.add(mod);
}
/**
* Default Material Index 0: Wood 1: Stone 2: Iron 3: Flint 4: Cactus 5:
* Bone 6: Obsidian 7: Netherrack 8: Green Slime 9: Paper 10: Cobalt 11: