Implemented a few more configs for resource generator
This commit is contained in:
parent
e6d0cc5319
commit
6c93020dea
3 changed files with 471 additions and 464 deletions
|
@ -150,7 +150,7 @@ public class ResonantInduction
|
|||
|
||||
Settings.CONFIGURATION.save();
|
||||
// Generate Resources
|
||||
if (Settings.RESOURCE_GENERATOR)
|
||||
if (ResourceGenerator.ENABLED)
|
||||
ResourceGenerator.generateOreResources();
|
||||
proxy.postInit();
|
||||
}
|
||||
|
|
|
@ -65,8 +65,6 @@ public class Settings
|
|||
public static double LEVITATOR_MAX_SPEED = .2;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Acceleration")
|
||||
public static double LEVITATOR_ACCELERATION = .02;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Enabled Resource Generator")
|
||||
public static boolean RESOURCE_GENERATOR = true;
|
||||
|
||||
public static void setModMetadata(ModMetadata metadata, String id, String name)
|
||||
{
|
||||
|
|
|
@ -57,13 +57,15 @@ public class ResourceGenerator implements IVirtualObject
|
|||
|
||||
@Config(comment = "Allow the Resource Generator to make ore dictionary compatible recipes?")
|
||||
private static boolean allowOreDictCompatibility = true;
|
||||
@Config(category = "Resource_Generator", key = "Enable_All")
|
||||
public static boolean ENABLED = true;
|
||||
@Config(category = "Resource_Generator", key = "Enabled_All_Fluids")
|
||||
public static boolean ENABLE_FLUIDS = true;
|
||||
|
||||
/**
|
||||
* A list of material names. They are all camelCase reference of ore dictionary names without
|
||||
/** A list of material names. They are all camelCase reference of ore dictionary names without
|
||||
* the "ore" or "ingot" prefix.
|
||||
*
|
||||
* Name, ID
|
||||
*/
|
||||
* Name, ID */
|
||||
static int maxID = 0;
|
||||
public static final HashBiMap<String, Integer> materials = HashBiMap.create();
|
||||
|
||||
|
@ -121,7 +123,8 @@ public class ResourceGenerator implements IVirtualObject
|
|||
|
||||
localizedName.replace(LanguageUtility.getLocal("misc.resonantinduction.ingot"), "").replaceAll("^ ", "").replaceAll(" $", "");
|
||||
}
|
||||
|
||||
if (ENABLE_FLUIDS)
|
||||
{
|
||||
/** Generate molten fluids */
|
||||
FluidColored fluidMolten = new FluidColored(materialNameToMolten(materialName));
|
||||
fluidMolten.setDensity(7);
|
||||
|
@ -143,6 +146,16 @@ public class ResourceGenerator implements IVirtualObject
|
|||
ResonantInduction.blockMixtureFluids.put(getID(materialName), blockFluidMixture);
|
||||
FluidContainerRegistry.registerFluidContainer(fluidMixture, ResonantInduction.itemBucketMixture.getStackFromMaterial(materialName));
|
||||
|
||||
if (allowOreDictCompatibility)
|
||||
{
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
else
|
||||
{
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack dust = ResonantInduction.itemDust.getStackFromMaterial(materialName);
|
||||
ItemStack rubble = ResonantInduction.itemRubble.getStackFromMaterial(materialName);
|
||||
ItemStack refinedDust = ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName);
|
||||
|
@ -155,13 +168,11 @@ public class ResourceGenerator implements IVirtualObject
|
|||
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), "rubble" + nameCaps, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), "dust" + nameCaps, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
else
|
||||
{
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), rubble, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), dust, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(dust.itemID, dust.getItemDamage(), OreDictionary.getOres("ingot" + nameCaps).get(0).copy(), 0.7f);
|
||||
|
@ -242,12 +253,10 @@ public class ResourceGenerator implements IVirtualObject
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the average color of this item.
|
||||
/** Gets the average color of this item.
|
||||
*
|
||||
* @param itemStack
|
||||
* @return The RGB hexadecimal color code.
|
||||
*/
|
||||
* @return The RGB hexadecimal color code. */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static int getAverageColor(ItemStack itemStack)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue