Skip to content

Commit

Permalink
threads
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Sep 17, 2023
1 parent 9a17798 commit 99a2e73
Show file tree
Hide file tree
Showing 8 changed files with 544 additions and 278 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@

public interface TechThread {
List<TechThread> THREADS = List.of(
new AndesiteThread(), new BrassThread(), new CopperThread(),
new ZincThread(), new ObsidianThread(), new InvarThread(),
new EnderiumThread(), new FluixThread(), new MathThread()
new AndesiteThread(),
new BrassThread(),
new CopperThread(),
new ZincThread(),
new ObsidianThread(),
new InvarThread(),
new EnderiumThread(),
new FluixThread(),
new MathThread()
);

default void addRecipes(AddRecipesCallback.RecipeHandler handler) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.CookingCategory;
import net.minecraft.recipe.Ingredient;
import net.minecraft.tag.ItemTags;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
Expand All @@ -34,44 +35,75 @@
public class CopperThread implements TechThread {
@Override
public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) {
handler.register(recipeId("crafting", "belt_connector"),
id -> VanillaRecipeBuilders.shapedRecipe("XXX", "XXX")
handler.register(
recipeId("crafting", "belt_connector"),
id -> VanillaRecipeBuilders
.shapedRecipe("XXX", "XXX")
.ingredient('X', CabfItems.CURED_RUBBER)
.output(new ItemStack(CR.asItem("belt_connector"), 3)).build(id, ""));
.output(new ItemStack(CR.asItem("belt_connector"), 3))
.build(id, "")
);

handler.register(recipeId("smelting", "cured_rubber"),
id -> VanillaRecipeBuilders.smeltingRecipe(id, "",
handler.register(
recipeId("smelting", "cured_rubber"),
id -> VanillaRecipeBuilders.smeltingRecipe(
id, "",
Ingredient.ofItems(CabfItems.RUBBER),
CabfItems.CURED_RUBBER.getDefaultStack(), 0.1F, 120));
CookingCategory.MISC,
CabfItems.CURED_RUBBER.getDefaultStack(),
0.1F, 120
)
);

handler.register(recipeId("crafting", "sealed_mechanism"),
id -> VanillaRecipeBuilders.shapedRecipe("XOX")
handler.register(
recipeId("crafting", "sealed_mechanism"),
id -> VanillaRecipeBuilders
.shapedRecipe("XOX")
.ingredient('X', Ingredient.ofItems(CabfItems.CURED_RUBBER))
.ingredient('O', Ingredient.ofItems(CABF.asItem("kinetic_mechanism")))
.output(CABF.asItem("sealed_mechanism").getDefaultStack()).build(id, ""));
.output(CABF.asItem("sealed_mechanism").getDefaultStack())
.build(id, "")
);

handler.register(recipeId("crafting", "copper_machine"),
id -> RecipeBuilderUtil.donutRecipe(id, CR.asItem("copper_casing"),
CABF.asItem("sealed_mechanism"), CABF.asItem("copper_machine"), 1));
handler.register(
recipeId("crafting", "copper_machine"),
id -> RecipeBuilderUtil.donutRecipe(
id,
CR.asItem("copper_casing"),
CABF.asItem("sealed_mechanism"),
CABF.asItem("copper_machine"),
1
)
);

handler.register(recipeId("compacting", "rubber"),
handler.register(
recipeId("compacting", "rubber"),
id -> new CompactingRecipe(new FreePRP(id)
.setFluidIngredient(FluidIngredient.fromFluid(CabfFluids.RESIN, FluidConstants.BOTTLE))
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1))));
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1)))
);

handler.register(recipeId("compacting", "rubber_from_flower"),
handler.register(
recipeId("compacting", "rubber_from_flower"),
id -> new CompactingRecipe(new FreePRP(id)
.setFluidIngredient(FluidIngredient.fromFluid(Fluids.WATER, FluidConstants.BOTTLE))
.setIngredient(Ingredient.ofTag(ItemTags.FLOWERS), Ingredient.ofTag(ItemTags.FLOWERS),
Ingredient.ofTag(ItemTags.FLOWERS), Ingredient.ofTag(ItemTags.FLOWERS))
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1))));
.setIngredient(
Ingredient.ofTag(ItemTags.FLOWERS), Ingredient.ofTag(ItemTags.FLOWERS),
Ingredient.ofTag(ItemTags.FLOWERS), Ingredient.ofTag(ItemTags.FLOWERS)
)
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1)))
);

handler.register(recipeId("compacting", "rubber_from_vine"),
handler.register(
recipeId("compacting", "rubber_from_vine"),
id -> new CompactingRecipe(new FreePRP(id)
.setFluidIngredient(FluidIngredient.fromFluid(Fluids.WATER, FluidConstants.BOTTLE))
.setIngredient(Ingredient.ofItems(Items.VINE), Ingredient.ofItems(Items.VINE),
Ingredient.ofItems(Items.VINE), Ingredient.ofItems(Items.VINE))
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1))));
.setIngredient(
Ingredient.ofItems(Items.VINE), Ingredient.ofItems(Items.VINE),
Ingredient.ofItems(Items.VINE), Ingredient.ofItems(Items.VINE)
)
.setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1)))
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,32 @@ public void load() {

@Override
public void addRecipes(AddRecipesCallback.RecipeHandler handler) {
handler.register(recipeId("crafting", "enderium_machine"),
id -> VanillaRecipeBuilders.shapedRecipe("SSS", "SCS", "SSS")
handler.register(
recipeId("crafting", "enderium_machine"),
id -> VanillaRecipeBuilders
.shapedRecipe("SSS", "SCS", "SSS")
.ingredient('S', CABF.asIngredient("abstruse_mechanism"))
.ingredient('C', CABF.asIngredient("enderium_casing"))
.output(CABF.asStack("enderium_machine")).build(id, ""));
.output(CABF.asStack("enderium_machine"))
.build(id, "")
);

handler.register(recipeId("melting", "dark_amaranth_fungus"),
id -> RecipeManager.deserialize(id,
RecipeBuilderUtil.generateMelting(PM.id("dark_amaranth_fungus"),
TC.id("ender_slime"), FluidConstants.BOTTLE, null, 0, 100, 10)));
handler.register(
recipeId("melting", "dark_amaranth_fungus"),
id -> RecipeManager.deserialize(id, RecipeBuilderUtil.generateMelting(
PM.id("dark_amaranth_fungus"),
TC.id("ender_slime"),
FluidConstants.BOTTLE,
null, 0, 100, 10
))
);

handler.register(recipeId("item_application", "enderium_casing"),
handler.register(
recipeId("item_application", "enderium_casing"),
id -> new ManualApplicationRecipe(new FreePRP(id)
.setIngredient(MC.asIngredient("obsidian"), CABF.asIngredient("enderium_ingot"))
.setResult(CABF.asProcessingOutput("enderium_casing"))));
.setResult(CABF.asProcessingOutput("enderium_casing")))
);
}

@Override
Expand Down
Loading

0 comments on commit 99a2e73

Please sign in to comment.