Doing some code cleanup.

This commit is contained in:
Alexander committed 2014-02-17 00:31:43 -05:00
1 parent 038be9da2a
commit 3d866316a7
199 files changed
+797 -381

No files matched your search

@@ -79,6 +79,43 @@ public class TConstructClientRegistry
tool.registerEffectPath(materialID, icon);
}
public static void registerManualIcon (String name, ItemStack stack)
{
manualIcons.put(name, stack);
}
public static ItemStack getManualIcon (String textContent)
{
ItemStack stack = manualIcons.get(textContent);
if (stack != null)
return stack;
return defaultStack;
}
public static void registerManualSmallRecipe (String name, ItemStack output, ItemStack... stacks)
{
ItemStack[] recipe = new ItemStack[5];
recipe[0] = output;
System.arraycopy(stacks, 0, recipe, 1, 4);
recipeIcons.put(name, recipe);
}
public static void registerManualLargeRecipe (String name, ItemStack output, ItemStack... stacks)
{
ItemStack[] recipe = new ItemStack[10];
recipe[0] = output;
System.arraycopy(stacks, 0, recipe, 1, 9);
recipeIcons.put(name, recipe);
}
public static void registerManualFurnaceRecipe (String name, ItemStack output, ItemStack input)
{
ItemStack[] recipe = new ItemStack[2];
recipe[0] = output;
recipe[1] = input;
recipeIcons.put(name, recipe);
}
public static void registerManualModifier (String name, ItemStack output, ItemStack topinput)
{
registerManualModifier(name, output, topinput, null);
@@ -102,7 +139,12 @@ public class TConstructClientRegistry
recipeIcons.put(name, recipe);
}
// Gui
public static ItemStack[] getRecipeIcons (String recipeName)
{
return recipeIcons.get(recipeName);
}
//Gui
public static void addToolButton (ToolGuiElement element)
{
toolButtons.add(element);