mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
some untested garbage
This commit is contained in:
parent
2ca8d32341
commit
a724ee53c8
@ -50,6 +50,7 @@ public class GeneralConfig {
|
|||||||
public static boolean enableLBSMSimpleCrafting = true;
|
public static boolean enableLBSMSimpleCrafting = true;
|
||||||
public static boolean enableLBSMSimpleMedicineRecipes = true;
|
public static boolean enableLBSMSimpleMedicineRecipes = true;
|
||||||
public static boolean enableLBSMSafeMEDrives = true;
|
public static boolean enableLBSMSafeMEDrives = true;
|
||||||
|
public static boolean enableLBSMIGen = true;
|
||||||
public static int schrabRate = 20;
|
public static int schrabRate = 20;
|
||||||
|
|
||||||
public static void loadFromConfig(Configuration config) {
|
public static void loadFromConfig(Configuration config) {
|
||||||
@ -116,6 +117,7 @@ public class GeneralConfig {
|
|||||||
enableLBSMSimpleCrafting = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleCrafting", "When enabled, some uncraftable or more expansive items get simple crafting recipes. Scorched uranium also becomes washable", true);
|
enableLBSMSimpleCrafting = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleCrafting", "When enabled, some uncraftable or more expansive items get simple crafting recipes. Scorched uranium also becomes washable", true);
|
||||||
enableLBSMSimpleMedicineRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleMedicine", "When enabled, makes some medicine recipes (line ones that require bismuth) much more affordable", true);
|
enableLBSMSimpleMedicineRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleMedicine", "When enabled, makes some medicine recipes (line ones that require bismuth) much more affordable", true);
|
||||||
enableLBSMSafeMEDrives = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_safeMEDrives", "When enabled, prevents ME Drives and Portable Cells from becoming radioactive", true);
|
enableLBSMSafeMEDrives = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_safeMEDrives", "When enabled, prevents ME Drives and Portable Cells from becoming radioactive", true);
|
||||||
|
enableLBSMIGen = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_iGen", "When enabled, restores the industrial generator to pre-nerf power", true);
|
||||||
schrabRate = CommonConfig.createConfigInt(config, CATEGORY_LBSM, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20);
|
schrabRate = CommonConfig.createConfigInt(config, CATEGORY_LBSM, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20);
|
||||||
|
|
||||||
if(enable528) enableLBSM = false;
|
if(enable528) enableLBSM = false;
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
package com.hbm.inventory.recipes;
|
package com.hbm.inventory.recipes;
|
||||||
|
|
||||||
import static com.hbm.inventory.OreDictManager.*;
|
import static com.hbm.inventory.OreDictManager.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.inventory.FluidStack;
|
import com.hbm.inventory.FluidStack;
|
||||||
|
import com.hbm.inventory.RecipesCommon.AStack;
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
|
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemFluidIcon;
|
import com.hbm.items.machine.ItemFluidIcon;
|
||||||
|
|
||||||
@ -17,11 +23,12 @@ import net.minecraft.init.Items;
|
|||||||
import net.minecraft.item.ItemFood;
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class LiquefactionRecipes {
|
public class LiquefactionRecipes extends SerializableRecipe {
|
||||||
|
|
||||||
private static HashMap<Object, FluidStack> recipes = new HashMap();
|
private static HashMap<Object, FluidStack> recipes = new HashMap();
|
||||||
|
|
||||||
public static void register() {
|
@Override
|
||||||
|
public void registerDefaults() {
|
||||||
|
|
||||||
//oil processing
|
//oil processing
|
||||||
recipes.put(COAL.gem(), new FluidStack(100, Fluids.COALOIL));
|
recipes.put(COAL.gem(), new FluidStack(100, Fluids.COALOIL));
|
||||||
@ -95,4 +102,53 @@ public class LiquefactionRecipes {
|
|||||||
|
|
||||||
return recipes;
|
return recipes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFileName() {
|
||||||
|
return "hbmLiquefactor.json";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getComment() {
|
||||||
|
return "As with most handlers, stacksizes for the inputs are ignored and default to 1.";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getRecipeObject() {
|
||||||
|
return recipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRecipes() {
|
||||||
|
recipes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readRecipe(JsonElement recipe) {
|
||||||
|
JsonObject obj = (JsonObject) recipe;
|
||||||
|
AStack in = this.readAStack(obj.get("input").getAsJsonArray());
|
||||||
|
FluidStack out = this.readFluidStack(obj.get("output").getAsJsonArray());
|
||||||
|
|
||||||
|
if(in instanceof ComparableStack) {
|
||||||
|
recipes.put(((ComparableStack) in).makeSingular(), out);
|
||||||
|
} else if(in instanceof OreDictStack) {
|
||||||
|
recipes.put(((OreDictStack) in).name, out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||||
|
Entry<Object, FluidStack> rec = (Entry<Object, FluidStack>) recipe;
|
||||||
|
Object key = rec.getKey();
|
||||||
|
|
||||||
|
writer.name("input");
|
||||||
|
if(key instanceof String) {
|
||||||
|
this.writeAStack(new OreDictStack((String) key), writer);
|
||||||
|
} else if(key instanceof ComparableStack) {
|
||||||
|
this.writeAStack((ComparableStack) key, writer);
|
||||||
|
}
|
||||||
|
|
||||||
|
writer.name("output");
|
||||||
|
this.writeFluidStack(rec.getValue(), writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,17 @@ package com.hbm.inventory.recipes;
|
|||||||
|
|
||||||
import static com.hbm.inventory.fluid.Fluids.*;
|
import static com.hbm.inventory.fluid.Fluids.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.hbm.inventory.FluidStack;
|
||||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||||
import com.hbm.items.ItemEnums.EnumTarType;
|
import com.hbm.items.ItemEnums.EnumTarType;
|
||||||
import com.hbm.items.machine.ItemFluidIcon;
|
import com.hbm.items.machine.ItemFluidIcon;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
@ -18,7 +24,7 @@ import net.minecraft.init.Items;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class SolidificationRecipes {
|
public class SolidificationRecipes extends SerializableRecipe {
|
||||||
|
|
||||||
public static final int SF_OIL = 200;
|
public static final int SF_OIL = 200;
|
||||||
public static final int SF_CRACK = 200;
|
public static final int SF_CRACK = 200;
|
||||||
@ -47,8 +53,9 @@ public class SolidificationRecipes {
|
|||||||
//on that note, add more leaded variants
|
//on that note, add more leaded variants
|
||||||
|
|
||||||
private static HashMap<FluidType, Pair<Integer, ItemStack>> recipes = new HashMap();
|
private static HashMap<FluidType, Pair<Integer, ItemStack>> recipes = new HashMap();
|
||||||
|
|
||||||
public static void register() {
|
@Override
|
||||||
|
public void registerDefaults() {
|
||||||
|
|
||||||
registerRecipe(WATER, 1000, Blocks.ice);
|
registerRecipe(WATER, 1000, Blocks.ice);
|
||||||
registerRecipe(LAVA, 1000, Blocks.obsidian);
|
registerRecipe(LAVA, 1000, Blocks.obsidian);
|
||||||
@ -110,4 +117,37 @@ public class SolidificationRecipes {
|
|||||||
|
|
||||||
return recipes;
|
return recipes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFileName() {
|
||||||
|
return "hbmSolidifier.json";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getRecipeObject() {
|
||||||
|
return recipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRecipes() {
|
||||||
|
recipes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readRecipe(JsonElement recipe) {
|
||||||
|
JsonObject obj = (JsonObject) recipe;
|
||||||
|
FluidStack in = this.readFluidStack(obj.get("input").getAsJsonArray());
|
||||||
|
ItemStack out = this.readItemStack(obj.get("output").getAsJsonArray());
|
||||||
|
recipes.put(in.type, new Pair(in.fill, out));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||||
|
Entry<FluidType, Pair<Integer, ItemStack>> rec = (Entry<FluidType, Pair<Integer, ItemStack>>) recipe;
|
||||||
|
FluidStack in = new FluidStack(rec.getKey(), rec.getValue().getKey());
|
||||||
|
writer.name("input");
|
||||||
|
this.writeFluidStack(in, writer);
|
||||||
|
writer.name("output");
|
||||||
|
this.writeItemStack(rec.getValue().getValue(), writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,6 +43,8 @@ public abstract class SerializableRecipe {
|
|||||||
recipeHandlers.add(new ChemplantRecipes());
|
recipeHandlers.add(new ChemplantRecipes());
|
||||||
recipeHandlers.add(new CrucibleRecipes());
|
recipeHandlers.add(new CrucibleRecipes());
|
||||||
recipeHandlers.add(new CentrifugeRecipes());
|
recipeHandlers.add(new CentrifugeRecipes());
|
||||||
|
recipeHandlers.add(new LiquefactionRecipes());
|
||||||
|
recipeHandlers.add(new SolidificationRecipes());
|
||||||
recipeHandlers.add(new CyclotronRecipes());
|
recipeHandlers.add(new CyclotronRecipes());
|
||||||
recipeHandlers.add(new HadronRecipes());
|
recipeHandlers.add(new HadronRecipes());
|
||||||
recipeHandlers.add(new FuelPoolRecipes());
|
recipeHandlers.add(new FuelPoolRecipes());
|
||||||
|
|||||||
@ -781,8 +781,6 @@ public class MainRegistry {
|
|||||||
RefineryRecipes.registerCracking();
|
RefineryRecipes.registerCracking();
|
||||||
RadiolysisRecipes.registerRadiolysis();
|
RadiolysisRecipes.registerRadiolysis();
|
||||||
GasCentrifugeRecipes.register();
|
GasCentrifugeRecipes.register();
|
||||||
LiquefactionRecipes.register();
|
|
||||||
SolidificationRecipes.register();
|
|
||||||
|
|
||||||
//the good stuff
|
//the good stuff
|
||||||
SerializableRecipe.registerAllHandlers();
|
SerializableRecipe.registerAllHandlers();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
@ -18,7 +19,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityFurnace;
|
import net.minecraft.tileentity.TileEntityFurnace;
|
||||||
@ -69,6 +69,8 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
boolean con = GeneralConfig.enableLBSM && GeneralConfig.enableLBSMIGen;
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
||||||
|
|
||||||
for(DirPos dir : getConPos()) {
|
for(DirPos dir : getConPos()) {
|
||||||
@ -88,7 +90,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
/// LIQUID FUEL ///
|
/// LIQUID FUEL ///
|
||||||
if(tanks[1].getFill() > 0) {
|
if(tanks[1].getFill() > 0) {
|
||||||
int pow = this.getPowerFromFuel();
|
int pow = this.getPowerFromFuel(con);
|
||||||
|
|
||||||
if(pow > 0) {
|
if(pow > 0) {
|
||||||
tanks[1].setFill(tanks[1].getFill() - 1);
|
tanks[1].setFill(tanks[1].getFill() - 1);
|
||||||
@ -102,7 +104,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
// POWER GEN //
|
// POWER GEN //
|
||||||
if(burn[i] > 0) {
|
if(burn[i] > 0) {
|
||||||
burn[i]--;
|
burn[i]--;
|
||||||
this.spin += coalGenRate;
|
this.spin += con ? coalConRate : coalGenRate;
|
||||||
|
|
||||||
// REFUELING //
|
// REFUELING //
|
||||||
} else {
|
} else {
|
||||||
@ -115,13 +117,13 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
if(burnTime > 0) {
|
if(burnTime > 0) {
|
||||||
|
|
||||||
if(fuel.getItem() == Items.coal) //1200 (1600)
|
if(fuel.getItem() == Items.coal) //1200 (1600)
|
||||||
burnTime *= 1.5;
|
burnTime *= con ? 1.5 : 1.1;
|
||||||
if(fuel.getItem() == ModItems.solid_fuel) //3200 (3200)
|
if(fuel.getItem() == ModItems.solid_fuel) //3200 (3200)
|
||||||
burnTime *= 2;
|
burnTime *= con ? 2 : 1.1;
|
||||||
if(fuel.getItem() == ModItems.solid_fuel_presto) //16000 (8000)
|
if(fuel.getItem() == ModItems.solid_fuel_presto) //16000 (8000)
|
||||||
burnTime *= 4;
|
burnTime *= con ? 4 : 1.1;
|
||||||
if(fuel.getItem() == ModItems.solid_fuel_presto_triplet) //80000 (40000)
|
if(fuel.getItem() == ModItems.solid_fuel_presto_triplet) //80000 (40000)
|
||||||
burnTime *= 4;
|
burnTime *= con ? 4 : 1.1;
|
||||||
|
|
||||||
burn[i] = burnTime;
|
burn[i] = burnTime;
|
||||||
|
|
||||||
@ -142,7 +144,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
// RTG ///
|
// RTG ///
|
||||||
this.hasRTG = RTGUtil.hasHeat(slots, RTGSlots);
|
this.hasRTG = RTGUtil.hasHeat(slots, RTGSlots);
|
||||||
this.spin += RTGUtil.updateRTGs(slots, RTGSlots) * 0.2;
|
this.spin += RTGUtil.updateRTGs(slots, RTGSlots) * (con ? 0.2 : 0.15);
|
||||||
|
|
||||||
if(this.spin > 0) {
|
if(this.spin > 0) {
|
||||||
|
|
||||||
@ -206,12 +208,13 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
this.burn = nbt.getIntArray("burn");
|
this.burn = nbt.getIntArray("burn");
|
||||||
this.hasRTG = nbt.getBoolean("hasRTG");
|
this.hasRTG = nbt.getBoolean("hasRTG");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int coalConRate = 75;
|
||||||
|
public static final int coalGenRate = 20;
|
||||||
|
|
||||||
public static final int coalGenRate = 75;
|
public int getPowerFromFuel(boolean con) {
|
||||||
|
|
||||||
public int getPowerFromFuel() {
|
|
||||||
FluidType type = tanks[1].getTankType();
|
FluidType type = tanks[1].getTankType();
|
||||||
return type.hasTrait(FT_Flammable.class) ? (int)(type.getTrait(FT_Flammable.class).getHeatEnergy() / 1000L) : 0;
|
return type.hasTrait(FT_Flammable.class) ? (int)(type.getTrait(FT_Flammable.class).getHeatEnergy() / (con ? 1000L : 5000L)) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"mcversion": "1.7.10",
|
"mcversion": "1.7.10",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"credits": "HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms), Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting), UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges, ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon (calculator, chunk-based fallout), haru315 (spiral point algorithm), Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), impbk2002 (project settings), OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives), Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)",
|
"credits": "HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms), Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting), UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges, ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon (calculator, chunk-based fallout), haru315 (spiral point algorithm), Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Aionoso (GUI textures), impbk2002 (project settings), OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives), Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)",
|
||||||
"logoFile": "",
|
"logoFile": "",
|
||||||
"screenshots": [],
|
"screenshots": [],
|
||||||
"dependencies": []
|
"dependencies": []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user