diff options
author | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2022-09-22 04:30:47 +0100 |
---|---|---|
committer | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2022-09-22 04:30:47 +0100 |
commit | 2bfff2a05994be7a9fedde2d9bcd8df0ae3e1b8b (patch) | |
tree | add3e4254a1b894a4132195cc0fa2d03ad49cdf8 /src/main/java | |
parent | 1ca1efc4a320c7bda7e62f4e9157ecd2827c6615 (diff) | |
download | GT5-Unofficial-2bfff2a05994be7a9fedde2d9bcd8df0ae3e1b8b.tar.gz GT5-Unofficial-2bfff2a05994be7a9fedde2d9bcd8df0ae3e1b8b.tar.bz2 GT5-Unofficial-2bfff2a05994be7a9fedde2d9bcd8df0ae3e1b8b.zip |
Custom recipe system
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java | 89 | ||||
-rw-r--r-- | src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java | 29 |
2 files changed, 118 insertions, 0 deletions
diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java new file mode 100644 index 0000000000..bba253ca48 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -0,0 +1,89 @@ +package com.github.technus.tectech.recipe; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.List; + +public class EyeOfHarmonyRecipe { + + private final List<Pair<ItemStack, Long>> output_items; + private final FluidStack[] output_fluids; + + private long hydrogen_requirement = Long.MAX_VALUE; + private long helium_requirement = Long.MAX_VALUE; + + private long eu_output = 0; + private long eu_start_cost = Long.MAX_VALUE; + + private long recipe_processing_time_in_ticks = Long.MAX_VALUE; + + private double success_chance = 0; + + private long spacetime_casing_tier_required = Long.MAX_VALUE; + + public EyeOfHarmonyRecipe(List<Pair<ItemStack, Long>> _output_items, + FluidStack[] _output_fluids, + long _hydrogen_requirement, + long _helium_requirement, + long _eu_output, + long _eu_start_cost, + long _recipe_processing_time_in_ticks, + double _success_chance, + long _spacetime_casing_tier_required) { + + output_items = _output_items; + output_fluids = _output_fluids; + + hydrogen_requirement = _hydrogen_requirement; + helium_requirement = _helium_requirement; + + eu_output = _eu_output; + eu_start_cost = _eu_start_cost; + + recipe_processing_time_in_ticks = _recipe_processing_time_in_ticks; + + success_chance = _success_chance; + + // 0 - 7; + spacetime_casing_tier_required = _spacetime_casing_tier_required; + } + + public List<Pair<ItemStack, Long>> getOutputItems() { + return output_items; + } + + public FluidStack[] getOutputFluids() { + return output_fluids.clone(); + } + + public long getHydrogenRequirement() { + return hydrogen_requirement; + } + + public long getHeliumRequirement() { + return helium_requirement; + } + + public long getEUOutput() { + return eu_output; + } + + public long getEUStartCost() { + return eu_start_cost; + } + + public long getRecipeTime() { + return recipe_processing_time_in_ticks; + } + + public double getBaseRecipeSuccessChance() { + return success_chance; + } + + public long getSpacetimeCasingTierRequired() { + return spacetime_casing_tier_required; + } +} + diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java new file mode 100644 index 0000000000..72b67a2dd9 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java @@ -0,0 +1,29 @@ +package com.github.technus.tectech.recipe; + +import gregtech.api.enums.Materials; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public abstract class EyeOfHarmonyRecipeStorage { + + public static EyeOfHarmonyRecipe recipe_0 = new EyeOfHarmonyRecipe( + Stream.of( + Pair.of(Materials.CosmicNeutronium.getDust(1), 100L), + Pair.of(Materials.Tin.getDust(1), 100L), + Pair.of(Materials.Iron.getDust(1), 100L)).collect(Collectors.toList()), + new FluidStack[] { + Materials.Iron.getPlasma(423_414_412), + Materials.Boron.getPlasma(32_314_391), + }, + 10_000_000L, + 10_000_000L, + 1_000_000_000_000L, + 1_000_000_000L, + 500, + 0.40, + 1 + ); +} |