Skip to content

Recycling Recipes#292

Merged
serenibyss merged 13 commits intomasterfrom
recycling-recipes
Dec 11, 2021
Merged

Recycling Recipes#292
serenibyss merged 13 commits intomasterfrom
recycling-recipes

Conversation

@serenibyss
Copy link
Copy Markdown
Member

No description provided.


private static void splitStacks(List<Tuple<ItemStack, MaterialStack>> list, ItemStack originalStack, UnificationEntry entry) {
int amount = originalStack.getCount();
while (amount > 64) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could cause problems, but since we are pretty much only using a permutation of a Dust or Ingot, the stack size should be consistently 64

}

// Else if the Material has NO_SMELTING, return nothing
if (material.hasFlag(NO_SMELTING)) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents things like Brick Dust and Stone Dust from being output in the process

public static void init() {
initializeArcRecyclingRecipes();
}
// TODO - Fix recipe order with some things (noticed Hermetic Casings)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be addressed, but there might be an edge case still. Loading order is important for some recipes now, as if a later recipe uses an input (say, Steam Oven using Bronze Casings), unification data could be wrong

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not noticed issues with the Hermetic Casings when I check

initializeArcRecyclingRecipes();
}
// TODO - Fix recipe order with some things (noticed Hermetic Casings)
// TODO - Figure out solution to LuV+ components
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed, and will be in a later PR

// TODO - Fix recipe order with some things (noticed Hermetic Casings)
// TODO - Figure out solution to LuV+ components
// TODO - (to remember) Do NOT calculate any material component lists for circuits, they are simply totally lost
// TODO - Work on durations and EUt's
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The durations are resolved, though EU/t's may be too high for some recipes

Comment on lines +86 to +119
OreDictUnifier.registerOre(MetaTileEntities.HULL[0].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.WroughtIron, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Lead, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[1].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.Steel, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Tin, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[2].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.Aluminium, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Copper, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[3].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.StainlessSteel, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Gold, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[4].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.Titanium, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Aluminium, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[5].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.TungstenSteel, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Tungsten, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[6].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.RhodiumPlatedPalladium, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.VanadiumGallium, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[7].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.NaquadahAlloy, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.Naquadah, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[8].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.Livermorium, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.NaquadahAlloy, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

OreDictUnifier.registerOre(MetaTileEntities.HULL[14].getStackForm(), new ItemMaterialInfo(
new MaterialStack(Materials.Neutronium, OrePrefix.plate.materialAmount * 8),
new MaterialStack(Materials.RutheniumTriniumAmericiumNeutronate, OrePrefix.cableGtSingle.materialAmount * 2),
new MaterialStack(Materials.Rubber, OrePrefix.plate.materialAmount * 2)));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These had to be done separately since the handcrafting recipe is more resource-expensive than the Assembler recipe, leading to potential dupes. If we add a method onto RecipeBuilder to calculate unification data, these can be removed (as can the entries for EBF coils)

Copy link
Copy Markdown
Contributor

@ALongStringOfNumbers ALongStringOfNumbers Dec 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick that should not really matter. These should use the proper assembler fluid materials, instead of all just using rubber. Edit: Never mind this comment. But also, the MAX hull should not have the rubber component, because it uses superconductor wires

* Returns an Ingot of the material if it exists. Otherwise it returns a Dust.
* Returns ItemStack.EMPTY if neither exist.
*/
public static ItemStack getIngotOrDust(Material material, long materialAmount) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to not return an ItemStack.EMPTY for some Arc Furnace recipes (Ash, in particular)

Comment thread src/main/java/gregtech/api/unification/ore/OrePrefix.java Outdated
Comment thread src/main/java/gregtech/api/recipes/ModHandler.java Outdated
Comment thread src/main/java/gregtech/api/recipes/ModHandler.java
Comment thread src/main/java/gregtech/api/recipes/ModHandler.java
Comment thread src/main/java/gregtech/api/recipes/ModHandler.java
Copy link
Copy Markdown
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magnetic Materials Arc smelt into their non-magnetic form, but macerate into the magnetic dust. Is this intended?

Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment thread src/main/java/gregtech/loaders/recipe/RecyclingRecipes.java Outdated
Comment on lines +308 to +310
public static ItemStack getIngotOrDust(MaterialStack materialStack) {
return getIngotOrDust(materialStack.material, materialStack.amount);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this method, when anything that can call this method can automatically call the method's redirect, as it has access to the materialStack.amount and materialStack.material already. This seems like a useless method

Copy link
Copy Markdown
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my minor comments, this looks good to me

@serenibyss serenibyss merged commit 65e2223 into master Dec 11, 2021
@serenibyss serenibyss deleted the recycling-recipes branch December 11, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants