This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed roaster recipe, added recipes to make uu matter and scrap
- Loading branch information
Showing
6 changed files
with
45 additions
and
3 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
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
40 changes: 40 additions & 0 deletions
40
common/src/main/java/muramasa/gregtech/loader/machines/UUMatter.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,40 @@ | ||
package muramasa.gregtech.loader.machines; | ||
|
||
import muramasa.antimatter.AntimatterAPI; | ||
import muramasa.antimatter.Ref; | ||
import muramasa.antimatter.data.AntimatterMaterialTypes; | ||
import muramasa.antimatter.material.Material; | ||
import muramasa.antimatter.material.MaterialTypeFluid; | ||
import muramasa.antimatter.material.MaterialTypeItem; | ||
import muramasa.antimatter.recipe.ingredient.RecipeIngredient; | ||
import muramasa.gregtech.data.GregTechData; | ||
import muramasa.gregtech.data.Materials; | ||
import muramasa.gregtech.data.RecipeMaps; | ||
import tesseract.TesseractGraphWrappers; | ||
|
||
import static muramasa.antimatter.data.AntimatterMaterialTypes.BLOCK; | ||
import static muramasa.antimatter.material.MaterialTags.MOLTEN; | ||
import static muramasa.gregtech.data.Materials.UUAmplifier; | ||
import static muramasa.gregtech.data.TierMaps.INT_CIRCUITS; | ||
|
||
public class UUMatter { | ||
public static void init(){ | ||
RecipeMaps.MASS_FABRICATING.RB().fi(UUAmplifier.getLiquid(1)).fo(Materials.UUMatter.getLiquid(1)).add("uu_matter", 803, 256); | ||
RecipeMaps.MASS_FABRICATING.RB().ii(INT_CIRCUITS.get(0)).fo(Materials.UUMatter.getLiquid(1)).add("uu_matter_expensive", 3215, 256); | ||
RecipeMaps.AMP_FABRICATING.RB().ii(RecipeIngredient.of(GregTechData.Scrap, 9)).fo(UUAmplifier.getLiquid(1)).add("uu_amplifier", 180, 32); | ||
AntimatterAPI.all(Material.class).stream().filter(m -> m.getElement() != null).forEach(m -> { | ||
int multiplier = m == Materials.Silicon || m == Materials.Oxygen ? 1 : 2; | ||
m.getTypes().forEach(t -> { | ||
if (t instanceof MaterialTypeFluid<?> fluid && fluid.get() instanceof MaterialTypeFluid.IFluidGetter fluidGetter){ | ||
long fluidAmount = m.has(MOLTEN) ? Ref.L : 1000 * TesseractGraphWrappers.dropletMultiplier; | ||
RecipeMaps.RECYCLING.RB().fi(fluidGetter.get(m, fluidAmount)).io(GregTechData.Scrap).chances(500 * multiplier).add("scrap_from_" + m.getId() + "_" + t.getId(), 100, 2); | ||
} else if (t == BLOCK){ | ||
RecipeMaps.RECYCLING.RB().ii(BLOCK.getMaterialIngredient(m, 1)).io(GregTechData.Scrap).chances(4500 * multiplier).add("scrap_from_" + m.getId() + "_block", 100, 2); | ||
} else if (t instanceof MaterialTypeItem<?> item){ | ||
long chance = (500 * t.getUnitValue()) / Ref.U; | ||
RecipeMaps.RECYCLING.RB().ii(t.getMaterialIngredient(m, 1)).io(GregTechData.Scrap).chances(Math.min(10000, (int)chance) * multiplier).add("scrap_from_" + m.getId() + "_" + t.getId(), 100, 2); | ||
} | ||
}); | ||
}); | ||
} | ||
} |