Merge remote-tracking branch 'Ayutac/1.18-Ayutac-datagen-6' into 1.18

# Conflicts:
#	RebornCore/src/main/java/reborncore/common/misc/TagConvertible.java
#	src/datagen/groovy/techreborn/datagen/recipes/TechRebornRecipesProvider.groovy
#	src/datagen/groovy/techreborn/datagen/recipes/machine/compressor/CompressorRecipesProvider.groovy
#	src/main/java/techreborn/init/TRContent.java
This commit is contained in:
modmuss50 2022-03-02 01:09:27 +00:00
commit 45c1e7412c
667 changed files with 18984 additions and 2246 deletions

View file

@ -34,15 +34,14 @@ import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeSerializer; import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import reborncore.RebornCore;
import reborncore.api.recipe.IRecipeCrafterProvider; import reborncore.api.recipe.IRecipeCrafterProvider;
import reborncore.common.crafting.ingredient.RebornIngredient; import reborncore.common.crafting.ingredient.RebornIngredient;
import reborncore.common.util.DefaultedListCollector; import reborncore.common.util.DefaultedListCollector;
import java.util.ArrayList; import java.util.*;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public class RebornRecipe implements Recipe<Inventory>, CustomOutputRecipe { public class RebornRecipe implements Recipe<Inventory>, CustomOutputRecipe {
private final RebornRecipeType<?> type; private final RebornRecipeType<?> type;
@ -62,6 +61,16 @@ public class RebornRecipe implements Recipe<Inventory>, CustomOutputRecipe {
this.time = time; this.time = time;
} }
@Override
public ItemStack createIcon() {
Optional<Item> catalyst = Registry.ITEM.getOrEmpty(type.name());
if (catalyst.isPresent())
return new ItemStack(catalyst.get());
else
RebornCore.LOGGER.warn("Missing toast icon for {}!", type.name());
return Recipe.super.createIcon();
}
@Override @Override
public Identifier getId() { public Identifier getId() {
return name; return name;
@ -166,7 +175,7 @@ public class RebornRecipe implements Recipe<Inventory>, CustomOutputRecipe {
// Done to try and stop the table from loading it // Done to try and stop the table from loading it
@Override @Override
public boolean isIgnoredInRecipeBook() { public boolean isIgnoredInRecipeBook() {
return true; return false;
} }
@Override @Override

View file

@ -28,6 +28,10 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.mojang.serialization.Dynamic; import com.mojang.serialization.Dynamic;
import com.mojang.serialization.JsonOps; import com.mojang.serialization.JsonOps;
import net.minecraft.advancement.Advancement;
import net.minecraft.advancement.AdvancementRewards;
import net.minecraft.advancement.CriterionMerger;
import net.minecraft.advancement.criterion.RecipeUnlockedCriterion;
import net.minecraft.inventory.Inventory; import net.minecraft.inventory.Inventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -40,12 +44,14 @@ import net.minecraft.util.JsonHelper;
import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;
import reborncore.common.util.DefaultedListCollector; import reborncore.common.util.DefaultedListCollector;
import reborncore.common.util.serialization.SerializationUtil; import reborncore.common.util.serialization.SerializationUtil;
import reborncore.mixin.common.AccessorRecipeManager; import reborncore.mixin.common.AccessorRecipeManager;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Objects;
public class RecipeUtils { public class RecipeUtils {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -82,4 +88,24 @@ public class RecipeUtils {
return stack; return stack;
} }
/**
* Adds the following toast/recipe defaults to an advancement builder:
* <ul>
* <li>parent as "recipes/root"</li>
* <li>criterion "has_the_recipe" via OR</li>
* <li>reward: the specified recipe</li>
* </ul>
* @param builder the advancement task builder to expand
* @param recipeId the ID of the recipe
* @throws NullPointerException If any parameter refers to <code>null</code>.
*/
public static void addToastDefaults(@NotNull Advancement.Builder builder, @NotNull Identifier recipeId) {
Objects.requireNonNull(builder);
Objects.requireNonNull(recipeId);
builder.parent(new Identifier("recipes/root"))
.criterion("has_the_recipe", RecipeUnlockedCriterion.create(recipeId))
.rewards(AdvancementRewards.Builder.recipe(recipeId))
.criteriaMerger(CriterionMerger.OR);
}
} }

View file

@ -40,7 +40,7 @@ public final class FluidValue {
private final long rawValue; private final long rawValue;
private static FluidValue fromMillibuckets(long millibuckets) { public static FluidValue fromMillibuckets(long millibuckets) {
return new FluidValue(millibuckets * 81); return new FluidValue(millibuckets * 81);
} }

View file

@ -27,6 +27,7 @@ package reborncore.common.misc;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.tag.TagKey; import net.minecraft.tag.TagKey;
import org.jetbrains.annotations.Contract;
/** /**
* Tells if an item, block etc. has a tag solely for compatibility with other mods. * Tells if an item, block etc. has a tag solely for compatibility with other mods.
@ -43,4 +44,16 @@ public interface TagConvertible<T> {
*/ */
TagKey<T> asTag(); TagKey<T> asTag();
/**
* Converts a given object into its tag form if the item is a {@link TagConvertible}.
* @param obj the object to convert
* @return The tag of the object or the object itself if it is not a {@link TagConvertible}.
*/
@Contract("null -> null")
static Object convertIf(Object obj) {
if (obj instanceof TagConvertible<?> convertible)
return convertible.asTag();
return obj;
}
} }

View file

@ -26,7 +26,10 @@ package techreborn.datagen
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import techreborn.datagen.recipes.machine.blast_furnace.BlastFurnaceRecipesProvider
import techreborn.datagen.recipes.machine.compressor.CompressorRecipesProvider
import techreborn.datagen.recipes.machine.grinder.GrinderRecipesProvider import techreborn.datagen.recipes.machine.grinder.GrinderRecipesProvider
import techreborn.datagen.recipes.machine.industrial_sawmill.IndustrialSawmillRecipesProvider
import techreborn.datagen.recipes.smelting.SmeltingRecipesProvider import techreborn.datagen.recipes.smelting.SmeltingRecipesProvider
import techreborn.datagen.recipes.crafting.CraftingRecipesProvider import techreborn.datagen.recipes.crafting.CraftingRecipesProvider
import techreborn.datagen.tags.TRBlockTagProvider import techreborn.datagen.tags.TRBlockTagProvider
@ -45,5 +48,8 @@ class TechRebornDataGen implements DataGeneratorEntrypoint {
fabricDataGenerator.addProvider(CraftingRecipesProvider.&new) fabricDataGenerator.addProvider(CraftingRecipesProvider.&new)
fabricDataGenerator.addProvider(GrinderRecipesProvider.&new) fabricDataGenerator.addProvider(GrinderRecipesProvider.&new)
fabricDataGenerator.addProvider(CompressorRecipesProvider.&new)
fabricDataGenerator.addProvider(BlastFurnaceRecipesProvider.&new)
fabricDataGenerator.addProvider(IndustrialSawmillRecipesProvider.&new)
} }
} }

View file

