Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the poopline #3373

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/gregtech/api/enums/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
public static Materials Quicklime;
public static Materials Potash;
public static Materials SodaAsh;
public static Materials CalciumHypochlorite;

public static Materials BioDiesel;
public static Materials NitrationMixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ public static void load() {
Materials.Quicklime = new MaterialBuilder(622, TextureSet.SET_DULL , "Quicklime").addDustItems().setRGB(240, 240, 240).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial();
Materials.Potash = new MaterialBuilder(623, TextureSet.SET_DULL , "Potash").addDustItems().setRGB(120, 66, 55).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Potassium, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial();
Materials.SodaAsh = new MaterialBuilder(624, TextureSet.SET_DULL , "Soda Ash").addDustItems().setRGB(220, 220, 255).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial();
Materials.CalciumHypochlorite = new MaterialBuilder(571, TextureSet.SET_DULL , "Calcium Hypochlorite").addDustItems().setRGB(240,235, 245).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 2), new MaterialStack(Chlorine, 2)).addElectrolyzerRecipe().constructMaterial();
Materials.BioDiesel = new MaterialBuilder(627, TextureSet.SET_FLUID , "Bio Diesel").addCell().addFluid().setRGB(255, 128, 0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(320).constructMaterial();
Materials.NitrationMixture = new MaterialBuilder(628, TextureSet.SET_FLUID , "Nitration Mixture").addCell().setRGB(230, 226, 171).setColor(Dyes.dyeBrown).constructMaterial();
Materials.Glycerol = new MaterialBuilder(629, TextureSet.SET_FLUID , "Glycerol").addCell().addFluid().setRGB(135, 222, 135).setColor(Dyes.dyeLime).setFuelType(MaterialBuilder.SEMIFLUID).setFuelPower(164).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.util.minecraft.ItemUtils;

public class ChemicalRecipes implements Runnable {

Expand Down Expand Up @@ -669,6 +670,19 @@ public void registerBoth() {
.eut(TierEU.RECIPE_LV)
.addTo(UniversalChemical);

// 2 Cl2 + 2 Ca(OH)2 = CaCl2 + Ca(OCl)2 + 2H20

GTValues.RA.stdBuilder()
.itemInputs(ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 2))
.itemOutputs(
WerkstoffLoader.CalciumChloride.get(OrePrefixes.dust, 1),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.CalciumHypochlorite, 1))
.fluidInputs(Materials.Chlorine.getGas(4000))
.fluidOutputs(Materials.Water.getFluid(2000))
.duration(25 * SECONDS)
.eut(TierEU.RECIPE_LV)
.addTo(UniversalChemical);

// C + 4H = CH4

GTValues.RA.stdBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,18 @@ public void run() {
.eut(2)
.addTo(fermentingRecipes);

GTValues.RA.stdBuilder()
.fluidInputs(getFluidStack("fluid.fertile.manure.slurry", 1000))
.fluidOutputs(Materials.Methane.getGas(100))
.duration(1 * MINUTES)
.eut(2)
.addTo(fermentingRecipes);

GTValues.RA.stdBuilder()
.fluidInputs(getFluidStack("fluid.manure.slurry", 1000))
.fluidOutputs(Materials.Methane.getGas(50))
.duration(1 * MINUTES)
.eut(2)
.addTo(fermentingRecipes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void registerBlockIcons(final IIconRegister p_149651_1_) {
}

/**
* Called upon block activation (right click on the block.)
* Called upon block activation (right-click on the block.)
*/
@Override
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player,
Expand Down
77 changes: 22 additions & 55 deletions src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import forestry.core.items.ItemRegistryCore;
import forestry.plugins.PluginCore;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Mods;
import gregtech.api.enums.OrePrefixes;
Expand Down Expand Up @@ -343,13 +344,10 @@ public AgriculturalChem() {
private static final ArrayList<ItemStack> mNuts = new ArrayList<>();
private static final ArrayList<ItemStack> mSeeds = new ArrayList<>();
private static final ArrayList<ItemStack> mPeat = new ArrayList<>();
private static final ArrayList<ItemStack> mBones = new ArrayList<>();
private static final ArrayList<ItemStack> mBoneMeal = new ArrayList<>();

private static final ArrayList<ItemStack> mList_Master_Meats = new ArrayList<>();
private static final ArrayList<ItemStack> mList_Master_FruitVege = new ArrayList<>();
private static final ArrayList<ItemStack> mList_Master_Seeds = new ArrayList<>();
private static final ArrayList<ItemStack> mList_Master_Bones = new ArrayList<>();

private static void processAllOreDict() {
processOreDict("listAllmeatraw", mMeats);
Expand All @@ -359,8 +357,6 @@ private static void processAllOreDict() {
processOreDict("listAllnut", mNuts);
processOreDict("listAllSeed", mSeeds);
processOreDict("brickPeat", mPeat);
processOreDict("bone", mBones);
processOreDict("dustBone", mBoneMeal);
// Just make a mega list, makes life easier.
if (!mMeats.isEmpty()) {
mList_Master_Meats.addAll(mMeats);
Expand Down Expand Up @@ -390,22 +386,6 @@ private static void processAllOreDict() {
if (!mSeeds.isEmpty()) {
mList_Master_Seeds.addAll(mSeeds);
}
if (!mBoneMeal.isEmpty()) {
mList_Master_Bones.addAll(mBoneMeal);
}
if (!mBones.isEmpty()) {
for (ItemStack g : mBones) {
boolean foundDupe = false;
for (ItemStack old : mList_Master_Bones) {
if (GTUtility.areStacksEqual(g, old)) {
foundDupe = true;
break;
}
}
if (foundDupe) continue;
mList_Master_Bones.add(g);
}
}
}

private static void processOreDict(String aOreName, ArrayList<ItemStack> aMap) {
Expand Down Expand Up @@ -446,35 +426,24 @@ private static void addBasicSlurryRecipes() {

private static void addAdvancedSlurryRecipes() {

ItemStack aCircuit = GTUtility.getIntegratedCircuit(10);
ItemStack aBone;
ItemStack aMeat;
ItemStack aEmptyCells = Materials.Empty.getCells(2);
ItemStack aInputCells = ItemUtils.getItemStackOfAmountFromOreDict("cellRawAnimalWaste", 2);
FluidStack aOutput = FluidUtils.getFluidStack(FertileManureSlurry, 1000);

for (FluidStack aBloodStack : mBloodFluids) {
for (ItemStack aBoneStack : mList_Master_Bones) {
aBone = ItemUtils.getSimpleStack(aBoneStack, 2);
for (ItemStack aMeatStack : mList_Master_Meats) {
aMeat = ItemUtils.getSimpleStack(aMeatStack, 5);
// Poop Juice to Fertile Slurry
GTValues.RA.stdBuilder()
.itemInputs(aCircuit, aBone, aMeat, aInputCells)
.itemOutputs(aEmptyCells)
.fluidInputs(aBloodStack)
.fluidOutputs(aOutput)
.duration(8 * SECONDS)
.eut(TierEU.RECIPE_MV / 2)
.addTo(mixerRecipes);
}
}
// Poop Juice to Fertile Slurry
GTValues.RA.stdBuilder()
.itemInputs(
GTUtility.getIntegratedCircuit(10),
ItemList.Dye_Bonemeal.get(2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.MeatRaw, 5),
ItemUtils.getItemStackOfAmountFromOreDict("cellRawAnimalWaste", 2))
.itemOutputs(Materials.Empty.getCells(2))
.fluidInputs(aBloodStack)
.fluidOutputs(FluidUtils.getFluidStack(FertileManureSlurry, 1000))
.duration(4 * SECONDS)
.eut(TierEU.RECIPE_MV)
.addTo(mixerRecipes);
}
}

private static void addBasicOrganiseFertRecipes() {
FluidStack aInputFluid = FluidUtils.getFluidStack(ManureSlurry, 1000);
ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 3);
ItemStack aPeat;
ItemStack aMeat;
for (ItemStack aPeatStack : mPeat) {
Expand All @@ -483,8 +452,8 @@ private static void addBasicOrganiseFertRecipes() {
aMeat = ItemUtils.getSimpleStack(aMeatStack, 5);
GTValues.RA.stdBuilder()
.itemInputs(aPeat, aMeat)
.itemOutputs(aOutputDust)
.fluidInputs(aInputFluid)
.itemOutputs(ItemUtils.getSimpleStack(dustOrganicFertilizer, 3))
.fluidInputs(FluidUtils.getFluidStack(ManureSlurry, 1000))
.duration(20 * SECONDS)
.eut(TierEU.RECIPE_MV)
.addTo(UniversalChemical);
Expand All @@ -494,8 +463,8 @@ private static void addBasicOrganiseFertRecipes() {
aMeat = ItemUtils.getSimpleStack(aMeatStack, 9);
GTValues.RA.stdBuilder()
.itemInputs(aPeat, aMeat)
.itemOutputs(aOutputDust)
.fluidInputs(aInputFluid)
.itemOutputs(ItemUtils.getSimpleStack(dustOrganicFertilizer, 3))
.fluidInputs(FluidUtils.getFluidStack(ManureSlurry, 1000))
.duration(10 * SECONDS)
.eut(TierEU.RECIPE_MV)
.addTo(UniversalChemical);
Expand All @@ -504,8 +473,6 @@ private static void addBasicOrganiseFertRecipes() {
}

private static void addAdvancedOrganiseFertRecipes() {
FluidStack aInputFluid = FluidUtils.getFluidStack(FertileManureSlurry, 1000);
ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 7);
ItemStack aPeat;
ItemStack aMeat;
for (ItemStack aPeatStack : mPeat) {
Expand All @@ -514,8 +481,8 @@ private static void addAdvancedOrganiseFertRecipes() {
aMeat = ItemUtils.getSimpleStack(aMeatStack, 7);
GTValues.RA.stdBuilder()
.itemInputs(aPeat, aMeat)
.itemOutputs(aOutputDust)
.fluidInputs(aInputFluid)
.itemOutputs(ItemUtils.getSimpleStack(dustOrganicFertilizer, 7))
.fluidInputs(FluidUtils.getFluidStack(FertileManureSlurry, 1000))
.duration(10 * SECONDS)
.eut(140)
.addTo(UniversalChemical);
Expand All @@ -525,8 +492,8 @@ private static void addAdvancedOrganiseFertRecipes() {
aMeat = ItemUtils.getSimpleStack(aMeatStack, 12);
GTValues.RA.stdBuilder()
.itemInputs(aPeat, aMeat)
.itemOutputs(aOutputDust)
.fluidInputs(aInputFluid)
.itemOutputs(ItemUtils.getSimpleStack(dustOrganicFertilizer, 7))
.fluidInputs(FluidUtils.getFluidStack(FertileManureSlurry, 1000))
.duration(5 * SECONDS)
.eut(140)
.addTo(UniversalChemical);
Expand Down
24 changes: 12 additions & 12 deletions src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -1008,27 +1008,27 @@ private static void runModRecipes() {
// Poo Collector
GTValues.RA.stdBuilder()
.itemInputs(
CI.machineHull_MV,
ItemList.FluidRegulator_MV.get(2),
CI.getTieredComponent(OrePrefixes.pipeMedium, 2, 2),
MaterialsAlloy.EGLIN_STEEL.getPlate(4),
GregtechItemList.GTFluidTank_LV.get(1),
ItemList.FluidRegulator_LV.get(2),
GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bronze, 2),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6),
MaterialsAlloy.POTIN.getScrew(6))
.itemOutputs(ItemUtils.getSimpleStack(ModBlocks.blockPooCollector))
.itemOutputs(ItemUtils.getSimpleStack(ModBlocks.blockPooCollector, 0, 1))
.fluidInputs(MaterialsAlloy.TUMBAGA.getFluidStack(144 * 4))
.duration(60 * SECONDS)
.duration(1 * MINUTES)
.eut(TierEU.RECIPE_LV)
.addTo(assemblerRecipes);
// Adv. Poo Collector
GTValues.RA.stdBuilder()
.itemInputs(
CI.getTieredMachineHull(-1),
ItemUtils.getSimpleStack(ModBlocks.blockPooCollector),
ItemList.FluidRegulator_IV.get(2),
CI.getTieredComponent(OrePrefixes.pipeHuge, 6, 4),
CI.getTieredComponent(OrePrefixes.screw, 6, 16))
ItemList.FluidRegulator_HV.get(2),
GTOreDictUnificator.get(OrePrefixes.pipeHuge, Materials.StainlessSteel, 2),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 6),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.BlueAlloy, 6))
.itemOutputs(ItemUtils.getSimpleStack(ModBlocks.blockPooCollector, 8, 1))
.fluidInputs(CI.getAlternativeTieredFluid(5, 144 * 9))
.duration(5 * MINUTES)
.fluidInputs(new FluidStack(FluidRegistry.getFluid("molten.borosilicateglass"), 144 * 8))
.duration(1 * MINUTES)
.eut(TierEU.RECIPE_HV)
.addTo(assemblerRecipes);

Expand Down
Loading