This repository has been archived by the owner on May 25, 2024. It is now read-only.
forked from GlodBlock/GoodGenerator
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split classes, renames, more adapt to GT changes
- Loading branch information
Showing
14 changed files
with
164 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/main/java/goodgenerator/api/recipe/ExtremeHeatExchangerRecipe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package goodgenerator.api.recipe; | ||
|
||
import net.minecraftforge.fluids.Fluid; | ||
import net.minecraftforge.fluids.FluidStack; | ||
|
||
import gregtech.api.util.GT_Recipe; | ||
|
||
public class ExtremeHeatExchangerRecipe extends GT_Recipe { | ||
|
||
public ExtremeHeatExchangerRecipe(FluidStack[] input, FluidStack[] output, int special) { | ||
super(false, null, null, null, null, input, output, 0, 0, special); | ||
} | ||
|
||
public int getMaxHotFluidConsume() { | ||
if (this.mFluidInputs != null) { | ||
return this.mFluidInputs[0].amount; | ||
} | ||
return 0; | ||
} | ||
|
||
public Fluid getNormalSteam() { | ||
if (this.mFluidOutputs != null) { | ||
return this.mFluidOutputs[0].getFluid(); | ||
} | ||
return null; | ||
} | ||
|
||
public Fluid getHeatedSteam() { | ||
if (this.mFluidOutputs != null) { | ||
return this.mFluidOutputs[1].getFluid(); | ||
} | ||
return null; | ||
} | ||
|
||
public Fluid getCooledFluid() { | ||
if (this.mFluidOutputs != null) { | ||
return this.mFluidOutputs[2].getFluid(); | ||
} | ||
return null; | ||
} | ||
|
||
public int getEUt() { | ||
if (getNormalSteam() != null) { | ||
switch (getNormalSteam().getName()) { | ||
case "steam": { | ||
int tVal = this.mFluidInputs[1].amount * 4; | ||
if (tVal < 0) tVal = -tVal; | ||
return tVal; | ||
} | ||
case "ic2superheatedsteam": { | ||
int tVal = this.mFluidInputs[1].amount * 8; | ||
if (tVal < 0) tVal = -tVal; | ||
return tVal; | ||
} | ||
case "supercriticalsteam": { | ||
int tVal = this.mFluidInputs[1].amount * 800; | ||
if (tVal < 0) tVal = -tVal; | ||
return tVal; | ||
} | ||
default: | ||
return 0; | ||
} | ||
} | ||
return 0; | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
src/main/java/goodgenerator/api/recipe/GoodGeneratorRecipeMaps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package goodgenerator.api.recipe; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.Comparator; | ||
|
||
import net.minecraft.util.StatCollector; | ||
|
||
import goodgenerator.client.GUI.GG_UITextures; | ||
import gregtech.api.enums.GT_Values; | ||
import gregtech.api.gui.modularui.GT_UITextures; | ||
import gregtech.api.recipe.RecipeMap; | ||
import gregtech.api.recipe.RecipeMapBackend; | ||
import gregtech.api.recipe.RecipeMapBuilder; | ||
import gregtech.api.util.GT_Utility; | ||
import gregtech.nei.formatter.SimpleSpecialValueFormatter; | ||
|
||
public class GoodGeneratorRecipeMaps { | ||
|
||
public static final RecipeMap<RecipeMapBackend> naquadahReactorFuels = RecipeMapBuilder | ||
.of("gg.recipe.naquadah_reactor").maxIO(0, 0, 1, 1).minInputs(0, 1) | ||
.neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("value.naquadah_reactor")) | ||
.neiRecipeComparator(Comparator.comparing(recipe -> recipe.mSpecialValue)).dontUseProgressBar() | ||
.addSpecialTexture(59, 20, 58, 42, GG_UITextures.PICTURE_NAQUADAH_REACTOR).build(); | ||
public static final RecipeMap<RecipeMapBackend> naquadahFuelRefineFactoryRecipes = RecipeMapBuilder | ||
.of("gg.recipe.naquadah_fuel_refine_factory").maxIO(6, 0, 2, 1).minInputs(0, 1) | ||
.neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("value.naquadah_fuel_refine_factory")).build(); | ||
public static final RecipeMap<?> neutronActivatorRecipes = RecipeMapBuilder.of("gg.recipe.neutron_activator") | ||
.maxIO(9, 9, 1, 1).dontUseProgressBar() | ||
.addSpecialTexture(73, 22, 31, 21, GG_UITextures.PICTURE_NEUTRON_ACTIVATOR) | ||
.neiSpecialInfoFormatter(recipeInfo -> { | ||
int minNKE = recipeInfo.recipe.mSpecialValue % 10000; | ||
int maxNKE = recipeInfo.recipe.mSpecialValue / 10000; | ||
return Arrays.asList( | ||
StatCollector.translateToLocal("value.neutron_activator.0"), | ||
GT_Utility.formatNumbers(minNKE) + StatCollector.translateToLocal("value.neutron_activator.2"), | ||
StatCollector.translateToLocal("value.neutron_activator.1"), | ||
GT_Utility.formatNumbers(maxNKE) + StatCollector.translateToLocal("value.neutron_activator.2")); | ||
}).build(); | ||
public static final RecipeMap<ExtremeHeatExchangerBackend> extremeHeatExchangerFuels = RecipeMapBuilder | ||
.of("gg.recipe.extreme_heat_exchanger", ExtremeHeatExchangerBackend::new).maxIO(0, 0, 2, 3) | ||
.dontUseProgressBar().addSpecialTexture(47, 13, 78, 59, GG_UITextures.PICTURE_EXTREME_HEAT_EXCHANGER) | ||
.frontend(ExtremeHeatExchangerFrontend::new).build(); | ||
public static final RecipeMap<RecipeMapBackend> preciseAssemblerRecipes = RecipeMapBuilder | ||
.of("gg.recipe.precise_assembler").maxIO(4, 1, 4, 0).progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) | ||
.progressBarPos(85, 30).neiTransferRect(80, 30, 35, 18) | ||
.neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("value.precise_assembler")) | ||
.frontend(PreciseAssemblerFrontend::new).build(); | ||
public static final RecipeMap<RecipeMapBackend> componentAssemblyLineRecipes = RecipeMapBuilder | ||
.of("gg.recipe.componentassemblyline").maxIO(12, 1, 12, 0).neiTransferRect(70, 15, 18, 54) | ||
.neiSpecialInfoFormatter( | ||
recipeInfo -> Collections.singletonList( | ||
StatCollector.translateToLocalFormatted( | ||
"value.component_assembly_line", | ||
GT_Values.VN[recipeInfo.recipe.mSpecialValue]))) | ||
.dontUseProgressBar().addSpecialTexture(70, 11, 72, 40, GG_UITextures.PICTURE_COMPONENT_ASSLINE) | ||
.frontend(ComponentAssemblyLineFrontend::new).build(); | ||
} |
32 changes: 0 additions & 32 deletions
32
src/main/java/goodgenerator/api/recipe/NaquadahReactorFrontend.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
src/main/java/goodgenerator/api/recipe/NeutronActivatorFrontend.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.