@ -69,7 +69,7 @@ abstract class TechRebornRecipesProvider extends FabricRecipeProvider {
if (input instanceof ItemConvertible) { if (input instanceof ItemConvertible) {
return hasItem(input) return hasItem(input)
} else if (input instanceof TagKey) { } else if (input instanceof TagKey) {
return "has_tag_" + input.id() return "has_tag_" + input.id().toUnderscoreSeparatedString()
} }
throw new IllegalArgumentException() throw new IllegalArgumentException()
@ -127,6 +127,10 @@ abstract class TechRebornRecipesProvider extends FabricRecipeProvider {
MachineRecipeJsonFactory.create(ModRecipes.GRINDER, closure).offerTo(exporter) MachineRecipeJsonFactory.create(ModRecipes.GRINDER, closure).offerTo(exporter)
} }
def offerCompressorRecipe(@DelegatesTo(value = MachineRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
MachineRecipeJsonFactory.create(ModRecipes.COMPRESSOR, closure).offerTo(exporter)
}
@Override @Override
protected Identifier getRecipeIdentifier(Identifier identifier) { protected Identifier getRecipeIdentifier(Identifier identifier) {
return new Identifier("techreborn", super.getRecipeIdentifier(identifier).path) return new Identifier("techreborn", super.getRecipeIdentifier(identifier).path)

View file

@ -52,8 +52,8 @@ class IngredientBuilder {
return new TagIngredient(tag, getCount()) return new TagIngredient(tag, getCount())
} }
if (!stacks.isEmpty()) { if (stacks.size() == 1) {
return new StackIngredient(stacks, getCount(), Optional.empty(), false) return new StackIngredient(stacks.get(0), getCount(), Optional.empty(), false)
} }
throw new IllegalStateException() throw new IllegalStateException()

View file

@ -25,6 +25,8 @@
package techreborn.datagen.recipes.machine package techreborn.datagen.recipes.machine
import com.google.gson.JsonObject import com.google.gson.JsonObject
import net.minecraft.advancement.Advancement.Builder
import net.minecraft.advancement.criterion.CriterionConditions
import net.minecraft.data.server.recipe.RecipeJsonProvider import net.minecraft.data.server.recipe.RecipeJsonProvider
import net.minecraft.item.ItemConvertible import net.minecraft.item.ItemConvertible
import net.minecraft.item.ItemStack import net.minecraft.item.ItemStack
@ -32,20 +34,24 @@ import net.minecraft.recipe.RecipeSerializer
import net.minecraft.tag.TagKey import net.minecraft.tag.TagKey
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
import net.minecraft.util.registry.Registry import net.minecraft.util.registry.Registry
import org.jetbrains.annotations.NotNull
import reborncore.common.crafting.RebornRecipe import reborncore.common.crafting.RebornRecipe
import reborncore.common.crafting.RebornRecipeType import reborncore.common.crafting.RebornRecipeType
import reborncore.common.crafting.RecipeUtils
import reborncore.common.crafting.ingredient.RebornIngredient import reborncore.common.crafting.ingredient.RebornIngredient
import java.util.function.Consumer import java.util.function.Consumer
class MachineRecipeJsonFactory<R extends RebornRecipe> { class MachineRecipeJsonFactory<R extends RebornRecipe> {
private final RebornRecipeType<R> type protected final RebornRecipeType<R> type
protected final Builder builder = Builder.create()
private final List<RebornIngredient> ingredients = new ArrayList<>() protected final List<RebornIngredient> ingredients = new ArrayList<>()
private final List<ItemStack> outputs = new ArrayList<>() protected final List<ItemStack> outputs = new ArrayList<>()
private int power = -1 protected int power = -1
private int time = -1 protected int time = -1
private Identifier customId = null protected Identifier customId = null
protected String source = null
protected MachineRecipeJsonFactory(RebornRecipeType<R> type) { protected MachineRecipeJsonFactory(RebornRecipeType<R> type) {
this.type = type this.type = type
@ -120,6 +126,17 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
return this return this
} }
def source(String s) {
this.source = s
return this
}
@NotNull String getSourceAppendix() {
if (source == null)
return ""
return "_from_" + source
}
MachineRecipeJsonFactory id(String path) { MachineRecipeJsonFactory id(String path) {
return id(new Identifier("techreborn", path)) return id(new Identifier("techreborn", path))
} }
@ -149,9 +166,17 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
} }
} }
MachineRecipeJsonFactory<R> criterion(String string, CriterionConditions criterionConditions) {
builder.criterion(string, criterionConditions)
return this
}
void offerTo(Consumer<RecipeJsonProvider> exporter) { void offerTo(Consumer<RecipeJsonProvider> exporter) {
validate() validate()
exporter.accept(new MachineRecipeJsonProvider<R>(type, createRecipe(getIdentifier()))) Identifier recipeId = getIdentifier()
Identifier advancementId = new Identifier(recipeId.getNamespace(), "recipes/" + recipeId.getPath())
RecipeUtils.addToastDefaults(builder, recipeId)
exporter.accept(new MachineRecipeJsonProvider<R>(type, createRecipe(recipeId), advancementId, builder))
} }
def getIdentifier() { def getIdentifier() {
@ -163,21 +188,21 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
throw new IllegalStateException("Recipe has no outputs") throw new IllegalStateException("Recipe has no outputs")
} }
if (outputs.size() > 1) {
throw new IllegalStateException("Cannot compute default identifier for a recipe with more than one output. TODO might want to improve this?")
}
def outputId = Registry.ITEM.getId(outputs[0].item) def outputId = Registry.ITEM.getId(outputs[0].item)
return new Identifier("techreborn", "${type.name().path}/${outputId.path}") return new Identifier("techreborn", "${type.name().path}/${outputId.path}${getSourceAppendix()}")
} }
static class MachineRecipeJsonProvider<R extends RebornRecipe> implements RecipeJsonProvider { static class MachineRecipeJsonProvider<R extends RebornRecipe> implements RecipeJsonProvider {
private final RebornRecipeType<R> type private final RebornRecipeType<R> type
private final R recipe private final R recipe
private final Identifier advancementId
private final Builder builder
MachineRecipeJsonProvider(RebornRecipeType<R> type, R recipe) { MachineRecipeJsonProvider(RebornRecipeType<R> type, R recipe, Identifier advancementId = null, Builder builder = null) {
this.type = type this.type = type
this.recipe = recipe this.recipe = recipe
this.advancementId = advancementId
this.builder = builder
} }
@Override @Override
@ -202,12 +227,14 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
@Override @Override
JsonObject toAdvancementJson() { JsonObject toAdvancementJson() {
if (builder == null)
return null return null
return builder.toJson()
} }
@Override @Override
Identifier getAdvancementId() { Identifier getAdvancementId() {
return null return advancementId
} }
} }
} }

View file

@ -0,0 +1,44 @@
package techreborn.datagen.recipes.machine.blast_furnace
import net.minecraft.util.Identifier
import techreborn.api.recipe.recipes.BlastFurnaceRecipe
import techreborn.datagen.recipes.machine.MachineRecipeJsonFactory
import techreborn.init.ModRecipes
class BlastFurnaceRecipeJsonFactory extends MachineRecipeJsonFactory<BlastFurnaceRecipe> {
private int heat = -1
def heat(int heat) {
this.heat = heat
return this
}
protected BlastFurnaceRecipeJsonFactory() {
super(ModRecipes.BLAST_FURNACE)
}
static BlastFurnaceRecipeJsonFactory create() {
return new BlastFurnaceRecipeJsonFactory()
}
static BlastFurnaceRecipeJsonFactory create(@DelegatesTo(value = BlastFurnaceRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
def factory = new BlastFurnaceRecipeJsonFactory()
closure.setDelegate(factory)
closure.call(factory)
return factory
}
@Override
protected BlastFurnaceRecipe createRecipe(Identifier identifier) {
return new BlastFurnaceRecipe(type, identifier, ingredients, outputs, power, time, heat)
}
@Override
protected void validate() {
super.validate()
if (heat < 0) {
throw new IllegalStateException("recipe has no heat value")
}
}
}

View file

@ -0,0 +1,161 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2020 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.datagen.recipes.machine.blast_furnace
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import reborncore.common.crafting.RebornRecipe
import reborncore.common.crafting.RebornRecipeType
import reborncore.common.misc.TagConvertible
import techreborn.api.recipe.recipes.BlastFurnaceRecipe
import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.datagen.recipes.machine.MachineRecipeJsonFactory
import techreborn.init.ModRecipes
import techreborn.init.TRContent
class BlastFurnaceRecipesProvider extends TechRebornRecipesProvider {
public final int ARMOR_POWER = 128
public final int ARMOR_TIME = 140
public final int ARMOR_HEAT = 1000
BlastFurnaceRecipesProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator)
}
@Override
void generateRecipes() {
generateFromBootsRecipes()
generateFromChestplateRecipes()
generateFromHelmetRecipes()
generateFromLeggingsRecipes()
}
def offerBlastFurnaceRecipe(@DelegatesTo(value = BlastFurnaceRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
BlastFurnaceRecipeJsonFactory.create(closure).offerTo(exporter)
}
void generateFromBootsRecipes() {
final int count = 4
[
(Items.DIAMOND_BOOTS) : new ItemStack(Items.DIAMOND, count),
(Items.GOLDEN_BOOTS) : new ItemStack(Items.GOLD_INGOT, count),
(Items.IRON_BOOTS) : new ItemStack(Items.IRON_INGOT, count),
(TRContent.BRONZE_BOOTS) : new ItemStack(TRContent.Ingots.BRONZE, count),
(TRContent.PERIDOT_BOOTS) : new ItemStack(TRContent.Gems.PERIDOT, count),
(TRContent.RUBY_BOOTS) : new ItemStack(TRContent.Gems.RUBY, count),
(TRContent.SAPPHIRE_BOOTS) : new ItemStack(TRContent.Gems.SAPPHIRE, count),
(TRContent.SILVER_BOOTS) : new ItemStack(TRContent.Ingots.SILVER, count),
(TRContent.STEEL_BOOTS) : new ItemStack(TRContent.Ingots.STEEL, count)
].each {boots, materialStack ->
offerBlastFurnaceRecipe {
ingredients boots, Items.SAND
outputs materialStack, TRContent.Dusts.DARK_ASHES
power ARMOR_POWER
time ARMOR_TIME
heat ARMOR_HEAT
source "boots"
criterion getCriterionName(boots), getCriterionConditions(boots)
}
}
}
void generateFromChestplateRecipes() {
final int count = 8
[
(Items.DIAMOND_CHESTPLATE) : new ItemStack(Items.DIAMOND, count),
(Items.GOLDEN_CHESTPLATE) : new ItemStack(Items.GOLD_INGOT, count),
(Items.IRON_CHESTPLATE) : new ItemStack(Items.IRON_INGOT, count),
(TRContent.BRONZE_CHESTPLATE) : new ItemStack(TRContent.Ingots.BRONZE, count),
(TRContent.PERIDOT_CHESTPLATE) : new ItemStack(TRContent.Gems.PERIDOT, count),
(TRContent.RUBY_CHESTPLATE) : new ItemStack(TRContent.Gems.RUBY, count),
(TRContent.SAPPHIRE_CHESTPLATE) : new ItemStack(TRContent.Gems.SAPPHIRE, count),
(TRContent.SILVER_CHESTPLATE) : new ItemStack(TRContent.Ingots.SILVER, count),
(TRContent.STEEL_CHESTPLATE) : new ItemStack(TRContent.Ingots.STEEL, count)
].each {chestplate, materialStack ->
offerBlastFurnaceRecipe {
ingredients chestplate, Items.SAND
outputs materialStack, TRContent.Dusts.DARK_ASHES
power ARMOR_POWER
time ARMOR_TIME
heat ARMOR_HEAT
source "chestplate"
criterion getCriterionName(chestplate), getCriterionConditions(chestplate)
}
}
}
void generateFromHelmetRecipes() {
final int count = 5
[
(Items.DIAMOND_HELMET) : new ItemStack(Items.DIAMOND, count),
(Items.GOLDEN_HELMET) : new ItemStack(Items.GOLD_INGOT, count),
(Items.IRON_HELMET) : new ItemStack(Items.IRON_INGOT, count),
(TRContent.BRONZE_HELMET) : new ItemStack(TRContent.Ingots.BRONZE, count),
(TRContent.PERIDOT_HELMET) : new ItemStack(TRContent.Gems.PERIDOT, count),
(TRContent.RUBY_HELMET) : new ItemStack(TRContent.Gems.RUBY, count),
(TRContent.SAPPHIRE_HELMET) : new ItemStack(TRContent.Gems.SAPPHIRE, count),
(TRContent.SILVER_HELMET) : new ItemStack(TRContent.Ingots.SILVER, count),
(TRContent.STEEL_HELMET) : new ItemStack(TRContent.Ingots.STEEL, count)
].each {helmet, materialStack ->
offerBlastFurnaceRecipe {
ingredients helmet, Items.SAND
outputs materialStack, TRContent.Dusts.DARK_ASHES
power ARMOR_POWER
time ARMOR_TIME
heat ARMOR_HEAT
source "helmet"
criterion getCriterionName(helmet), getCriterionConditions(helmet)
}
}
}
void generateFromLeggingsRecipes() {
final int count = 7
[
(Items.DIAMOND_LEGGINGS) : new ItemStack(Items.DIAMOND, count),
(Items.GOLDEN_LEGGINGS) : new ItemStack(Items.GOLD_INGOT, count),
(Items.IRON_LEGGINGS) : new ItemStack(Items.IRON_INGOT, count),
(TRContent.BRONZE_LEGGINGS) : new ItemStack(TRContent.Ingots.BRONZE, count),
(TRContent.PERIDOT_LEGGINGS) : new ItemStack(TRContent.Gems.PERIDOT, count),
(TRContent.RUBY_LEGGINGS) : new ItemStack(TRContent.Gems.RUBY, count),
(TRContent.SAPPHIRE_LEGGINGS) : new ItemStack(TRContent.Gems.SAPPHIRE, count),
(TRContent.SILVER_LEGGINGS) : new ItemStack(TRContent.Ingots.SILVER, count),
(TRContent.STEEL_LEGGINGS) : new ItemStack(TRContent.Ingots.STEEL, count)
].each {leggings, materialStack ->
offerBlastFurnaceRecipe {
ingredients leggings, Items.SAND
outputs materialStack, TRContent.Dusts.DARK_ASHES
power ARMOR_POWER
time ARMOR_TIME
heat ARMOR_HEAT
source "leggings"
criterion getCriterionName(leggings), getCriterionConditions(leggings)
}
}
}
}

