Tool recipes explicitly require tool rods
This commit is contained in:
parent
5eccf6a848
commit
3c69f05f19
@ -654,18 +654,18 @@ public class TContent implements IFuelHandler
|
||||
}
|
||||
|
||||
ToolBuilder tb = ToolBuilder.instance;
|
||||
tb.addNormalToolRecipe(pickaxe, pickaxeHead, binding);
|
||||
tb.addNormalToolRecipe(broadsword, swordBlade, wideGuard);
|
||||
tb.addNormalToolRecipe(hatchet, hatchetHead);
|
||||
tb.addNormalToolRecipe(shovel, shovelHead);
|
||||
tb.addNormalToolRecipe(longsword, swordBlade, handGuard);
|
||||
tb.addNormalToolRecipe(rapier, swordBlade, crossbar);
|
||||
tb.addNormalToolRecipe(frypan, frypanHead);
|
||||
tb.addNormalToolRecipe(battlesign, signHead);
|
||||
tb.addNormalToolRecipe(mattock, hatchetHead, shovelHead);
|
||||
tb.addNormalToolRecipe(dagger, knifeBlade, crossbar);
|
||||
tb.addNormalToolRecipe(cutlass, swordBlade, fullGuard);
|
||||
tb.addNormalToolRecipe(chisel, chiselHead);
|
||||
tb.addNormalToolRecipe(pickaxe, pickaxeHead, toolRod, binding);
|
||||
tb.addNormalToolRecipe(broadsword, swordBlade, toolRod, wideGuard);
|
||||
tb.addNormalToolRecipe(hatchet, hatchetHead, toolRod);
|
||||
tb.addNormalToolRecipe(shovel, shovelHead, toolRod);
|
||||
tb.addNormalToolRecipe(longsword, swordBlade, toolRod, handGuard);
|
||||
tb.addNormalToolRecipe(rapier, swordBlade, toolRod, crossbar);
|
||||
tb.addNormalToolRecipe(frypan, frypanHead, toolRod);
|
||||
tb.addNormalToolRecipe(battlesign, signHead, toolRod);
|
||||
tb.addNormalToolRecipe(mattock, hatchetHead, toolRod, shovelHead);
|
||||
tb.addNormalToolRecipe(dagger, knifeBlade, toolRod, crossbar);
|
||||
tb.addNormalToolRecipe(cutlass, swordBlade, toolRod, fullGuard);
|
||||
tb.addNormalToolRecipe(chisel, chiselHead, toolRod);
|
||||
tb.addNormalToolRecipe(scythe, scytheBlade, toughRod, toughBinding, toughRod);
|
||||
tb.addNormalToolRecipe(lumberaxe, broadAxeHead, toughRod, heavyPlate, toughBinding);
|
||||
tb.addNormalToolRecipe(cleaver, largeSwordBlade, toughRod, heavyPlate, toughRod);
|
||||
|
@ -145,7 +145,7 @@ public class TConstructRegistry
|
||||
|
||||
public static ItemStack getPartMapping(int itemID, int metadata, int materialID)
|
||||
{
|
||||
return patternPartMapping.get(Arrays.asList(itemID, metadata, materialID));
|
||||
return patternPartMapping.get(Arrays.asList(itemID, metadata, materialID)).copy();
|
||||
}
|
||||
|
||||
//Tools
|
||||
|
@ -26,33 +26,35 @@ public class ToolBuilder
|
||||
public List<ToolMod> toolMods = new ArrayList<ToolMod>();
|
||||
|
||||
/* Build tools */
|
||||
public static void addNormalToolRecipe (ToolCore output, Item head)
|
||||
public static void addNormalToolRecipe (ToolCore output, Item head, Item handle)
|
||||
{
|
||||
ToolRecipe recipe = instance.recipeList.get(output.getToolName());
|
||||
if (recipe != null)
|
||||
{
|
||||
recipe.addHeadItem(head);
|
||||
recipe.addHandleItem(handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
recipe = new ToolRecipe(head, output);
|
||||
recipe = new ToolRecipe(head, handle, output);
|
||||
instance.combos.add(recipe);
|
||||
instance.recipeList.put(output.getToolName(), recipe);
|
||||
}
|
||||
}
|
||||
|
||||
public static void addNormalToolRecipe (ToolCore output, Item head, Item accessory)
|
||||
public static void addNormalToolRecipe (ToolCore output, Item head, Item handle, Item accessory)
|
||||
{
|
||||
//instance.combos.add(new ToolRecipe(head, accessory, output));
|
||||
ToolRecipe recipe = instance.recipeList.get(output.getToolName());
|
||||
if (recipe != null)
|
||||
{
|
||||
recipe.addHeadItem(head);
|
||||
recipe.addHandleItem(handle);
|
||||
recipe.addAccessoryItem(accessory);
|
||||
}
|
||||
else
|
||||
{
|
||||
recipe = new ToolRecipe(head, accessory, output);
|
||||
recipe = new ToolRecipe(head, handle, accessory, output);
|
||||
instance.combos.add(recipe);
|
||||
instance.recipeList.put(output.getToolName(), recipe);
|
||||
}
|
||||
@ -83,12 +85,10 @@ public class ToolBuilder
|
||||
|
||||
public static void addToolRecipe (ToolCore output, Item... items)
|
||||
{
|
||||
if (items.length == 1)
|
||||
addNormalToolRecipe(output, items[0]);
|
||||
if (items.length == 2)
|
||||
addNormalToolRecipe(output, items[0], items[1]);
|
||||
if (items.length == 3)
|
||||
addToolRecipe(output, items[0], items[1], items[2]);
|
||||
addNormalToolRecipe(output, items[0], items[1], items[2]);
|
||||
if (items.length == 4)
|
||||
addNormalToolRecipe(output, items[0], items[1], items[2], items[3]);
|
||||
}
|
||||
|
@ -18,20 +18,21 @@ public class ToolRecipe
|
||||
LinkedList<Item> accessoryList = new LinkedList<Item>();
|
||||
LinkedList<Item> extraList = new LinkedList<Item>();
|
||||
ToolCore result;
|
||||
Item toolRod = TConstructRegistry.getItem("toolRod");
|
||||
|
||||
public ToolRecipe(Item head, ToolCore tool)
|
||||
/*public ToolRecipe(Item head, ToolCore tool)
|
||||
{
|
||||
this(head, TContent.toolRod, null, null, tool);
|
||||
}
|
||||
}*/
|
||||
|
||||
public ToolRecipe(Item head, Item accessory, ToolCore tool)
|
||||
{
|
||||
this(head, TContent.toolRod, accessory, null, tool);
|
||||
}
|
||||
public ToolRecipe(Item head, Item handle, ToolCore tool)
|
||||
{
|
||||
this(head, handle, null, null, tool);
|
||||
}
|
||||
|
||||
public ToolRecipe(Item head, Item accessory, Item extra, ToolCore tool)
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, ToolCore tool)
|
||||
{
|
||||
this(head, TContent.toolRod, accessory, extra, tool);
|
||||
this(head, handle, accessory, null, tool);
|
||||
}
|
||||
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, Item extra, ToolCore tool)
|
||||
@ -81,7 +82,7 @@ public class ToolRecipe
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (part == TContent.toolRod && (input == Item.stick || input == Item.bone))
|
||||
if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -99,7 +100,7 @@ public class ToolRecipe
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (part == TContent.toolRod && (input == Item.stick || input == Item.bone))
|
||||
if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -117,7 +118,7 @@ public class ToolRecipe
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (part == TContent.toolRod && (input == Item.stick || input == Item.bone))
|
||||
if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user