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.
* Migrate GG recipemaps * Migrate the rest * Split classes, renames, more adapt to GT changes * Update GT to adapt to MaceratorBackend removal * update gradle+deps+bs --------- Co-authored-by: Martin Robertz <[email protected]> Co-authored-by: BlueWeabo <[email protected]>
- Loading branch information
1 parent
c8fc878
commit 981df39
Showing
33 changed files
with
567 additions
and
781 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
// Add your dependencies here | ||
|
||
dependencies { | ||
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.73:dev') | ||
api('com.github.GTNewHorizons:bartworks:0.8.9:dev') | ||
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.96:dev') | ||
api('com.github.GTNewHorizons:bartworks:0.8.19:dev') | ||
implementation('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') | ||
implementation('com.github.GTNewHorizons:GTplusplus:1.10.24:dev') | ||
implementation('com.github.GTNewHorizons:GTplusplus:1.10.37:dev') | ||
|
||
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.4.13-GTNH:dev') {transitive = false} | ||
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.5.3-GTNH:dev') {transitive = false} | ||
|
||
runtimeOnly('com.github.GTNewHorizons:NewHorizonsCoreMod:2.2.32:dev') | ||
runtimeOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev') | ||
runtimeOnly('com.github.GTNewHorizons:Baubles:1.0.3:dev') | ||
} |
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
44 changes: 44 additions & 0 deletions
44
src/main/java/goodgenerator/api/recipe/ComponentAssemblyLineFrontend.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,44 @@ | ||
package goodgenerator.api.recipe; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; | ||
|
||
import com.gtnewhorizons.modularui.api.math.Pos2d; | ||
import com.gtnewhorizons.modularui.api.screen.ModularWindow; | ||
|
||
import gregtech.api.recipe.BasicUIPropertiesBuilder; | ||
import gregtech.api.recipe.NEIRecipePropertiesBuilder; | ||
import gregtech.api.recipe.RecipeMapFrontend; | ||
import gregtech.api.util.MethodsReturnNonnullByDefault; | ||
import gregtech.common.gui.modularui.UIHelper; | ||
|
||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
public class ComponentAssemblyLineFrontend extends RecipeMapFrontend { | ||
|
||
public ComponentAssemblyLineFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, | ||
NEIRecipePropertiesBuilder neiPropertiesBuilder) { | ||
super(uiPropertiesBuilder, neiPropertiesBuilder); | ||
} | ||
|
||
@Override | ||
public List<Pos2d> getItemInputPositions(int itemInputCount) { | ||
return UIHelper.getGridPositions(itemInputCount, 16, 8, 3); | ||
} | ||
|
||
@Override | ||
public List<Pos2d> getItemOutputPositions(int itemOutputCount) { | ||
return Collections.singletonList(new Pos2d(142, 8)); | ||
} | ||
|
||
@Override | ||
public List<Pos2d> getFluidInputPositions(int fluidInputCount) { | ||
|
||
return UIHelper.getGridPositions(fluidInputCount, 88, 26, 4); | ||
} | ||
|
||
@Override | ||
public void addGregTechLogo(ModularWindow.Builder builder, Pos2d windowOffset) {} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/goodgenerator/api/recipe/ExtremeHeatExchangerBackend.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,25 @@ | ||
package goodgenerator.api.recipe; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; | ||
|
||
import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; | ||
import gregtech.api.recipe.maps.FuelBackend; | ||
import gregtech.api.util.GT_Recipe; | ||
import gregtech.api.util.MethodsReturnNonnullByDefault; | ||
|
||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
public class ExtremeHeatExchangerBackend extends FuelBackend { | ||
|
||
public ExtremeHeatExchangerBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) { | ||
super(propertiesBuilder); | ||
} | ||
|
||
@Override | ||
public GT_Recipe compileRecipe(GT_Recipe recipe) { | ||
if (!(recipe instanceof ExtremeHeatExchangerRecipe)) { | ||
throw new RuntimeException("Recipe must be instance of ExtremeHeatExchangerRecipe"); | ||
} | ||
return super.compileRecipe(recipe); | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
src/main/java/goodgenerator/api/recipe/ExtremeHeatExchangerFrontend.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.List; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; | ||
|
||
import net.minecraft.util.StatCollector; | ||
import net.minecraftforge.fluids.FluidStack; | ||
|
||
import com.gtnewhorizons.modularui.api.math.Pos2d; | ||
|
||
import gregtech.api.recipe.BasicUIPropertiesBuilder; | ||
import gregtech.api.recipe.NEIRecipePropertiesBuilder; | ||
import gregtech.api.recipe.RecipeMapFrontend; | ||
import gregtech.api.util.GT_Utility; | ||
import gregtech.api.util.MethodsReturnNonnullByDefault; | ||
import gregtech.nei.RecipeDisplayInfo; | ||
import gregtech.nei.formatter.INEISpecialInfoFormatter; | ||
|
||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
public class ExtremeHeatExchangerFrontend extends RecipeMapFrontend { | ||
|
||
public ExtremeHeatExchangerFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, | ||
NEIRecipePropertiesBuilder neiPropertiesBuilder) { | ||
super(uiPropertiesBuilder, neiPropertiesBuilder.neiSpecialInfoFormatter(new EHESpecialValueFormatter())); | ||
} | ||
|
||
@Override | ||
public List<Pos2d> getFluidInputPositions(int fluidInputCount) { | ||
return Arrays.asList(new Pos2d(26, 13), new Pos2d(26, 37)); | ||
} | ||
|
||
@Override | ||
public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { | ||
return Arrays.asList(new Pos2d(128, 13), new Pos2d(128, 31), new Pos2d(128, 54)); | ||
} | ||
|
||
private static class EHESpecialValueFormatter implements INEISpecialInfoFormatter { | ||
|
||
@Override | ||
public List<String> format(RecipeDisplayInfo recipeInfo) { | ||
FluidStack[] Inputs = recipeInfo.recipe.mFluidInputs; | ||
FluidStack[] Outputs = recipeInfo.recipe.mFluidOutputs; | ||
int threshold = recipeInfo.recipe.mSpecialValue; | ||
return Arrays.asList( | ||
StatCollector.translateToLocal("value.extreme_heat_exchanger.0") + " " | ||
+ GT_Utility.formatNumbers(Inputs[0].amount) | ||
+ " L/s", | ||
StatCollector.translateToLocal("value.extreme_heat_exchanger.1"), | ||
GT_Utility.formatNumbers(Outputs[0].amount / 160) + " L/s", | ||
StatCollector.translateToLocal("value.extreme_heat_exchanger.2"), | ||
GT_Utility.formatNumbers(Outputs[1].amount / 160) + " L/s", | ||
StatCollector.translateToLocal("value.extreme_heat_exchanger.4") + " " + threshold + " L/s"); | ||
} | ||
} | ||
} |
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(); | ||
} |
Oops, something went wrong.