View file

@ -22,28 +22,43 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.datagen.tags package techreborn.datagen.recipes.machine.compressor
import net.minecraft.tag.TagKey import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.minecraft.util.Identifier import net.minecraft.item.ItemStack
import net.minecraft.util.registry.Registry import reborncore.common.misc.TagConvertible
import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.init.TRContent
class CommonTags { class CompressorRecipesProvider extends TechRebornRecipesProvider {
static class Items { CompressorRecipesProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator)
}
public static leadOres = create("lead_ores") @Override
public static sheldoniteOres = create("sheldonite_ores") void generateRecipes() {
public static silverOres = create("silver_ores") TRContent.Plates.values().each {plate ->
public static tinOres = create("tin_ores") if (plate.getSource() != null) {
var ingredient = TagConvertible.convertIf(plate.getSource())
public static rawLeadOres = create("raw_lead_ores") offerCompressorRecipe {
public static rawSilverOres = create("raw_silver_ores") ingredients ingredient
public static rawTinOres = create("raw_tin_ores") outputs new ItemStack(plate, 1)
power 10
public static ironPlates = create("iron_plates") time 300
criterion getCriterionName(ingredient), getCriterionConditions(ingredient)
private static def create(String path) { }
return TagKey.of(Registry.ITEM_KEY, new Identifier("c", path)) }
if (plate.getSourceBlock() != null) {
var ingredient = TagConvertible.convertIf(plate.getSourceBlock())
offerCompressorRecipe {
ingredients ingredient
outputs new ItemStack(plate, 9)
power 10
time 300
source "block"
criterion getCriterionName(ingredient), getCriterionConditions(ingredient)
}
}
} }
} }
} }

View file

@ -25,7 +25,11 @@
package techreborn.datagen.recipes.machine.grinder package techreborn.datagen.recipes.machine.grinder
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.minecraft.item.ItemStack
import net.minecraft.item.Items import net.minecraft.item.Items
import net.minecraft.tag.TagKey
import net.minecraft.util.Identifier
import net.minecraft.util.registry.Registry
import techreborn.datagen.recipes.TechRebornRecipesProvider import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.init.TRContent import techreborn.init.TRContent
@ -36,11 +40,81 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
@Override @Override
void generateRecipes() { void generateRecipes() {
// offerGrinderRecipe { // vanilla raw metals
// ingredients TRContent.ORES_TAG, Items.ACACIA_BOAT [
// outputs Items.DIAMOND (Items.RAW_IRON): (TagKey.of(Registry.ITEM_KEY, new Identifier("c","iron_ores"))),
// power 5 (Items.RAW_COPPER): (TagKey.of(Registry.ITEM_KEY, new Identifier("c","copper_ores"))),
// time 200 (Items.RAW_GOLD): (TagKey.of(Registry.ITEM_KEY, new Identifier("c","gold_ores")))
// } ].each{raw, oreTag ->
offerGrinderRecipe {
ingredients oreTag
outputs new ItemStack(raw, 2)
power 2
time 270
criterion getCriterionName(oreTag), getCriterionConditions(oreTag)
}
}
// TR raw metals
TRContent.RawMetals.getRM2OBMap().each{raw, ore ->
if (!ore.isIndustrial())
offerGrinderRecipe {
ingredients ore.asTag()
outputs new ItemStack(raw, 2)
power 2
time 270
criterion getCriterionName(ore.asTag()), getCriterionConditions(ore.asTag())
}
}
// vanilla gems
// TODO vanilla gems + storage blocks (Redstone, glowstone, lapis, emerald, diamond)
// TR gems
TRContent.Gems.getG2DMap().each {gem, dust ->
offerGrinderRecipe {
ingredients gem.asTag()
outputs dust
power 2
time 200
criterion getCriterionName(gem.asTag()), getCriterionConditions(gem.asTag())
}
if (gem.getOre() != null)
offerGrinderRecipe {
ingredients gem.getOre().asTag()
outputs new ItemStack(dust,2)
power 2
time 220
source "ore"
criterion getCriterionName(gem.getOre().asTag()), getCriterionConditions(gem.getOre().asTag())
}
if (gem.getStorageBlock() != null)
offerGrinderRecipe {
ingredients gem.getStorageBlock().asTag()
outputs new ItemStack(dust,9)
power 2
time 1500
source "block"
criterion getCriterionName(gem.getStorageBlock().asTag()), getCriterionConditions(gem.getStorageBlock().asTag())
}
}
// vanilla ingots
// TODO vanilla ingots + storage blocks (iron, copper, gold)
// TR ingots
TRContent.Ingots.getI2DMap().each {ingot, dust ->
offerGrinderRecipe {
ingredients ingot.asTag()
outputs dust
power 5
time 200
criterion getCriterionName(ingot.asTag()), getCriterionConditions(ingot.asTag())
}
if (ingot.getStorageBlock() != null)
offerGrinderRecipe {
ingredients ingot.getStorageBlock().asTag()
outputs new ItemStack(dust,9)
power 5
time 1500
source "block"
criterion getCriterionName(ingot.getStorageBlock().asTag()), getCriterionConditions(ingot.getStorageBlock().asTag())
}
}
} }
} }

View file

@ -0,0 +1,56 @@
package techreborn.datagen.recipes.machine.industrial_sawmill
import net.minecraft.fluid.Fluid
import net.minecraft.fluid.Fluids
import net.minecraft.util.Identifier
import reborncore.common.fluid.FluidValue
import reborncore.common.fluid.container.FluidInstance
import techreborn.api.recipe.recipes.IndustrialSawmillRecipe
import techreborn.datagen.recipes.machine.MachineRecipeJsonFactory
import techreborn.init.ModRecipes
class IndustrialSawmillRecipeJsonFactory extends MachineRecipeJsonFactory<IndustrialSawmillRecipe> {
private Fluid fluid = Fluids.WATER // default
private long fluidAmount = -1
def fluid(Fluid fluid) {
this.fluid = fluid
return this
}
def fluidAmount(int fluidAmount) {
this.fluidAmount = fluidAmount
return this
}
protected IndustrialSawmillRecipeJsonFactory() {
super(ModRecipes.INDUSTRIAL_SAWMILL)
}
static IndustrialSawmillRecipeJsonFactory create() {
return new IndustrialSawmillRecipeJsonFactory()
}
static IndustrialSawmillRecipeJsonFactory create(@DelegatesTo(value = IndustrialSawmillRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
def factory = new IndustrialSawmillRecipeJsonFactory()
closure.setDelegate(factory)
closure.call(factory)
return factory
}
@Override
protected IndustrialSawmillRecipe createRecipe(Identifier identifier) {
return new IndustrialSawmillRecipe(type, identifier, ingredients, outputs, power, time, new FluidInstance(fluid, FluidValue.fromMillibuckets(fluidAmount)))
}
@Override
protected void validate() {
super.validate()
if (fluidAmount < 0) {
throw new IllegalStateException("recipe has no valid fluid value specified")
}
if (fluid == null)
throw new IllegalStateException("recipe has no valid fluid type specified")
}
}

View file

@ -0,0 +1,64 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2020 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.datagen.recipes.machine.industrial_sawmill
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.tag.ItemTags
import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.init.TRContent
class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
IndustrialSawmillRecipesProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator)
}
@Override
void generateRecipes() {
[
(ItemTags.ACACIA_LOGS): Items.ACACIA_PLANKS,
(ItemTags.BIRCH_LOGS): Items.BIRCH_PLANKS,
(ItemTags.DARK_OAK_LOGS): Items.DARK_OAK_PLANKS,
(ItemTags.JUNGLE_LOGS): Items.JUNGLE_PLANKS,
(ItemTags.OAK_LOGS): Items.OAK_PLANKS,
(TRContent.RUBBER_LOGS): TRContent.RUBBER_PLANKS,
(ItemTags.SPRUCE_LOGS): Items.SPRUCE_PLANKS
].each {logs, planks ->
offerIndustrialSawmillRecipe {
ingredients logs
outputs new ItemStack(planks,4), new ItemStack(TRContent.Dusts.SAW, 3)
power 40
time 200
fluidAmount 1000 // in millibuckets
}
}
}
def offerIndustrialSawmillRecipe(@DelegatesTo(value = IndustrialSawmillRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
IndustrialSawmillRecipeJsonFactory.create(closure).offerTo(exporter)
}
}

