Skip to content

Commit

Permalink
Making Plasma Arc Furnace more useful (#3357)
Browse files Browse the repository at this point in the history
  • Loading branch information
StaffiX authored Dec 13, 2024
1 parent 35495c2 commit fa1a907
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/main/java/gregtech/api/recipe/RecipeCategories.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public final class RecipeCategories {
builder -> builder.setDisplayImage(
createIcon(GregTech.getResourcePath("textures", "gui", "picture", "arc_furnace_recycling.png"))));

public static final RecipeCategory plasmaArcFurnaceRecycling = new RecipeCategory(
"gt.recipe.category.plasma_arc_furnace_recycling",
RecipeMaps.plasmaArcFurnaceRecipes,
() -> Client.nei.recipeCategories.plasmaArcFurnaceRecycling,
builder -> builder.setDisplayImage(
createIcon(GregTech.getResourcePath("textures", "gui", "picture", "plasma_arc_furnace_recycling.png"))));

public static final RecipeCategory maceratorRecycling = new RecipeCategory(
"gt.recipe.category.macerator_recycling",
RecipeMaps.maceratorRecipes,
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/gregtech/api/util/GTRecipeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,20 @@ public class GTRecipeConstants {
if (aDuration <= 0) {
return Collections.emptyList();
}
builder.duration(aDuration);
boolean recycle = builder.getMetadataOrDefault(RECYCLE, false);
Collection<GTRecipe> ret = new ArrayList<>();
for (Materials mat : new Materials[] { Materials.Argon, Materials.Nitrogen }) {
int tPlasmaAmount = (int) Math.max(1L, aDuration / (mat.getMass() * 16L));
builder.duration(Math.max(1, mat == Materials.Nitrogen ? aDuration / 4 : aDuration / 24));
int tPlasmaAmount = (int) Math.min(1L, aDuration / (mat.getMass() * 16L));
GTRecipeBuilder plasmaBuilder = builder.copy()
.fluidInputs(mat.getPlasma(tPlasmaAmount))
.fluidOutputs(mat.getGas(tPlasmaAmount));
if (recycle) {
plasmaBuilder.recipeCategory(RecipeCategories.plasmaArcFurnaceRecycling);
continue;
}
ret.addAll(RecipeMaps.plasmaArcFurnaceRecipes.doAdd(plasmaBuilder));
}
builder.duration(aDuration);
GTRecipeBuilder arcBuilder = builder.copy()
.fluidInputs(Materials.Oxygen.getGas(aDuration));
if (recycle) {
Expand All @@ -264,7 +265,6 @@ public class GTRecipeConstants {
ret.addAll(RecipeMaps.arcFurnaceRecipes.doAdd(arcBuilder));
return ret;
});

/**
* Add a chemical reactor recipe to both LCR and singleblocks.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/gregtech/common/config/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ public static class RecipeCategories {
@Config.DefaultEnum("ENABLE")
public RecipeCategorySetting arcFurnaceRecycling = ENABLE;

@Config.LangKey("gt.recipe.category.plasma_arc_furnace_recycling")
@Config.DefaultEnum("ENABLE")
public RecipeCategorySetting plasmaArcFurnaceRecycling = ENABLE;

@Config.LangKey("gt.recipe.category.macerator_recycling")
@Config.DefaultEnum("ENABLE")
public RecipeCategorySetting maceratorRecycling = ENABLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType(getMachineType())
.addInfo("250% faster than using single block machines of the same voltage")
.addInfo("Processes 8 * voltage tier * W items")
.addInfo("Processes voltage tier * W items in Electric mode or 8 * voltage tier * W items in Plasma mode")
.addInfo("Right-click controller with a Screwdriver to change modes")
.addInfo("Max Size required to process Plasma recipes")
.addPollutionAmount(getPollutionPerSecond(null))
Expand Down Expand Up @@ -250,7 +250,7 @@ protected ProcessingLogic createProcessingLogic() {

@Override
public int getMaxParallelRecipes() {
return (this.mSize * 8 * GTUtility.getTier(this.getMaxInputVoltage()));
return (this.mSize * (mPlasmaMode ? 8 : 1) * GTUtility.getTier(this.getMaxInputVoltage()));
}

@Override
Expand Down
Binary file not shown.

0 comments on commit fa1a907

Please sign in to comment.