Skip to content

Commit

Permalink
Further RA2 recipe fixes (#1870)
Browse files Browse the repository at this point in the history
* there is no graphite block

* fix old RA1 remnants and nulls

* more dt null checks

* remove nonexistent potions from fermenting

* railcraft anvil fixes

* fix tainted magic fuel values

* fix railcraft creosote block
  • Loading branch information
chochem authored Apr 10, 2023
1 parent c17762b commit a6466b1
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic
GT_Values.RA.addChemicalBathRecipe(
GT_Utility.copyAmount(1L, aStack),
Materials.Creosote.getFluid(1000L),
GT_ModHandler.getModItem(Railcraft.ID, "tile.railcraft.cube", 1L, 8),
GT_ModHandler.getModItem(Railcraft.ID, "cube", 1L, 8),
null,
null,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ public void run() {

}

// doesnt seem to be in game?
recipeWithClassicFluids(
new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.block, Materials.Graphite, 1) },
new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 9) },
25 * SECONDS,
48,
true);

// glass pane recipes
{
// stained-glass -> glass pane recipes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_RecipeBuilder;
import gregtech.api.util.GT_Utility;

public class DistilleryRecipes implements Runnable {
Expand Down Expand Up @@ -504,7 +505,7 @@ public void distillationTowerRecipes() {

GT_Values.RA.stdBuilder()
.noItemInputs()
.itemOutputs(GT_Values.NI)
.noItemOutputs()
.fluidInputs(Materials.WoodTar.getFluid(1000))
.fluidOutputs(
Materials.Creosote.getFluid(250),
Expand Down Expand Up @@ -546,7 +547,7 @@ public void distillationTowerRecipes() {

GT_Values.RA.stdBuilder()
.noItemInputs()
.itemOutputs(GT_Values.NI)
.noItemOutputs()
.fluidInputs(Materials.WoodTar.getFluid(1000))
.fluidOutputs(
Materials.Creosote.getFluid(250),
Expand Down Expand Up @@ -1268,20 +1269,27 @@ public void universalDistillationTowerRecipes() {
public void addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemStack[] aCircuit,
FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) {
for (int i = 0; i < Math.min(aOutputs.length, 11); i++) {
GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.getIntegratedCircuit(i + 1))
.itemOutputs(aOutput2)
.fluidInputs(aInput)
GT_RecipeBuilder buildDistillation = GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.getIntegratedCircuit(i + 1));
if (aOutput2 == GT_Values.NI || aOutput2 == null) {
buildDistillation.noItemOutputs();
} else {
buildDistillation.itemOutputs(aOutput2);
}
buildDistillation.fluidInputs(aInput)
.fluidOutputs(aOutputs[i])
.duration(2 * aDuration)
.eut(aEUt / 4)
.addTo(sDistilleryRecipes);
}

GT_Values.RA.stdBuilder()
.itemInputs(aCircuit)
.itemOutputs(aOutput2)
.fluidInputs(aInput)
GT_RecipeBuilder buildDT = GT_Values.RA.stdBuilder()
.itemInputs(aCircuit);
if (aOutput2 == GT_Values.NI || aOutput2 == null) {
buildDT.noItemOutputs();
} else {
buildDT.itemOutputs(aOutput2);
}
buildDT.fluidInputs(aInput)
.fluidOutputs(aOutputs)
.duration(20 * SECONDS)
.eut(TierEU.RECIPE_MV)
Expand All @@ -1290,34 +1298,28 @@ public void addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemSta

public void addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2,
int aDuration, int aEUt) {
if (aOutput2 == null) {
for (int i = 0; i < Math.min(aOutputs.length, 11); i++) {
GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.getIntegratedCircuit(i + 1))
.noItemOutputs()
.fluidInputs(aInput)
.fluidOutputs(aOutputs[i])
.duration(2 * aDuration)
.eut(aEUt / 4)
.addTo(sDistilleryRecipes);
for (int i = 0; i < Math.min(aOutputs.length, 11); i++) {
GT_RecipeBuilder buildDistillation = GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.getIntegratedCircuit(i + 1));
if (aOutput2 == GT_Values.NI || aOutput2 == null) {
buildDistillation.noItemOutputs();
} else {
buildDistillation.itemOutputs(aOutput2);
}
buildDistillation.fluidInputs(aInput)
.fluidOutputs(aOutputs[i])
.duration(2 * aDuration)
.eut(aEUt / 4)
.addTo(sDistilleryRecipes);
}
GT_RecipeBuilder buildDT = GT_Values.RA.stdBuilder()
.noItemInputs();
if (aOutput2 == GT_Values.NI || aOutput2 == null) {
buildDT.noItemOutputs();
} else {
for (int i = 0; i < Math.min(aOutputs.length, 11); i++) {
GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.getIntegratedCircuit(i + 1))
.itemOutputs(aOutput2)
.fluidInputs(aInput)
.fluidOutputs(aOutputs[i])
.duration(2 * aDuration)
.eut(aEUt / 4)
.addTo(sDistilleryRecipes);
}
buildDT.itemOutputs(aOutput2);
}

GT_Values.RA.stdBuilder()
.noItemInputs()
.itemOutputs(aOutput2)
.fluidInputs(aInput)
buildDT.fluidInputs(aInput)
.fluidOutputs(aOutputs)
.duration(20 * SECONDS)
.eut(TierEU.RECIPE_MV)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,24 +323,6 @@ public void run() {
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
.fluidInputs(getFluidStack("potion.speed.strong", 50))
.fluidOutputs(getFluidStack("potion.slowness.strong", 10))
.duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
.fluidInputs(getFluidStack("potion.strength.strong", 50))
.fluidOutputs(getFluidStack("potion.weakness.strong", 10))
.duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
Expand All @@ -359,24 +341,6 @@ public void run() {
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
.fluidInputs(getFluidStack("potion.poison.long", 50))
.fluidOutputs(getFluidStack("potion.damage.long", 10))
.duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
.fluidInputs(getFluidStack("potion.waterbreathing.long", 50))
.fluidOutputs(getFluidStack("potion.damage.long", 10))
.duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
.eut(2)
.addTo(sFermentingRecipes);

GT_Values.RA.stdBuilder()
.noItemInputs()
.noItemOutputs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public void run() {

GT_Values.RA.stdBuilder()
.itemInputs(ItemList.Shape_Mold_Anvil.get(0L))
.itemOutputs(getModItem(Railcraft.ID, "tile.railcraft.anvil", 1L, 0))
.itemOutputs(getModItem(Railcraft.ID, "anvil", 1L, 0))
.fluidInputs(Materials.Steel.getMolten(4464L))
.noFluidOutputs()
.duration(6 * SECONDS + 8 * TICKS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void run() {
.addTo(GT_RecipeConstants.Fuel);

GT_Values.RA.stdBuilder()
.itemInputs(getModItem(TaintedMagic.ID, "WarpedShard", 1L))
.itemInputs(getModItem(TaintedMagic.ID, "ItemMaterial", 1L, 3))
.noItemOutputs()
.noFluidInputs()
.noFluidOutputs()
Expand All @@ -166,7 +166,7 @@ public void run() {
.addTo(GT_RecipeConstants.Fuel);

GT_Values.RA.stdBuilder()
.itemInputs(getModItem(TaintedMagic.ID, "FluxShard", 1L))
.itemInputs(getModItem(TaintedMagic.ID, "ItemMaterial", 1L, 4))
.noItemOutputs()
.noFluidInputs()
.noFluidOutputs()
Expand All @@ -177,7 +177,7 @@ public void run() {
.addTo(GT_RecipeConstants.Fuel);

GT_Values.RA.stdBuilder()
.itemInputs(getModItem(TaintedMagic.ID, "EldritchShard", 1L))
.itemInputs(getModItem(TaintedMagic.ID, "ItemMaterial", 1L, 5))
.noItemOutputs()
.noFluidInputs()
.noFluidOutputs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ public void run() {
new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767),
new ItemData(Materials.Iron, 7257600L));
GT_OreDictUnificator.addItemData(
GT_ModHandler.getModItem(Railcraft.ID, "tile.railcraft.anvil", 1L, 0),
GT_ModHandler.getModItem(Railcraft.ID, "anvil", 1L, 0),
new ItemData(Materials.Steel, 108864000L));
GT_OreDictUnificator.addItemData(
GT_ModHandler.getModItem(Railcraft.ID, "tile.railcraft.anvil", 1L, 1),
GT_ModHandler.getModItem(Railcraft.ID, "anvil", 1L, 1),
new ItemData(Materials.Steel, 72576000L));
GT_OreDictUnificator.addItemData(
GT_ModHandler.getModItem(Railcraft.ID, "tile.railcraft.anvil", 1L, 2),
GT_ModHandler.getModItem(Railcraft.ID, "anvil", 1L, 2),
new ItemData(Materials.Steel, 36288000L));
GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 0), new ItemData(Materials.Iron, 108864000L));
GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 1), new ItemData(Materials.Iron, 72576000L));
Expand Down

0 comments on commit a6466b1

Please sign in to comment.