View file

@ -31,7 +31,6 @@ import net.minecraft.item.Items
import net.minecraft.recipe.CookingRecipeSerializer import net.minecraft.recipe.CookingRecipeSerializer
import net.minecraft.recipe.RecipeSerializer import net.minecraft.recipe.RecipeSerializer
import techreborn.datagen.recipes.TechRebornRecipesProvider import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.datagen.tags.CommonTags
import techreborn.init.TRContent import techreborn.init.TRContent
class SmeltingRecipesProvider extends TechRebornRecipesProvider { class SmeltingRecipesProvider extends TechRebornRecipesProvider {
@ -43,22 +42,22 @@ class SmeltingRecipesProvider extends TechRebornRecipesProvider {
void generateRecipes() { void generateRecipes() {
// Add smelting and blasting recipes. // Add smelting and blasting recipes.
[ [
(TRContent.Ingots.MIXED_METAL) : TRContent.Ingots.ADVANCED_ALLOY, (TRContent.Ingots.MIXED_METAL.asTag()) : TRContent.Ingots.ADVANCED_ALLOY,
(TRContent.Dusts.BRASS.asTag()) : TRContent.Ingots.BRASS, (TRContent.Dusts.BRASS.asTag()) : TRContent.Ingots.BRASS,
(TRContent.Dusts.BRONZE) : TRContent.Ingots.BRONZE, (TRContent.Dusts.BRONZE.asTag()) : TRContent.Ingots.BRONZE,
(TRContent.Dusts.ELECTRUM.asTag()) : TRContent.Ingots.ELECTRUM, (TRContent.Dusts.ELECTRUM.asTag()) : TRContent.Ingots.ELECTRUM,
(TRContent.Dusts.INVAR) : TRContent.Ingots.INVAR, (TRContent.Dusts.INVAR.asTag()) : TRContent.Ingots.INVAR,
(CommonTags.Items.leadOres) : TRContent.Ingots.LEAD, (TRContent.Ores.LEAD.asTag()) : TRContent.Ingots.LEAD,
(CommonTags.Items.rawLeadOres) : TRContent.Ingots.LEAD, (TRContent.RawMetals.LEAD.asTag()) : TRContent.Ingots.LEAD,
(TRContent.Dusts.NICKEL) : TRContent.Ingots.NICKEL, (TRContent.Dusts.NICKEL.asTag()) : TRContent.Ingots.NICKEL,
(CommonTags.Items.sheldoniteOres) : TRContent.Ingots.PLATINUM, (TRContent.Ores.SHELDONITE.asTag()) : TRContent.Ingots.PLATINUM,
(TRContent.Dusts.PLATINUM.asTag()) : TRContent.Ingots.PLATINUM, (TRContent.Dusts.PLATINUM.asTag()) : TRContent.Ingots.PLATINUM,
(Items.IRON_INGOT) : TRContent.Ingots.REFINED_IRON, (Items.IRON_INGOT) : TRContent.Ingots.REFINED_IRON,
(CommonTags.Items.ironPlates) : TRContent.Plates.REFINED_IRON, (TRContent.Plates.IRON.asTag()) : TRContent.Plates.REFINED_IRON,
(CommonTags.Items.silverOres) : TRContent.Ingots.SILVER, (TRContent.Ores.SILVER.asTag()) : TRContent.Ingots.SILVER,
(CommonTags.Items.rawSilverOres) : TRContent.Ingots.SILVER, (TRContent.RawMetals.SILVER.asTag()) : TRContent.Ingots.SILVER,
(CommonTags.Items.tinOres) : TRContent.Ingots.TIN, (TRContent.Ores.TIN.asTag()) : TRContent.Ingots.TIN,
(CommonTags.Items.rawTinOres) : TRContent.Ingots.TIN, (TRContent.RawMetals.TIN.asTag()) : TRContent.Ingots.TIN,
(TRContent.Dusts.ZINC.asTag()) : TRContent.Ingots.ZINC (TRContent.Dusts.ZINC.asTag()) : TRContent.Ingots.ZINC
].each { input, output -> ].each { input, output ->
offerSmelting(input, output) offerSmelting(input, output)

View file

@ -0,0 +1,23 @@
package techreborn.api.recipe.recipes;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.ingredient.RebornIngredient;
import techreborn.init.TRContent;
import java.util.List;
public class AssemblingMachineRecipe extends RebornRecipe {
public AssemblingMachineRecipe(RebornRecipeType<?> type, Identifier name, List<RebornIngredient> ingredients, List<ItemStack> outputs, int power, int time) {
super(type, name, ingredients, outputs, power, time);
}
@Override
public ItemStack createIcon() {
return new ItemStack(TRContent.Machine.ASSEMBLY_MACHINE);
}
}

View file

@ -31,6 +31,7 @@ import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.ingredient.RebornIngredient; import reborncore.common.crafting.ingredient.RebornIngredient;
import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity;
import techreborn.init.TRContent;
import java.util.List; import java.util.List;
@ -42,6 +43,11 @@ public class BlastFurnaceRecipe extends RebornRecipe {
this.heat = heat; this.heat = heat;
} }
@Override
public ItemStack createIcon() {
return new ItemStack(TRContent.Machine.INDUSTRIAL_BLAST_FURNACE);
}
public int getHeat() { public int getHeat() {
return heat; return heat;
} }

View file

@ -0,0 +1,23 @@
package techreborn.api.recipe.recipes;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.ingredient.RebornIngredient;
import techreborn.init.TRContent;
import java.util.List;
public class CentrifugeRecipe extends RebornRecipe {
public CentrifugeRecipe(RebornRecipeType<?> type, Identifier name, List<RebornIngredient> ingredients, List<ItemStack> outputs, int power, int time) {
super(type, name, ingredients, outputs, power, time);
}
@Override
public ItemStack createIcon() {
return new ItemStack(TRContent.Machine.INDUSTRIAL_CENTRIFUGE);
}
}

View file

@ -31,6 +31,7 @@ import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.ingredient.RebornIngredient; import reborncore.common.crafting.ingredient.RebornIngredient;
import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity; import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity;
import techreborn.init.TRContent;
import java.util.List; import java.util.List;
@ -47,6 +48,11 @@ public class FusionReactorRecipe extends RebornRecipe {
this.minSize = minSize; this.minSize = minSize;
} }
@Override
public ItemStack createIcon() {
return new ItemStack(TRContent.Machine.FUSION_CONTROL_COMPUTER);
}
public int getStartEnergy() { public int getStartEnergy() {
return startE; return startE;
} }

View file

@ -30,6 +30,7 @@ import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.RecipeManager; import reborncore.common.crafting.RecipeManager;
import reborncore.common.crafting.serde.RebornFluidRecipeSerde; import reborncore.common.crafting.serde.RebornFluidRecipeSerde;
import reborncore.common.crafting.serde.RebornRecipeSerde;
import techreborn.api.recipe.recipes.*; import techreborn.api.recipe.recipes.*;
import techreborn.api.recipe.recipes.serde.BlastFurnaceRecipeSerde; import techreborn.api.recipe.recipes.serde.BlastFurnaceRecipeSerde;
import techreborn.api.recipe.recipes.serde.FusionReactorRecipeSerde; import techreborn.api.recipe.recipes.serde.FusionReactorRecipeSerde;
@ -42,11 +43,13 @@ public class ModRecipes {
public static final RebornFluidRecipeSerde<FluidReplicatorRecipe> FLUID_REPLICATOR_RECIPE_SERDE = RebornFluidRecipeSerde.create(FluidReplicatorRecipe::new); public static final RebornFluidRecipeSerde<FluidReplicatorRecipe> FLUID_REPLICATOR_RECIPE_SERDE = RebornFluidRecipeSerde.create(FluidReplicatorRecipe::new);
public static final FusionReactorRecipeSerde FUSION_REACTOR_RECIPE_SERDE = new FusionReactorRecipeSerde(); public static final FusionReactorRecipeSerde FUSION_REACTOR_RECIPE_SERDE = new FusionReactorRecipeSerde();
public static final RollingMachineRecipeSerde ROLLING_MACHINE_RECIPE_SERDE = new RollingMachineRecipeSerde(); public static final RollingMachineRecipeSerde ROLLING_MACHINE_RECIPE_SERDE = new RollingMachineRecipeSerde();
public static final RebornRecipeSerde<AssemblingMachineRecipe> ASSEMBLING_RECIPE_SERDE = RebornRecipeSerde.create(AssemblingMachineRecipe::new);
public static final RebornRecipeSerde<CentrifugeRecipe> CENTRIFUGE_RECIPE_SERDE = RebornRecipeSerde.create(CentrifugeRecipe::new);
public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(new Identifier("techreborn:alloy_smelter")); public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(new Identifier("techreborn:alloy_smelter"));
public static final RebornRecipeType<RebornRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(new Identifier("techreborn:assembling_machine")); public static final RebornRecipeType<AssemblingMachineRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(ASSEMBLING_RECIPE_SERDE, new Identifier("techreborn:assembling_machine"));
public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BLAST_FURNACE_RECIPE_SERDE, new Identifier("techreborn:blast_furnace")); public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BLAST_FURNACE_RECIPE_SERDE, new Identifier("techreborn:blast_furnace"));
public static final RebornRecipeType<RebornRecipe> CENTRIFUGE = RecipeManager.newRecipeType(new Identifier("techreborn:centrifuge")); public static final RebornRecipeType<CentrifugeRecipe> CENTRIFUGE = RecipeManager.newRecipeType(CENTRIFUGE_RECIPE_SERDE, new Identifier("techreborn:centrifuge"));
public static final RebornRecipeType<RebornRecipe> CHEMICAL_REACTOR = RecipeManager.newRecipeType(new Identifier("techreborn:chemical_reactor")); public static final RebornRecipeType<RebornRecipe> CHEMICAL_REACTOR = RecipeManager.newRecipeType(new Identifier("techreborn:chemical_reactor"));
public static final RebornRecipeType<RebornRecipe> COMPRESSOR = RecipeManager.newRecipeType(new Identifier("techreborn:compressor")); public static final RebornRecipeType<RebornRecipe> COMPRESSOR = RecipeManager.newRecipeType(new Identifier("techreborn:compressor"));
public static final RebornRecipeType<RebornRecipe> DISTILLATION_TOWER = RecipeManager.newRecipeType(new Identifier("techreborn:distillation_tower")); public static final RebornRecipeType<RebornRecipe> DISTILLATION_TOWER = RecipeManager.newRecipeType(new Identifier("techreborn:distillation_tower"));

View file

@ -40,6 +40,8 @@ import net.minecraft.util.math.intprovider.UniformIntProvider;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import reborncore.api.blockentity.IUpgrade; import reborncore.api.blockentity.IUpgrade;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import reborncore.common.misc.TagConvertible; import reborncore.common.misc.TagConvertible;
@ -93,11 +95,14 @@ import techreborn.world.OreDistribution;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.logging.Logger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
public class TRContent { public class TRContent {
public static Marker DATAGEN = MarkerFactory.getMarker("datagen");
// Misc Blocks // Misc Blocks
public static Block COMPUTER_CUBE; public static Block COMPUTER_CUBE;
public static Block NUKE; public static Block NUKE;
@ -105,6 +110,7 @@ public class TRContent {
public static Block REINFORCED_GLASS; public static Block REINFORCED_GLASS;
public static Block RUBBER_LEAVES; public static Block RUBBER_LEAVES;
public static Block RUBBER_LOG; public static Block RUBBER_LOG;
public static TagKey<Item> RUBBER_LOGS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "rubber_logs"));
public static Block RUBBER_PLANK_SLAB; public static Block RUBBER_PLANK_SLAB;
public static Block RUBBER_PLANK_STAIR; public static Block RUBBER_PLANK_STAIR;
public static Block RUBBER_PLANKS; public static Block RUBBER_PLANKS;
@ -408,7 +414,7 @@ public class TRContent {
BAUXITE(OreDistribution.BAUXITE), BAUXITE(OreDistribution.BAUXITE),
CINNABAR(OreDistribution.CINNABAR), CINNABAR(OreDistribution.CINNABAR),
GALENA(OreDistribution.GALENA), GALENA(OreDistribution.GALENA),
IRIDIUM(OreDistribution.IRIDIUM), IRIDIUM(OreDistribution.IRIDIUM, true),
LEAD(OreDistribution.LEAD), LEAD(OreDistribution.LEAD),
PERIDOT(OreDistribution.PERIDOT), PERIDOT(OreDistribution.PERIDOT),
PYRITE(OreDistribution.PYRITE), PYRITE(OreDistribution.PYRITE),
@ -419,7 +425,7 @@ public class TRContent {
SODALITE(OreDistribution.SODALITE), SODALITE(OreDistribution.SODALITE),
SPHALERITE(OreDistribution.SPHALERITE), SPHALERITE(OreDistribution.SPHALERITE),
TIN(OreDistribution.TIN), TIN(OreDistribution.TIN),
TUNGSTEN(OreDistribution.TUNGSTEN), TUNGSTEN(OreDistribution.TUNGSTEN, true),
DEEPSLATE_BAUXITE(BAUXITE), DEEPSLATE_BAUXITE(BAUXITE),
DEEPSLATE_GALENA(GALENA), DEEPSLATE_GALENA(GALENA),
@ -437,9 +443,10 @@ public class TRContent {
public final String name; public final String name;
public final Block block; public final Block block;
public final OreDistribution distribution; public final OreDistribution distribution;
private final boolean industrial;
private final TagKey<Item> tag; private final TagKey<Item> tag;
Ores(OreDistribution distribution, UniformIntProvider experienceDroppedFallback) { Ores(OreDistribution distribution, UniformIntProvider experienceDroppedFallback, boolean industrial) {
name = this.toString().toLowerCase(Locale.ROOT); name = this.toString().toLowerCase(Locale.ROOT);
block = new OreBlock(FabricBlockSettings.of(Material.STONE) block = new OreBlock(FabricBlockSettings.of(Material.STONE)
.requiresTool() .requiresTool()
@ -448,18 +455,27 @@ public class TRContent {
.resistance(3f), .resistance(3f),
distribution != null ? distribution.experienceDropped : experienceDroppedFallback distribution != null ? distribution.experienceDropped : experienceDroppedFallback
); );
this.industrial = industrial;
InitUtils.setup(block, name + "_ore"); InitUtils.setup(block, name + "_ore");
tag = TagKey.of(Registry.ITEM_KEY, new Identifier("c", tag = TagKey.of(Registry.ITEM_KEY, new Identifier("c",
(name.startsWith("deepslate_") ? name.substring(name.indexOf('_')+1): name) + "_ores")); (name.startsWith("deepslate_") ? name.substring(name.indexOf('_')+1): name) + "_ores"));
this.distribution = distribution; this.distribution = distribution;
} }
Ores(OreDistribution distribution, UniformIntProvider experienceDroppedFallback) {
this(distribution, experienceDroppedFallback, false);
}
Ores(OreDistribution distribution, boolean industrial) {
this(distribution, null, industrial);
}
Ores(OreDistribution distribution) { Ores(OreDistribution distribution) {
this(distribution, null); this(distribution, false);
} }
Ores(TRContent.Ores stoneOre) { Ores(TRContent.Ores stoneOre) {
this(null, stoneOre.distribution != null ? stoneOre.distribution.experienceDropped : null); this(null, stoneOre.distribution != null ? stoneOre.distribution.experienceDropped : null, stoneOre.industrial);
deepslateMap.put(stoneOre, this); deepslateMap.put(stoneOre, this);
unDeepslateMap.put(this, stoneOre); unDeepslateMap.put(this, stoneOre);
} }
@ -469,6 +485,10 @@ public class TRContent {
return block.asItem(); return block.asItem();
} }
public boolean isIndustrial() {
return industrial;
}
@Override @Override
public TagKey<Item> asTag() { public TagKey<Item> asTag() {
return tag; return tag;
@ -768,18 +788,27 @@ public class TRContent {
private final String name; private final String name;
private final Item item; private final Item item;
private final ItemConvertible storageBlock; private final Ores ore;
private final StorageBlocks storageBlock;
private final TagKey<Item> tag; private final TagKey<Item> tag;
RawMetals() { RawMetals() {
name = this.toString().toLowerCase(Locale.ROOT); name = this.toString().toLowerCase(Locale.ROOT);
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP)); item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
ItemConvertible blockVariant = null; Ores oreVariant = null;
try {
oreVariant = Ores.valueOf(this.toString());
}
catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn(DATAGEN, "Raw metal {} has no ore block equivalent!", name);
}
ore = oreVariant;
StorageBlocks blockVariant = null;
try { try {
blockVariant = StorageBlocks.valueOf("RAW_" + this.toString()); blockVariant = StorageBlocks.valueOf("RAW_" + this.toString());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn("Raw metal {} has no storage block equivalent!", name); TechReborn.LOGGER.warn(DATAGEN, "Raw metal {} has no storage block equivalent!", name);
} }
storageBlock = blockVariant; storageBlock = blockVariant;
InitUtils.setup(item, "raw_" + name); InitUtils.setup(item, "raw_" + name);
@ -796,21 +825,37 @@ public class TRContent {
return tag; return tag;
} }
public ItemConvertible getStorageBlock() { public StorageBlocks getStorageBlock() {
return storageBlock; return storageBlock;
} }
public Ores getOre() {
return ore;
}
/** /**
* Returns a map that maps the raw metals to their storage block equivalent. * Returns a map that maps the raw metals to their storage block equivalent.
* @return A non {@code null} map mapping the raw metals to their storage block equivalent. * @return A non {@code null} map mapping the raw metals to their storage block equivalent.
* If a storage block equivalent doesn't exist, the raw metal will not be in the keys of this map. * If a storage block equivalent doesn't exist, the raw metal will not be in the keys of this map.
*/ */
public static @NotNull Map<RawMetals, ItemConvertible> getRM2SBMap() { public static @NotNull Map<RawMetals, StorageBlocks> getRM2SBMap() {
return Arrays.stream(values()) return Arrays.stream(values())
.map(rawMetal -> new Pair<>(rawMetal, rawMetal.getStorageBlock())) .map(rawMetal -> new Pair<>(rawMetal, rawMetal.getStorageBlock()))
.filter(entry -> entry.getRight() != null) // ensure storage block equivalent exists .filter(entry -> entry.getRight() != null) // ensure storage block equivalent exists
.collect(Collectors.toMap(Pair::getLeft, Pair::getRight)); .collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
} }
/**
* Returns a map that maps the raw metals to their ore block equivalent.
* @return A non {@code null} map mapping the raw metals to their ore block equivalent.
* If an ore block equivalent doesn't exist, the raw metal will not be in the keys of this map.
*/
public static @NotNull Map<RawMetals, Ores> getRM2OBMap() {
return Arrays.stream(values())
.map(rawMetal -> new Pair<>(rawMetal, rawMetal.getOre()))
.filter(entry -> entry.getRight() != null) // ensure ore block equivalent exists
.collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
}
} }
public static final TagKey<Item> SMALL_DUSTS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "small_dusts")); public static final TagKey<Item> SMALL_DUSTS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "small_dusts"));
@ -836,7 +881,7 @@ public class TRContent {
dustVariant = Dusts.valueOf(this.toString()); dustVariant = Dusts.valueOf(this.toString());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn("Small dust {} has no dust equivalent!", name); TechReborn.LOGGER.warn(DATAGEN, "Small dust {} has no dust equivalent!", name);
} }
dust = dustVariant; dust = dustVariant;
InitUtils.setup(item, name + "_small_dust"); InitUtils.setup(item, name + "_small_dust");
@ -900,18 +945,36 @@ public class TRContent {
private final String name; private final String name;
private final Item item; private final Item item;
private final ItemConvertible storageBlock; private final Dusts dust;
private final Ores ore;
private final StorageBlocks storageBlock;
private final TagKey<Item> tag; private final TagKey<Item> tag;
Gems(String tagPlural) { Gems(String tagPlural) {
name = this.toString().toLowerCase(Locale.ROOT); name = this.toString().toLowerCase(Locale.ROOT);
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP)); item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
ItemConvertible blockVariant = null; Dusts dustVariant = null;
try {
dustVariant = Dusts.valueOf(this.toString());
}
catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn(DATAGEN, "Gem {} has no dust item equivalent!", name);
}
dust = dustVariant;
Ores oreVariant = null;
try {
oreVariant = Ores.valueOf(this.toString());
}
catch (IllegalArgumentException ex) {
TechReborn.LOGGER.info(DATAGEN, "Gem {} has no ore block equivalent.", name);
}
ore = oreVariant;
StorageBlocks blockVariant = null;
try { try {
blockVariant = StorageBlocks.valueOf(this.toString()); blockVariant = StorageBlocks.valueOf(this.toString());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn("Gem {} has no storage block equivalent!", name); TechReborn.LOGGER.warn(DATAGEN, "Gem {} has no storage block equivalent!", name);
} }
storageBlock = blockVariant; storageBlock = blockVariant;
InitUtils.setup(item, name + "_gem"); InitUtils.setup(item, name + "_gem");
@ -940,16 +1003,36 @@ public class TRContent {
return tag; return tag;
} }
public ItemConvertible getStorageBlock() { public Dusts getDust() {
return dust;
}
public Ores getOre() {
return ore;
}
public StorageBlocks getStorageBlock() {
return storageBlock; return storageBlock;
} }
/**
* Returns a map that maps the gems to their dust item equivalent.
* @return A non {@code null} map mapping the gems to their dust item equivalent.
* If a dust item equivalent doesn't exist, the gem will not be in the keys of this map.
*/
public static @NotNull Map<Gems, Dusts> getG2DMap() {
return Arrays.stream(values())
.map(gem -> new Pair<>(gem, gem.getDust()))
.filter(entry -> entry.getRight() != null) // ensure dust item equivalent exists
.collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
}
/** /**
* Returns a map that maps the gems to their storage block equivalent. * Returns a map that maps the gems to their storage block equivalent.
* @return A non {@code null} map mapping the gems to their storage block equivalent. * @return A non {@code null} map mapping the gems to their storage block equivalent.
* If a storage block equivalent doesn't exist, the raw metal will not be in the keys of this map. * If a storage block equivalent doesn't exist, the gem will not be in the keys of this map.
*/ */
public static @NotNull Map<Gems, ItemConvertible> getG2SBMap() { public static @NotNull Map<Gems, StorageBlocks> getG2SBMap() {
return Arrays.stream(values()) return Arrays.stream(values())
.map(gem -> new Pair<>(gem, gem.getStorageBlock())) .map(gem -> new Pair<>(gem, gem.getStorageBlock()))
.filter(entry -> entry.getRight() != null) // ensure storage block equivalent exists .filter(entry -> entry.getRight() != null) // ensure storage block equivalent exists
@ -965,18 +1048,33 @@ public class TRContent {
private final String name; private final String name;
private final Item item; private final Item item;
private final ItemConvertible storageBlock; private final Dusts dust;
private final StorageBlocks storageBlock;
private final TagKey<Item> tag; private final TagKey<Item> tag;
Ingots(String tagNameBase) { Ingots(String tagNameBase) {
name = this.toString().toLowerCase(Locale.ROOT); name = this.toString().toLowerCase(Locale.ROOT);
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP)); item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
ItemConvertible blockVariant = null; Dusts dustVariant = null;
try {
dustVariant = Dusts.valueOf(this.toString());
}
catch (IllegalArgumentException ex) {
try {
RawMetals.valueOf(this.toString());
TechReborn.LOGGER.info(DATAGEN, "Ingot {} has no dust item equivalent, but a raw metal.", name);
}
catch (IllegalArgumentException ex2) {
TechReborn.LOGGER.warn(DATAGEN, "Ingot {} has no dust item equivalent AND no raw metal!", name);
}
}
dust = dustVariant;
StorageBlocks blockVariant = null;
try { try {
blockVariant = StorageBlocks.valueOf(this.toString()); blockVariant = StorageBlocks.valueOf(this.toString());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn("Ingot {} has no storage block equivalent!", name); TechReborn.LOGGER.warn(DATAGEN, "Ingot {} has no storage block equivalent!", name);
} }
storageBlock = blockVariant; storageBlock = blockVariant;
InitUtils.setup(item, name + "_ingot"); InitUtils.setup(item, name + "_ingot");
@ -1005,10 +1103,26 @@ public class TRContent {
return tag; return tag;
} }
public ItemConvertible getStorageBlock() { public Dusts getDust() {
return dust;
}
public StorageBlocks getStorageBlock() {
return storageBlock; return storageBlock;
} }
/**
* Returns a map that maps the ingots to their dust item equivalent.
* @return A non {@code null} map mapping the ingots to their dust item equivalent.
* If a dust item equivalent doesn't exist, the ingot will not be in the keys of this map.
*/
public static @NotNull Map<Ingots, Dusts> getI2DMap() {
return Arrays.stream(values())
.map(gem -> new Pair<>(gem, gem.getDust()))
.filter(entry -> entry.getRight() != null) // ensure dust item equivalent exists
.collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
}
/** /**
* Returns a map that maps the ingots to their storage block equivalent. * Returns a map that maps the ingots to their storage block equivalent.
* @return A non {@code null} map mapping the ingots to their storage block equivalent. * @return A non {@code null} map mapping the ingots to their storage block equivalent.
@ -1043,7 +1157,7 @@ public class TRContent {
ingotVariant = Ingots.valueOf(this.toString()); ingotVariant = Ingots.valueOf(this.toString());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
TechReborn.LOGGER.warn("Nugget {} has no ingot equivalent!", name); TechReborn.LOGGER.warn(DATAGEN, "Nugget {} has no ingot equivalent!", name);
} }
ingot = ingotVariant; ingot = ingotVariant;
this.ofGem = ofGem; this.ofGem = ofGem;
@ -1182,24 +1296,119 @@ public class TRContent {
public static final TagKey<Item> PLATES_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "plates")); public static final TagKey<Item> PLATES_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "plates"));
public enum Plates implements ItemConvertible, TagConvertible<Item> { public enum Plates implements ItemConvertible, TagConvertible<Item> {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CARBON, CHROME(CHROME_TAG_NAME_BASE), COAL, COPPER, DIAMOND, ELECTRUM, EMERALD, GOLD, INVAR, ADVANCED_ALLOY,
IRIDIUM_ALLOY, IRIDIUM, IRON, LAPIS, LAZURITE, LEAD, MAGNALIUM, NICKEL, OBSIDIAN, PERIDOT, PLATINUM, QUARTZ, RED_GARNET, ALUMINUM,
REDSTONE, REFINED_IRON, RUBY, SAPPHIRE, SILICON, SILVER, STEEL, TIN, TITANIUM, TUNGSTEN, TUNGSTENSTEEL, WOOD, BRASS,
YELLOW_GARNET, ZINC; BRONZE,
CARBON(Parts.CARBON_MESH),
CHROME(CHROME_TAG_NAME_BASE),
COAL(Dusts.COAL, Items.COAL_BLOCK),
COPPER(Items.COPPER_INGOT, Items.COPPER_BLOCK),
DIAMOND(Dusts.DIAMOND, Items.DIAMOND_BLOCK),
ELECTRUM,
EMERALD(Dusts.EMERALD, Items.EMERALD_BLOCK),
GOLD(Items.GOLD_INGOT, Items.GOLD_BLOCK),
INVAR,
IRIDIUM_ALLOY(true),
IRIDIUM,
IRON(Items.IRON_INGOT, Items.IRON_BLOCK),
LAPIS(Items.LAPIS_BLOCK),
LAZURITE(Dusts.LAZURITE),
LEAD,
MAGNALIUM,
NICKEL,
OBSIDIAN(Dusts.OBSIDIAN, Items.OBSIDIAN),
PERIDOT,
PLATINUM,
QUARTZ(Dusts.QUARTZ),
RED_GARNET,
REDSTONE(Items.REDSTONE_BLOCK),
REFINED_IRON,
RUBY,
SAPPHIRE,
SILICON,
SILVER,
STEEL,
TIN,
TITANIUM,
TUNGSTEN,
TUNGSTENSTEEL,
WOOD,
YELLOW_GARNET,
ZINC;
private final String name; private final String name;
private final Item item; private final Item item;
private final ItemConvertible source;
private final ItemConvertible sourceBlock;
private final boolean industrial;
private final TagKey<Item> tag; private final TagKey<Item> tag;
Plates(String tagNameBase) { Plates(ItemConvertible source, ItemConvertible sourceBlock, boolean industrial, String tagNameBase) {
name = this.toString().toLowerCase(Locale.ROOT); name = this.toString().toLowerCase(Locale.ROOT);
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP)); item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
ItemConvertible sourceVariant = null;
if (source != null) {
sourceVariant = source;
}
else {
try {
sourceVariant = Ingots.valueOf(this.toString());
}
catch (IllegalArgumentException ex) {
try {
sourceVariant = Gems.valueOf(this.toString());
}
catch (IllegalArgumentException ex2) {
TechReborn.LOGGER.warn(DATAGEN, "Plate {} has no identifiable source!", name);
}
}
}
if (sourceBlock != null) {
this.sourceBlock = sourceBlock;
}
else {
if (sourceVariant instanceof Gems gem)
this.sourceBlock = gem.getStorageBlock();
else if (sourceVariant instanceof Ingots ingot)
this.sourceBlock = ingot.getStorageBlock();
else {
TechReborn.LOGGER.info(DATAGEN, "Plate {} has no identifiable source block.", name);
this.sourceBlock = null;
}
}
if (sourceVariant instanceof Gems gem)
this.source = gem.getDust();
else
this.source = sourceVariant;
this.industrial = industrial;
InitUtils.setup(item, name + "_plate"); InitUtils.setup(item, name + "_plate");
if (tagNameBase == null) {
tagNameBase = name;
}
tag = TagKey.of(Registry.ITEM_KEY, new Identifier("c", Objects.requireNonNullElse(tagNameBase, name) + "_plates")); tag = TagKey.of(Registry.ITEM_KEY, new Identifier("c", Objects.requireNonNullElse(tagNameBase, name) + "_plates"));
} }
Plates(String tagNameBase) {
this(null, null, false, tagNameBase);
}
Plates(ItemConvertible source, ItemConvertible sourceBlock) {
this(source, sourceBlock, false, null);
}
Plates(ItemConvertible source) {
this(source, null, false, null);
}
Plates(boolean industrial) {
this(null, null, industrial, null);
}
Plates() { Plates() {
this(null); this(null, null, false, null);
} }
public ItemStack getStack() { public ItemStack getStack() {
@ -1215,6 +1424,18 @@ public class TRContent {
return item; return item;
} }
public ItemConvertible getSource() {
return source;
}
public ItemConvertible getSourceBlock() {
return sourceBlock;
}
public boolean isIndustrial() {
return industrial;
}
@Override @Override
public TagKey<Item> asTag() { public TagKey<Item> asTag() {
return tag; return tag;

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:alloy_smelter/brass_ingot"
]
},
"criteria": {
"has_copper": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:copper_ingot"]
}
]
}
},
"has_zinc": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:zinc_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:alloy_smelter/brass_ingot"
}
}
},
"requirements": [
[
"has_copper",
"has_zinc",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:alloy_smelter/bronze_ingot"
]
},
"criteria": {
"has_copper": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:copper_ingot"]
}
]
}
},
"has_tin": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:tin_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:alloy_smelter/bronze_ingot"
}
}
},
"requirements": [
[
"has_copper",
"has_tin",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:alloy_smelter/electrum_ingot"
]
},
"criteria": {
"has_gold": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:gold_ingot"]
}
]
}
},
"has_silver": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:silver_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:alloy_smelter/electrum_ingot"
}
}
},
"requirements": [
[
"has_gold",
"has_silver",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:alloy_smelter/invar_ingot"
]
},
"criteria": {
"has_copper": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:iron_ingot"]
}
]
}
},
"has_nickel": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:nickel_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:alloy_smelter/invar_ingot"
}
}
},
"requirements": [
[
"has_copper",
"has_nickel",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/advanced_circuit"
]
},
"criteria": {
"has_electrum_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:electrum_plates"
}
]
}
},
"has_silicon_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:silicon_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/advanced_circuit"
}
}
},
"requirements": [
[
"has_electrum_plate",
"has_silicon_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/data_storage_chip"
]
},
"criteria": {
"has_data_storage_core": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:data_storage_core"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/data_storage_chip"
}
}
},
"requirements": [
[
"has_data_storage_core",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/data_storage_core"
]
},
"criteria": {
"has_peridot_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:peridot_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/data_storage_core"
}
}
},
"requirements": [
[
"has_peridot_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/data_storage_core_from_emerald"
]
},
"criteria": {
"has_emerald_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:emerald_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/data_storage_core_from_emerald"
}
}
},
"requirements": [
[
"has_emerald_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,43 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/electronic_circuit"
]
},
"criteria": {
"has_copper_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:copper_plates"
}
]
}
},
"has_silicon_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:silicon_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/electronic_circuit"
}
}
},
"requirements": [
[
"has_copper_plate",
"has_silicon_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/energy_crystal"
]
},
"criteria": {
"has_redstone_crystal": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:synthetic_redstone_crystal"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/energy_crystal"
}
}
},
"requirements": [
[
"has_redstone_crystal",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/energy_flow_chip"
]
},
"criteria": {
"has_lapotron_crystal": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:lapotron_crystal"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/energy_flow_chip"
}
}
},
"requirements": [
[
"has_lapotron_crystal",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/industrial_circuit"
]
},
"criteria": {
"has_platinum_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:platinum_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/industrial_circuit"
}
}
},
"requirements": [
[
"has_platinum_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/lithium_ion_battery"
]
},
"criteria": {
"has_aluminium_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:aluminum_plates"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/lithium_ion_battery"
}
}
},
"requirements": [
[
"has_aluminium_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:assembling_machine/wind_mill"
]
},
"criteria": {
"has_magnalium_plate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:magnalium_plate"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:assembling_machine/wind_mill"
}
}
},
"requirements": [
[
"has_magnalium_plate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/aluminum_ingot"
]
},
"criteria": {
"has_aluminum_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:aluminum_dusts"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/aluminum_ingot"
}
}
},
"requirements": [
[
"has_aluminum_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/chrome_ingot"
]
},
"criteria": {
"has_chrome_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:chrome_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/chrome_ingot"
}
}
},
"requirements": [
[
"has_chrome_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/chrome_ingot_from_small_dust"
]
},
"criteria": {
"has_small_chrome_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:chrome_small_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/chrome_ingot_from_small_dust"
}
}
},
"requirements": [
[
"has_small_chrome_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/hot_tungstensteel_ingot"
]
},
"criteria": {
"has_tungsten_ingot": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:tungsten_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/hot_tungstensteel_ingot"
}
}
},
"requirements": [
[
"has_tungsten_ingot",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/iridium_ingot_from_raw"
]
},
"criteria": {
"has_raw_iridium": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:raw_iridium"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/iridium_ingot_from_raw"
}
}
},
"requirements": [
[
"has_raw_iridium",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/iron_ingot_from_rail"
]
},
"criteria": {
"has_rail": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:rail"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/iron_ingot_from_rail"
}
}
},
"requirements": [
[
"has_rail",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/lead_silver_from_galena"
]
},
"criteria": {
"has_galena_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:galena_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/lead_silver_from_galena"
}
}
},
"requirements": [
[
"has_galena_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/lead_silver_from_galena_small_dust"
]
},
"criteria": {
"has_galena_small_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:galena_small_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/lead_silver_from_galena_small_dust"
}
}
},
"requirements": [
[
"has_galena_small_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/refined_iron_ingot_from_iron_ore"
]
},
"criteria": {
"has_iron_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:iron_ores"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/refined_iron_ingot_from_iron_ore"
}
}
},
"requirements": [
[
"has_iron_ore",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/refined_iron_ingot_from_pyrite_ore"
]
},
"criteria": {
"has_pyrite_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:pyrite_ores"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/refined_iron_ingot_from_pyrite_ore"
}
}
},
"requirements": [
[
"has_pyrite_ore",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/silicon_cell"
]
},
"criteria": {
"has_quartz_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:quartz_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/silicon_cell"
}
}
},
"requirements": [
[
"has_quartz_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/silicon_plate"
]
},
"criteria": {
"has_silicon": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:silicon",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/silicon_plate"
}
}
},
"requirements": [
[
"has_silicon",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/steel_ingot"
]
},
"criteria": {
"has_steel_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:steel_dusts"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/steel_ingot"
}
}
},
"requirements": [
[
"has_steel_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/steel_ingot_from_refined_iron"
]
},
"criteria": {
"has_refined_iron": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:refined_iron_ingot"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/steel_ingot_from_refined_iron"
}
}
},
"requirements": [
[
"has_refined_iron",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/steel_ingot_from_refined_iron_and_carbon"
]
},
"criteria": {
"has_refined_iron": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:refined_iron_ingot"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/steel_ingot_from_refined_iron_and_carbon"
}
}
},
"requirements": [
[
"has_refined_iron",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/steel_ingot_from_small_dust"
]
},
"criteria": {
"has_small_steel_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:steel_small_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/steel_ingot_from_small_dust"
}
}
},
"requirements": [
[
"has_small_steel_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/titanium_ingot"
]
},
"criteria": {
"has_titanium_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tags": "c:titanium_dusts"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/titanium_ingot"
}
}
},
"requirements": [
[
"has_titanium_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/titanium_ingot_from_small_dust"
]
},
"criteria": {
"has_small_titanium_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:titanium_small_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/titanium_ingot_from_small_dust"
}
}
},
"requirements": [
[
"has_small_titanium_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/tungsten_ingot"
]
},
"criteria": {
"has_tungsten_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:raw_tungsten_ores"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/tungsten_ingot"
}
}
},
"requirements": [
[
"has_tungsten_ore",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:blast_furnace/tungsten_ingot_from_small_dust"
]
},
"criteria": {
"has_small_tungsten_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:tungsten_small_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:blast_furnace/tungsten_ingot_from_small_dust"
}
}
},
"requirements": [
[
"has_small_tungsten_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/ametrine_gem"
]
},
"criteria": {
"has_ametrine_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:ametrine_ore"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/ametrine_gem"
}
}
},
"requirements": [
[
"has_ametrine_ore",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/anthracite"
]
},
"criteria": {
"has_anthracite_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:anthracite_ore"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/anthracite"
}
}
},
"requirements": [
[
"has_anthracite_ore",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/coal_dust_from_anthracite"
]
},
"criteria": {
"has_anthracite": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:anthracite"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/coal_dust_from_anthracite"
}
}
},
"requirements": [
[
"has_anthracite",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/coal_dust_from_lignite"
]
},
"criteria": {
"has_lignite": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:lignite"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/coal_dust_from_lignite"
}
}
},
"requirements": [
[
"has_lignite",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/lignite"
]
},
"criteria": {
"has_lignite_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:lignite_ore"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/lignite"
}
}
},
"requirements": [
[
"has_lignite_ore",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,41 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:byg_compat/pendorite_scraps"
]
},
"criteria": {
"has_pendorite_ore": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"reborncore:mod": "byg",
"items": [
{
"items": ["byg:pendorite_ore"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:byg_compat/pendorite_scraps"
}
}
},
"requirements": [
[
"has_pendorite_ore",
"has_the_recipe"
]
],
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"byg"
]
}
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/apple"
]
},
"criteria": {
"has_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:apple"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/apple"
}
}
},
"requirements": [
[
"has_apple",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/ashes_dust"
]
},
"criteria": {
"has_ashes_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:ashes_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/ashes_dust"
}
}
},
"requirements": [
[
"has_ashes_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/baked_potato"
]
},
"criteria": {
"has_baked_potato": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:baked_potato"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/baked_potato"
}
}
},
"requirements": [
[
"has_baked_potato",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/basalt_dust"
]
},
"criteria": {
"has_basalt_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:basalt_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/basalt_dust"
}
}
},
"requirements": [
[
"has_basalt_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/beetroot"
]
},
"criteria": {
"has_beetroot": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:beetroot"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/beetroot"
}
}
},
"requirements": [
[
"has_beetroot",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/brass_dust"
]
},
"criteria": {
"has_brass_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:brass_dusts"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/brass_dust"
}
}
},
"requirements": [
[
"has_brass_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/bread"
]
},
"criteria": {
"has_bread": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:bread"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/bread"
}
}
},
"requirements": [
[
"has_bread",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/bronze_dust"
]
},
"criteria": {
"has_bronze_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:bronze_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/bronze_dust"
}
}
},
"requirements": [
[
"has_bronze_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/brown_mushroom"
]
},
"criteria": {
"has_brown_mushroom": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:brown_mushroom"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/brown_mushroom"
}
}
},
"requirements": [
[
"has_brown_mushroom",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/brown_mushroom_block"
]
},
"criteria": {
"has_brown_mushroom_block": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:brown_mushroom_block"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/brown_mushroom_block"
}
}
},
"requirements": [
[
"has_brown_mushroom_block",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/calcium_carbonate_cell"
]
},
"criteria": {
"has_calcium_carbonate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:calcium_carbonate",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/calcium_carbonate_cell"
}
}
},
"requirements": [
[
"has_calcium_carbonate",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/carrot"
]
},
"criteria": {
"has_carrot": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:carrot"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/carrot"
}
}
},
"requirements": [
[
"has_carrot",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/cooked_meat"
]
},
"criteria": {
"has_cooked_meat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:cooked_meat"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/cooked_meat"
}
}
},
"requirements": [
[
"has_cooked_meat",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/cookie"
]
},
"criteria": {
"has_cookie": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:cookie"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/cookie"
}
}
},
"requirements": [
[
"has_cookie",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/dark_ashes_dust"
]
},
"criteria": {
"has_dark_ashes_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:dark_ashes_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/dark_ashes_dust"
}
}
},
"requirements": [
[
"has_dark_ashes_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/deuterium_cell"
]
},
"criteria": {
"has_deuterium": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:deuterium",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/deuterium_cell"
}
}
},
"requirements": [
[
"has_deuterium",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/dirt"
]
},
"criteria": {
"has_dirt": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:dirt"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/dirt"
}
}
},
"requirements": [
[
"has_dirt",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/electrum_dust"
]
},
"criteria": {
"has_electrum_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:electrum_dusts"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/electrum_dust"
}
}
},
"requirements": [
[
"has_electrum_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/enchanted_golden_apple"
]
},
"criteria": {
"has_enchanted_golden_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:enchanted_golden_apple"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/enchanted_golden_apple"
}
}
},
"requirements": [
[
"has_enchanted_golden_apple",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/ender_eye_dust"
]
},
"criteria": {
"has_ender_eye_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:ender_eye_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/ender_eye_dust"
}
}
},
"requirements": [
[
"has_ender_eye_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/endstone_dust"
]
},
"criteria": {
"has_endstone_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:endstone_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/endstone_dust"
}
}
},
"requirements": [
[
"has_endstone_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/glistering_melon_slice"
]
},
"criteria": {
"has_glistering_melon_slice": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:glistering_melon_slice"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/glistering_melon_slice"
}
}
},
"requirements": [
[
"has_glistering_melon_slice",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/glowstone_dust"
]
},
"criteria": {
"has_glowstone_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:glowstone_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/glowstone_dust"
}
}
},
"requirements": [
[
"has_glowstone_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/golden_apple"
]
},
"criteria": {
"has_golden_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:golden_apple"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/golden_apple"
}
}
},
"requirements": [
[
"has_golden_apple",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/golden_carrot"
]
},
"criteria": {
"has_golden_carrot": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:golden_carrot"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/golden_carrot"
}
}
},
"requirements": [
[
"has_golden_carrot",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/grass_block"
]
},
"criteria": {
"has_grass_block": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:grass_block"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/grass_block"
}
}
},
"requirements": [
[
"has_grass_block",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/helium_cell"
]
},
"criteria": {
"has_helium": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:helium",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/helium_cell"
}
}
},
"requirements": [
[
"has_helium",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/hydrogen_cell"
]
},
"criteria": {
"has_hydrogen": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:hydrogen",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/hydrogen_cell"
}
}
},
"requirements": [
[
"has_hydrogen",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/kelp"
]
},
"criteria": {
"has_kelp": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:kelp"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/kelp"
}
}
},
"requirements": [
[
"has_kelp",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/lapis_lazuli"
]
},
"criteria": {
"has_lapis_lazuli": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:lapis_lazuli"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/lapis_lazuli"
}
}
},
"requirements": [
[
"has_lapis_lazuli",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/lava_cell"
]
},
"criteria": {
"has_lava": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"fluid": "techreborn:lava",
"holder": "techreborn:cell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/lava_cell"
}
}
},
"requirements": [
[
"has_lava",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/magma_cream"
]
},
"criteria": {
"has_magma_cream": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:magma_cream"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/magma_cream"
}
}
},
"requirements": [
[
"has_magma_cream",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/marble_dust"
]
},
"criteria": {
"has_marble_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:marble_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/marble_dust"
}
}
},
"requirements": [
[
"has_marble_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/melon_slice"
]
},
"criteria": {
"has_melon_slice": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:melon_slice"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/melon_slice"
}
}
},
"requirements": [
[
"has_melon_slice",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/mushroom_stew"
]
},
"criteria": {
"has_mushroom_stew": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:mushroom_stew"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/mushroom_stew"
}
}
},
"requirements": [
[
"has_mushroom_stew",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/mycelium"
]
},
"criteria": {
"has_mycelium": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:mycelium"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/mycelium"
}
}
},
"requirements": [
[
"has_mycelium",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/nether_wart"
]
},
"criteria": {
"has_nether_wart": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["minecraft:nether_wart"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/nether_wart"
}
}
},
"requirements": [
[
"has_nether_wart",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/netherrack_dust"
]
},
"criteria": {
"has_netherrack_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:netherrack_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/netherrack_dust"
}
}
},
"requirements": [
[
"has_netherrack_dust",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"techreborn:centrifuge/nickel_dust"
]
},
"criteria": {
"has_nickel_dust": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:nickel_dust"]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "techreborn:centrifuge/nickel_dust"
}
}
},
"requirements": [
[
"has_nickel_dust",
"has_the_recipe"
]
]
}

Some files were not shown because too many files have changed in this diff Show more