fish oil, some experimental mixer stuff

This commit is contained in:
Bob 2023-05-23 21:54:10 +02:00
parent 7d49108c95
commit be5c4ba9d6
14 changed files with 72 additions and 3 deletions

View File

@ -130,6 +130,8 @@ public class Fluids {
public static FluidType EGG;
public static FluidType CHOLESTEROL;
public static FluidType ESTRADIOL;
public static FluidType FISHOIL;
public static FluidType SUNFLOWEROIL;
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
private static final HashMap<String, FluidType> nameMapping = new HashMap();
@ -270,7 +272,9 @@ public class Fluids {
GAS_COKER = new FluidType("GAS_COKER", 0xDEF4CA, 1, 4, 0, EnumSymbol.NONE).addTraits(GASEOUS);
EGG = new FluidType("EGG", 0xD2C273, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
CHOLESTEROL = new FluidType("CHOLESTEROL", 0xD6D2BD, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
ESTRADIOL = new FluidType(109, "ESTRADIOL", 0xCDD5D8, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
ESTRADIOL = new FluidType("ESTRADIOL", 0xCDD5D8, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
FISHOIL = new FluidType("FISHOIL", 0x4B4A45, 0, 1, 0, EnumSymbol.NONE).addTraits(LIQUID);
SUNFLOWEROIL = new FluidType(111, "SUNFLOWEROIL", 0xCBAD45, 0, 1, 0, EnumSymbol.NONE).addTraits(LIQUID);
// ^ ^ ^ ^ ^ ^ ^ ^
//ADD NEW FLUIDS HERE
@ -357,6 +361,8 @@ public class Fluids {
metaOrder.add(BIOGAS);
metaOrder.add(BIOFUEL);
metaOrder.add(ETHANOL);
metaOrder.add(FISHOIL);
metaOrder.add(SUNFLOWEROIL);
metaOrder.add(NITAN);
metaOrder.add(BALEFIRE);
//processing fluids
@ -523,6 +529,8 @@ public class Fluids {
registerCalculatedFuel(WOODOIL, 110_000 /* 20_000 TU per 250mB + a bonus */, 0, null);
registerCalculatedFuel(COALCREOSOTE, 250_000 /* 20_000 TU per 100mB + a bonus */, 0, null);
registerCalculatedFuel(FISHOIL, 75_000, 0, null);
registerCalculatedFuel(SUNFLOWEROIL, 50_000, 0, null);
registerCalculatedFuel(SOLVENT, 100_000, 0, null); // flammable, sure, but not combustable
registerCalculatedFuel(RADIOSOLVENT, 150_000, 0, null);

View File

@ -50,6 +50,8 @@ public class CokerRecipes extends SerializableRecipe {
registerAuto(AROMATICS, GAS_COKER);
registerAuto(REFORMATE, GAS_COKER);
registerAuto(XYLENE, GAS_COKER);
registerAuto(FISHOIL, NAPHTHA_COKER);
registerAuto(SUNFLOWEROIL, GAS_COKER);
registerSFAuto(WOODOIL, 340_000L, new ItemStack(Items.coal, 1, 1), GAS_COKER);

View File

@ -186,11 +186,11 @@ public class CrucibleRecipes extends SerializableRecipe {
input[i] = new MaterialStack(Mats.matByName.get(matname), amount);
}
MaterialStack[] output = new MaterialStack[obj.get("output").getAsJsonArray().size()];
for(int i = 0; i < input.length; i++) {
for(int i = 0; i < output.length; i++) {
JsonArray entry = obj.get("output").getAsJsonArray().get(i).getAsJsonArray();
String matname = entry.get(0).getAsString();
int amount = entry.get(1).getAsInt();
input[i] = new MaterialStack(Mats.matByName.get(matname), amount);
output[i] = new MaterialStack(Mats.matByName.get(matname), amount);
}
recipes.add(new CrucibleRecipe(id, name, freq, icon).inputs(input).outputs(output));
}

View File

@ -102,6 +102,7 @@ public class CrystallizerRecipes extends SerializableRecipe {
registerRecipe(new ComparableStack(ModItems.powder_semtex_mix), new CrystallizerRecipe(ModItems.ingot_semtex, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_desh_ready), new CrystallizerRecipe(ModItems.ingot_desh, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_meteorite), new CrystallizerRecipe(ModItems.fragment_meteorite, utilityTime));
registerRecipe(CD.dust(), new CrystallizerRecipe(ModItems.ingot_rubber, baseTime), new FluidStack(Fluids.FISHOIL, 250));
registerRecipe(new ComparableStack(ModItems.meteorite_sword_treated), new CrystallizerRecipe(ModItems.meteorite_sword_etched, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_impure_osmiridium), new CrystallizerRecipe(ModItems.crystal_osmiridium, baseTime), new FluidStack(Fluids.SCHRABIDIC, 1_000));

View File

@ -23,6 +23,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class LiquefactionRecipes extends SerializableRecipe {
@ -56,6 +57,8 @@ public class LiquefactionRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ModBlocks.plant_flower, 1, 3), new FluidStack(150, Fluids.ETHANOL));
recipes.put(new ComparableStack(ModBlocks.plant_flower, 1, 4), new FluidStack(50, Fluids.ETHANOL));
recipes.put(new ComparableStack(ModItems.biomass), new FluidStack(125, Fluids.BIOGAS));
recipes.put(new ComparableStack(Items.fish, 1, OreDictionary.WILDCARD_VALUE), new FluidStack(100, Fluids.FISHOIL));
recipes.put(new ComparableStack(Blocks.double_plant, 1, 0), new FluidStack(100, Fluids.SUNFLOWEROIL));
recipes.put(new ComparableStack(Items.wheat_seeds), new FluidStack(50, Fluids.SEEDSLURRY));
recipes.put(new ComparableStack(Blocks.tallgrass, 1, 1), new FluidStack(100, Fluids.SEEDSLURRY));
@ -74,6 +77,11 @@ public class LiquefactionRecipes extends SerializableRecipe {
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
if(recipes.containsKey(comp))
return recipes.get(comp);
comp = new ComparableStack(stack.getItem(), 1, OreDictionary.WILDCARD_VALUE);
if(recipes.containsKey(comp))
return recipes.get(comp);

View File

@ -21,12 +21,16 @@ import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraftforge.oredict.OreDictionary;
public class MixerRecipes extends SerializableRecipe {
public static HashMap<FluidType, MixerRecipe> recipes = new HashMap();
public static HashMap<FluidType, MixerRecipe[]> recipes_experimental = new HashMap();
@Override
public void registerDefaults() {
recipes.put(Fluids.COOLANT, new MixerRecipe(2_000, 50).setStack1(new FluidStack(Fluids.WATER, 1_800)).setSolid(new OreDictStack(KNO.dust())));
@ -40,6 +44,8 @@ public class MixerRecipes extends SerializableRecipe {
recipes.put(Fluids.MUSTARDGAS, new MixerRecipe(1000, 20).setStack1(new FluidStack(Fluids.REFORMGAS, 750)).setStack2(new FluidStack(Fluids.CHLORINE, 250)).setSolid(new OreDictStack(S.dust())));
recipes.put(Fluids.IONGEL, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.WATER, 1000)).setStack2(new FluidStack(Fluids.HYDROGEN, 200)).setSolid(new ComparableStack(ModItems.pellet_charged)));
recipes.put(Fluids.EGG, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.RADIOSOLVENT, 500)).setSolid(new ComparableStack(Items.egg)));
recipes.put(Fluids.FISHOIL, new MixerRecipe(100, 50).setSolid(new ComparableStack(Items.fish, 1, OreDictionary.WILDCARD_VALUE)));
recipes.put(Fluids.SUNFLOWEROIL, new MixerRecipe(100, 50).setSolid(new ComparableStack(Blocks.double_plant, 1, 0)));
recipes.put(Fluids.SOLVENT, new MixerRecipe(1000, 50).setStack1(new FluidStack(Fluids.NAPHTHA, 500)).setStack2(new FluidStack(Fluids.AROMATICS, 500)));
recipes.put(Fluids.SULFURIC_ACID, new MixerRecipe(500, 50).setStack1(new FluidStack(Fluids.ACID, 800)).setSolid(new OreDictStack(S.dust())));
@ -62,6 +68,22 @@ public class MixerRecipes extends SerializableRecipe {
recipes.put(Fluids.KEROSENE_REFORM, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.KEROSENE, 900)).setStack2(new FluidStack(Fluids.REFORMATE, 100)));
}
public static void registerExperimental(FluidType type, MixerRecipe... recipes) {
recipes_experimental.put(type, recipes);
}
public static MixerRecipe[] getOutputExperimental(FluidType type) {
return recipes_experimental.get(type);
}
public static MixerRecipe getOutputExperimental(FluidType type, int index) {
MixerRecipe[] recs = recipes_experimental.get(type);
if(recs == null) return null;
return recs[index % recs.length];
}
public static MixerRecipe getOutput(FluidType type) {
return recipes.get(type);
}
@ -130,6 +152,30 @@ public class MixerRecipes extends SerializableRecipe {
return recipes;
}
public static HashMap getRecipesExperimental() {
HashMap<Object[], Object> recipes = new HashMap<Object[], Object>();
for(Entry<FluidType, MixerRecipe[]> entry : MixerRecipes.recipes_experimental.entrySet()) {
FluidType type = entry.getKey();
MixerRecipe[] recs = entry.getValue();
for(MixerRecipe recipe : recs) {
FluidStack output = new FluidStack(type, recipe.output);
List<Object> objects = new ArrayList();
if(recipe.input1 != null) objects.add(ItemFluidIcon.make(recipe.input1));
if(recipe.input2 != null) objects.add(ItemFluidIcon.make(recipe.input2));
if(recipe.solidInput != null) objects.add(recipe.solidInput);
recipes.put(objects.toArray(), ItemFluidIcon.make(output));
}
}
return recipes;
}
public static class MixerRecipe {
public FluidStack input1;

View File

@ -625,6 +625,7 @@ hbmfluid.egg=Gelöstes Ei
hbmfluid.estradiol=Estradiollösung
hbmfluid.ethanol=Ethanol
hbmfluid.enderjuice=Endersaft
hbmfluid.fishoil=Fischöl
hbmfluid.fracksol=Frackinglösung
hbmfluid.gas=Erdgas
hbmfluid.gas_coker=Koker-Gas
@ -689,6 +690,7 @@ hbmfluid.sourgas=Saures Gas
hbmfluid.spentsteam=Niedrigdruckdampf
hbmfluid.steam=Dampf
hbmfluid.sulfuric_acid=Schwefelsäure
hbmfluid.sunfloweroil=Sonnenblumenkernöl
hbmfluid.superhotsteam=Superverdichteter Dampf
hbmfluid.syngas=Synthesegas
hbmfluid.tritium=Tritium

View File

@ -1197,6 +1197,7 @@ hbmfluid.egg=Dissolved Egg
hbmfluid.estradiol=Estradiol Solution
hbmfluid.ethanol=Ethanol
hbmfluid.enderjuice=Ender Juice
hbmfluid.fishoil=Fish Oil
hbmfluid.fracksol=Fracking Solution
hbmfluid.gas=Natural Gas
hbmfluid.gas_coker=Coker Gas
@ -1261,6 +1262,7 @@ hbmfluid.sourgas=Sour Gas
hbmfluid.spentsteam=Low-Pressure Steam
hbmfluid.steam=Steam
hbmfluid.sulfuric_acid=Sulfuric Acid
hbmfluid.sunfloweroil=Sunflower Seed Oil
hbmfluid.superhotsteam=Super Dense Steam
hbmfluid.syngas=Syngas
hbmfluid.tritium=Tritium

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB