Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Remove Obsidian-Alloy + config #52
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Dec 27, 2014
1 parent 3b1a649 commit fb6da14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Expand Up @@ -65,6 +65,7 @@ public class Config {
public static boolean disableBonusMods;
public static boolean castsBurnMaterial;
public static boolean allowStringBinding;
public static boolean removeObsidianAlloy;

public static boolean easyToolRepair;
public static boolean easyPartCrafting;
Expand Down Expand Up @@ -195,6 +196,8 @@ public void sync()
addFlintRecipe = configfile.getBoolean("addFlintRecipe", CATEGORY_Tweaks, true, "Adds a shapeless recipe to get flint from gravel");
recipeGravelPerFlint = configfile.getInt("gravelPerFlint", CATEGORY_Tweaks, 3, 1, 9, "How many gravel are required to craft one Flint");

removeObsidianAlloy = configfile.getBoolean("removeObsidianAlloy", CATEGORY_Tweaks, true, "Removes the creation of Obsidian in the Smeltery. This is normally used to prevent the early pre-diamond creation of obsidian tools.");

// ticon tweaks
disableStoneTools = configfile.getBoolean("disableStoneTools", CATEGORY_Tweaks, true, "Stone Tools can only be used to create casts, but no tools");
castsBurnMaterial = configfile.getBoolean("castingBurnsMaterial", CATEGORY_Tweaks, true, "Creating a metal cast burns up the material that was used to create it");
Expand Down
Expand Up @@ -169,6 +169,9 @@ public void postInit(FMLPostInitializationEvent event)

if(Config.easyToolBuilding)
GameRegistry.addRecipe(new ToolCraftingRecipe());

if(Config.removeObsidianAlloy)
removeObsidianAlloy();
}

private void flintTweaks()
Expand Down Expand Up @@ -281,4 +284,22 @@ private static void findToolsFromConfig()
}
}
}

private static void removeObsidianAlloy()
{
if(TinkerSmeltery.moltenObsidianFluid == null)
return;

Log.info("Removing Obsidian alloy");

ListIterator<AlloyMix> iter = Smeltery.getAlloyList().listIterator();

while(iter.hasNext())
{
AlloyMix mix = iter.next();
// remove the alloy if the result is obsidian
if(mix.result.getFluid() == TinkerSmeltery.moltenObsidianFluid)
iter.remove();
}
}
}

0 comments on commit fb6da14

Please sign in to comment.