diff --git a/src/data/java/li/cil/oc/data/OCBlockTagsProvider.java b/src/data/java/li/cil/oc/data/OCBlockTagsProvider.java index 283fb94ca6..9acc09194a 100644 --- a/src/data/java/li/cil/oc/data/OCBlockTagsProvider.java +++ b/src/data/java/li/cil/oc/data/OCBlockTagsProvider.java @@ -3,10 +3,12 @@ import li.cil.oc.OpenComputers; import li.cil.oc.common.init.OCBlocks; +import li.cil.oc.common.init.OCTags; import li.cil.oc.common.openprinter.OpenPrinter; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.tags.BlockTags; +import net.minecraft.world.level.block.Blocks; import net.neoforged.neoforge.common.Tags; import net.neoforged.neoforge.common.data.BlockTagsProvider; import net.neoforged.neoforge.common.data.ExistingFileHelper; @@ -34,8 +36,8 @@ protected void addTags(HolderLookup.Provider provider) { OpenPrinter.FILE_CABINET.get() ); - tag(BlockTags.BEACON_BASE_BLOCKS); - tag(Tags.Blocks.END_STONES).add(OCBlocks.Endstone().get()); + + tag(OCTags.Blocks.FROGLIGHTS).add(Blocks.OCHRE_FROGLIGHT, Blocks.PEARLESCENT_FROGLIGHT, Blocks.VERDANT_FROGLIGHT); } } diff --git a/src/data/java/li/cil/oc/data/OCItemTagsProvider.java b/src/data/java/li/cil/oc/data/OCItemTagsProvider.java index 626c2d70ea..52ad5f10b6 100644 --- a/src/data/java/li/cil/oc/data/OCItemTagsProvider.java +++ b/src/data/java/li/cil/oc/data/OCItemTagsProvider.java @@ -1,11 +1,10 @@ package li.cil.oc.data; import li.cil.oc.OpenComputers; -import li.cil.oc.common.recipe.ExtendedRecipe; +import li.cil.oc.common.init.OCTags; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.ItemTagsProvider; -import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import net.neoforged.neoforge.common.Tags; import net.neoforged.neoforge.common.data.ExistingFileHelper; @@ -25,13 +24,6 @@ public OCItemTagsProvider( @Override protected void addTags(HolderLookup.Provider provider) { copy(Tags.Blocks.END_STONES, Tags.Items.END_STONES); - - tag(ExtendedRecipe.beaconBlocks()).add( - Items.NETHERITE_BLOCK, - Items.EMERALD_BLOCK, - Items.DIAMOND_BLOCK, - Items.GOLD_BLOCK, - Items.IRON_BLOCK - ); + copy(OCTags.Blocks.FROGLIGHTS, OCTags.Items.FROGLIGHTS); } } diff --git a/src/data/java/li/cil/oc/data/OCRecipeProvider.java b/src/data/java/li/cil/oc/data/OCRecipeProvider.java index 7b5ca894c8..f753d5d7f7 100644 --- a/src/data/java/li/cil/oc/data/OCRecipeProvider.java +++ b/src/data/java/li/cil/oc/data/OCRecipeProvider.java @@ -1,13 +1,22 @@ package li.cil.oc.data; +import it.unimi.dsi.fastutil.Pair; import li.cil.oc.OpenComputers; import li.cil.oc.common.block.ChameliumBlock; import li.cil.oc.common.datacomponents.OCComponents; import li.cil.oc.common.init.OCBlocks; import li.cil.oc.common.init.OCItems; +import li.cil.oc.common.init.OCTags; import li.cil.oc.common.openprinter.OpenPrinter; +import li.cil.oc.common.recipe.ColorizeRecipe; +import li.cil.oc.common.recipe.DecolorizeRecipe; +import li.cil.oc.common.recipe.LootDiskCyclingRecipe; +import li.cil.oc.common.recipe.function.*; +import li.cil.oc.data.recipe.TransformShapedRecipeBuilder; +import li.cil.oc.data.recipe.TransformShapelessRecipeBuilder; import net.minecraft.core.HolderLookup; import net.minecraft.core.component.DataComponents; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.*; import net.minecraft.network.chat.Component; @@ -18,11 +27,19 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.CraftingBookCategory; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.SmeltingRecipe; import net.minecraft.world.level.ItemLike; import net.neoforged.neoforge.common.Tags; +import net.neoforged.neoforge.common.crafting.CompoundIngredient; +import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; class OCRecipeProvider extends RecipeProvider { private static final Map> DYE_TAGS = Map.ofEntries( @@ -56,10 +73,18 @@ public void buildRecipes(RecipeOutput output) { addUpgrades(output); addStorage(output); addBlocks(output); + addRobotFlags(output); + addPrint(output); + addEEPROMRecrafting(output); addOpenPrinter(output); addFloppy(output, "openos", "OpenOS (Operating System)", OCItems.Manual(), DyeColor.GREEN); addFloppy(output, "oppm", "OPPM (Package Manager)", OCItems.Interweb(), DyeColor.CYAN); + + addColorize(output, OCBlocks.Cable()); + addColorize(output, OCItems.HoverBoots()); + + output.accept(ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "lootdisks/cycling"), new LootDiskCyclingRecipe(CraftingBookCategory.MISC), null); } private void addMaterials(RecipeOutput output) { @@ -86,7 +111,7 @@ private void addMaterials(RecipeOutput output) { .unlockedBy(getHasName(OCItems.Manual()), has(OCItems.Manual())) .save(output); - RecipeProvider.oreSmelting(output, java.util.List.of(OCItems.RawCircuitBoard()), RecipeCategory.MISC, OCItems.PrintedCircuitBoard(), 0.1f, 200, ""); + addSmelting(output, OCItems.RawCircuitBoard(), OCItems.PrintedCircuitBoard(), 0.1f, 200); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, OCItems.Card()) .pattern("i ") @@ -443,6 +468,100 @@ private void addTools(RecipeOutput output) { } private void addComponents(RecipeOutput output) { + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.APUTier1().get()) + .pattern("gCg") + .pattern("PBG") + .pattern("gCg") + .define('g', Tags.Items.NUGGETS_GOLD) + .define('C', OCItems.ChipTier1().get()) + .define('B', OCItems.ComponentBusTier1().get()) + .define('P', OCItems.CPUTier2().get()) + .define('G', OCItems.GraphicsCardTier1().get()) + .unlockedBy(getHasName(OCItems.CPUTier2()), has(OCItems.CPUTier2())) + .unlockedBy(getHasName(OCItems.GraphicsCardTier1()), has(OCItems.GraphicsCardTier1())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.APUTier2().get()) + .pattern("dCd") + .pattern("PBG") + .pattern("dCd") + .define('d', OCItems.DiamondChip().get()) + .define('C', OCItems.ChipTier2().get()) + .define('B', OCItems.ComponentBusTier2().get()) + .define('P', OCItems.CPUTier3().get()) + .define('G', OCItems.GraphicsCardTier2().get()) + .unlockedBy(getHasName(OCItems.CPUTier3()), has(OCItems.CPUTier3())) + .unlockedBy(getHasName(OCItems.GraphicsCardTier2()), has(OCItems.GraphicsCardTier2())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.APUTier3().get()) + .pattern("nCn") + .pattern("PBG") + .pattern("nCn") + .define('n', OCItems.NetheriteSilicon().get()) + .define('C', OCItems.ChipTier3().get()) + .define('B', OCItems.ComponentBusTier3().get()) + .define('P', OCItems.CPUTier4().get()) + .define('G', OCItems.GraphicsCardTier3().get()) + .unlockedBy(getHasName(OCItems.CPUTier4()), has(OCItems.CPUTier4())) + .unlockedBy(getHasName(OCItems.GraphicsCardTier3()), has(OCItems.GraphicsCardTier3())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.CPUTier1().get()) + .pattern("iri") + .pattern("CUC") + .pattern("iAi") + .define('i', Tags.Items.NUGGETS_IRON) + .define('r', Tags.Items.DUSTS_REDSTONE) + .define('C', OCItems.ChipTier1().get()) + .define('U', OCItems.ControlUnit().get()) + .define('A', OCItems.Alu().get()) + .unlockedBy(getHasName(OCItems.Alu()), has(OCItems.Alu())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.CPUTier2().get()) + .pattern("grg") + .pattern("CUC") + .pattern("gAg") + .define('g', Tags.Items.NUGGETS_GOLD) + .define('r', Tags.Items.DUSTS_REDSTONE) + .define('C', OCItems.ChipTier2().get()) + .define('U', OCItems.ControlUnit().get()) + .define('A', OCItems.Alu().get()) + .unlockedBy(getHasName(OCItems.Alu()), has(OCItems.Alu())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.CPUTier3().get()) + .pattern("drd") + .pattern("CUC") + .pattern("dAd") + .define('d', OCItems.DiamondChip().get()) + .define('r', Tags.Items.DUSTS_REDSTONE) + .define('C', OCItems.ChipTier3().get()) + .define('U', OCItems.ControlUnit().get()) + .define('A', OCItems.Alu().get()) + .unlockedBy(getHasName(OCItems.Alu()), has(OCItems.Alu())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.CPUTier4().get()) + .pattern("nrn") + .pattern("CUC") + .pattern("nAn") + .define('n', OCItems.NetheriteSilicon().get()) + .define('r', Tags.Items.DUSTS_REDSTONE) + .define('C', OCItems.ChipTier4().get()) + .define('U', OCItems.ControlUnit().get()) + .define('A', OCItems.Alu().get()) + .unlockedBy(getHasName(OCItems.Alu()), has(OCItems.Alu())) + .function(SetDefaultArchitecture.INSTANCE) + .save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, OCItems.ComponentBusTier1()) .pattern("iri") .pattern("CU ") @@ -760,6 +879,25 @@ private void addCards(RecipeOutput output) { .unlockedBy(getHasName(OCItems.Card()), has(OCItems.Card())) .save(output); + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, new ItemStack(OCItems.LinkedCard().get(), 2)) + .pattern("e e") + .pattern("LIL") + .pattern("C C") + .define('e', Items.ENDER_EYE) + .define('C', OCItems.ChipTier3()) + .define('I', OCItems.Interweb()) + .define('L', OCItems.InternetCard()) + .unlockedBy(getHasName(OCItems.ChipTier3()), has(OCItems.ChipTier3())) + .function(SetUniqueTunnel.INSTANCE) + .save(output); + + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, new ItemStack(OCItems.LinkedCard().get(), 2)) + .requires(OCItems.LinkedCard()) + .requires(OCItems.LinkedCard()) + .unlockedBy(getHasName(OCItems.ChipTier3()), has(OCItems.ChipTier3())) + .function(SetUniqueTunnel.INSTANCE) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "recrafting/linkedcard")); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, OCItems.DataCardTier1()) .pattern("iAC") .pattern(" B ") @@ -1025,6 +1163,26 @@ private void addUpgrades(RecipeOutput output) { .unlockedBy(getHasName(OCItems.PrintedCircuitBoard()), has(OCItems.PrintedCircuitBoard())) .save(output); + TransformShapedRecipeBuilder.of(RecipeCategory.MISC, OCItems.NavigationUpgrade()) + .pattern("gcg") + .pattern("CmC") + .pattern("gpg") + .define('g', Tags.Items.INGOTS_GOLD) + .define('c', Items.COMPASS) + .define('m', Items.FILLED_MAP) + .define('p', Tags.Items.POTION_BOTTLE) + .define('C', OCItems.ChipTier2()) + .unlockedBy(getHasName(OCItems.PrintedCircuitBoard()), has(OCItems.PrintedCircuitBoard())) + .function(new SetSourceMap(Ingredient.of(Items.FILLED_MAP))) + .save(output); + + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, OCItems.NavigationUpgrade()) + .requires(OCItems.NavigationUpgrade()) + .requires(Items.FILLED_MAP) + .unlockedBy(getHasName(OCItems.NavigationUpgrade()), has(OCItems.NavigationUpgrade())) + .function(new SetSourceMap(Ingredient.of(Items.FILLED_MAP))) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "recrafting/navigationupgrade")); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, OCItems.PistonUpgrade()) .pattern("ipi") .pattern("sCs") @@ -1178,6 +1336,23 @@ private void addStorage(RecipeOutput output) { .unlockedBy(getHasName(OCItems.Manual()), has(OCItems.Manual())) .save(output); + var luaBios = new ItemStack(OCItems.EEPROM().get()); + luaBios.set(OCComponents.READONLY().get(), false); + luaBios.set(OCComponents.LABEL().get(), "EEPROM (Lua BIOS)"); + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, luaBios) + .requires(OCItems.EEPROM()) + .requires(OCItems.Manual()) + .unlockedBy(getHasName(OCItems.EEPROM()), has(OCItems.EEPROM())) + .function(new SetEEPROMData("bios.lua", Optional.empty())) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "eeprom/luabios")); + + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, new ItemStack(OCItems.EEPROM().get(), 2)) + .requires(OCItems.EEPROM(), 2) + .unlockedBy(getHasName(OCItems.EEPROM()), has(OCItems.EEPROM())) + // Erase node address, just in case. + .function(CopyComponents.builder(OCItems.EEPROM()).exclude(OCComponents.ADDRESS().get()).build()) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "eeprom/copying")); + var floppy = new ItemStack(OCItems.Floppy().get()); floppy.set(OCComponents.DISK_COLOR().get(), DyeColor.LIGHT_GRAY); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, floppy) @@ -1191,6 +1366,25 @@ private void addStorage(RecipeOutput output) { .unlockedBy(getHasName(OCItems.Disk()), has(OCItems.Disk())) .save(output); + for (var dye : DYE_TAGS.entrySet()) { + var dyedFloppy = new ItemStack(OCItems.Floppy().get()); + dyedFloppy.set(OCComponents.DISK_COLOR().get(), dye.getKey()); + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, dyedFloppy) + .requires(OCItems.Floppy()) + .requires(dye.getValue()) + .unlockedBy(getHasName(OCItems.Floppy()), has(OCItems.Floppy())) + // Copy all components except the color, which we override + .function(CopyComponents.builder(OCItems.Floppy().get()).exclude(OCComponents.DISK_COLOR().get()).build()) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "floppy/coloring/" + dye.getKey().getName())); + } + + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, OCItems.Floppy()) + .requires(OCItems.Floppy()) + .unlockedBy(getHasName(OCItems.Floppy()), has(OCItems.Floppy())) + // Preserve the color and drop all other components + .function(CopyComponents.builder(OCItems.Floppy().get()).include(OCComponents.DISK_COLOR().get()).build()) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "floppy/formatting")); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, OCItems.HDDTier1()) .pattern("CDi") .pattern("PDp") @@ -1274,6 +1468,90 @@ private void addStorage(RecipeOutput output) { .define('R', OCItems.RAMTier7()) .unlockedBy(getHasName(OCItems.PrintedCircuitBoard()), has(OCItems.PrintedCircuitBoard())) .save(output); + + // Add all formatting recipes. + for (var drive : List.of( + Pair.of("eeprom/formatting", OCItems.EEPROM().get()), + Pair.of("hdd/formatting1", OCItems.HDDTier1().get()), + Pair.of("hdd/formatting2", OCItems.HDDTier2().get()), + Pair.of("hdd/formatting3", OCItems.HDDTier3().get()), + Pair.of("hdd/formatting4", OCItems.HDDTier4().get()), + Pair.of("ssd/formatting1", OCItems.SSDTier1().get()), + Pair.of("ssd/formatting2", OCItems.SSDTier2().get()), + Pair.of("ssd/formatting3", OCItems.SSDTier3().get()) + )) { + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, drive.second()) + .requires(drive.second()) + .unlockedBy(getHasName(drive.second()), has(drive.second())) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), drive.first())); + } + } + + private void addRobotFlags(RecipeOutput output) { + addRobotFlag(output, "trans_flag", x -> x + .requires(Tags.Items.DYES_LIGHT_BLUE) + .requires(Tags.Items.DYES_PINK) + .requires(Tags.Items.DYES_WHITE) + .requires(Items.STICK) + ); + + addRobotFlag(output, "rainbow_flag", x -> x + .requires(Tags.Items.DYES_RED) + .requires(Tags.Items.DYES_ORANGE) + .requires(Tags.Items.DYES_YELLOW) + .requires(Tags.Items.DYES_GREEN) + .requires(Tags.Items.DYES_BLUE) + .requires(Tags.Items.DYES_PURPLE) + .requires(Items.STICK) + ); + } + + private void addRobotFlag(RecipeOutput output, String name, Consumer build) { + var result = new ItemStack(OCBlocks.Robot().get()); + result.set(OCComponents.ROBOT_FLAG().get(), ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), name)); + + var builder = TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, result); + build.accept(builder); + builder + .requires(OCBlocks.Robot()) + .unlockedBy(getHasName(OCBlocks.Robot()), has(OCBlocks.Robot())) + .function(CopyComponents.builder(OCBlocks.Robot()).exclude(OCComponents.ROBOT_FLAG().get()).build()) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "robot/" + name)); + } + + private void addPrint(RecipeOutput output) { + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, OCBlocks.Print()) + .requires(OCBlocks.Print()) + .requires(CompoundIngredient.of(Ingredient.of(Items.GLOWSTONE), Ingredient.of(OCTags.Items.FROGLIGHTS))) + .function(new CopyComponents(OCBlocks.Print())) + .function(new AddPrintLight(4)) + .unlockedBy(getHasName(OCBlocks.Print()), has(OCBlocks.Print())) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "print/glowstone")); + + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, OCBlocks.Print()) + .requires(OCBlocks.Print()) + .requires(Tags.Items.DUSTS_GLOWSTONE) + .function(new CopyComponents(OCBlocks.Print())) + .function(new AddPrintLight(1)) + .unlockedBy(getHasName(OCBlocks.Print()), has(OCBlocks.Print())) + .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "print/glowstone_dust")); + } + + private void addEEPROMRecrafting(RecipeOutput output) { + for (var item : List.of( + OCItems.Drone().asItem(), + OCBlocks.Microcontroller().asItem(), + OCBlocks.Robot().asItem(), + OCItems.Tablet().asItem() + )) { + TransformShapelessRecipeBuilder.of(RecipeCategory.MISC, item) + .requires(item) + .requires(OCItems.EEPROM()) + .function(new CopyComponents(item)) + .function(ReplaceEEPROM.INSTANCE) + .unlockedBy(getHasName(item), has(item)) + .save(output, BuiltInRegistries.ITEM.getKey(item).withPrefix("recrafting")); + } } private void addOpenPrinter(RecipeOutput output) { @@ -1917,4 +2195,17 @@ private void addFloppy(RecipeOutput output, String id, String name, ItemLike ite .unlockedBy(getHasName(OCItems.Floppy()), has(OCItems.Floppy())) .save(output, ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "lootdisks/" + id)); } + + private void addColorize(RecipeOutput output, ItemLike item) { + var itemId = BuiltInRegistries.ITEM.getKey(item.asItem()); + + output.accept(itemId.withPrefix("colorize/"), new ColorizeRecipe(item), null); + output.accept(itemId.withPrefix("decolorize/"), new DecolorizeRecipe(item), null); + } + + private void addSmelting(RecipeOutput output, ItemLike input, ItemLike result, float experience, int time) { + SimpleCookingRecipeBuilder.generic(Ingredient.of(input), RecipeCategory.MISC, result, experience, time, RecipeSerializer.SMELTING_RECIPE, SmeltingRecipe::new) + .unlockedBy(getHasName(input), has(input)) + .save(output); + } } diff --git a/src/data/java/li/cil/oc/data/recipe/AbstractRecipeBuilder.java b/src/data/java/li/cil/oc/data/recipe/AbstractRecipeBuilder.java new file mode 100644 index 0000000000..e80aca1f7d --- /dev/null +++ b/src/data/java/li/cil/oc/data/recipe/AbstractRecipeBuilder.java @@ -0,0 +1,90 @@ +package li.cil.oc.data.recipe; + + +import net.minecraft.advancements.AdvancementRequirements; +import net.minecraft.advancements.AdvancementRewards; +import net.minecraft.advancements.Criterion; +import net.minecraft.advancements.critereon.RecipeUnlockedTrigger; +import net.minecraft.data.recipes.RecipeBuilder; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.RecipeOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * An abstract base class for creating recipes, in the style of {@link RecipeBuilder}. + * + * @param The type of this class. + * @param The output of this builder. + * + */ +public abstract class AbstractRecipeBuilder, O extends Recipe> implements RecipeBuilder { + protected final RecipeCategory category; + protected final ItemStack result; + protected String group = ""; + private final Map> criteria = new LinkedHashMap<>(); + + protected AbstractRecipeBuilder(RecipeCategory category, ItemStack result) { + this.category = category; + this.result = result; + } + + @Override + public Item getResult() { + return result.getItem(); + } + + /** + * Set the group for this recipe. + * + * @param group The new group. + * @return This object, for chaining. + */ + @Override + public final S group(String group) { + this.group = group; + return self(); + } + + /** + * Add a criterion to this recipe. + * + * @param name The name of the criterion. + * @param criterion The criterion to add. + * @return This object, for chaining. + */ + @Override + public final S unlockedBy(String name, Criterion criterion) { + criteria.put(name, criterion); + return self(); + } + + /** + * Convert this builder into the output ({@link O}) recipe. + * + * @return The built recipe. + */ + protected abstract O build(); + + @Override + public void save(RecipeOutput output, ResourceLocation id) { + if (criteria.isEmpty()) throw new IllegalStateException("No way of obtaining recipe " + id); + var advancement = output.advancement() + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(id)) + .rewards(AdvancementRewards.Builder.recipe(id)) + .requirements(AdvancementRequirements.Strategy.OR); + for (var entry : criteria.entrySet()) advancement.addCriterion(entry.getKey(), entry.getValue()); + + output.accept(id, build(), advancement.build(id.withPrefix("recipes/" + category.getFolderName() + "/"))); + } + + @SuppressWarnings("unchecked") + private S self() { + return (S) this; + } +} diff --git a/src/data/java/li/cil/oc/data/recipe/TransformShapedRecipeBuilder.java b/src/data/java/li/cil/oc/data/recipe/TransformShapedRecipeBuilder.java new file mode 100644 index 0000000000..7dc0fbfe5e --- /dev/null +++ b/src/data/java/li/cil/oc/data/recipe/TransformShapedRecipeBuilder.java @@ -0,0 +1,75 @@ +package li.cil.oc.data.recipe; + +import li.cil.oc.common.recipe.TransformShapedRecipe; +import li.cil.oc.common.recipe.function.RecipeFunction; +import net.minecraft.data.recipes.RecipeBuilder; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.ShapedRecipePattern; +import net.minecraft.world.level.ItemLike; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * A builder for {@link TransformShapedRecipe}s, much like {@link ShapedRecipeBuilder}. + */ +public final class TransformShapedRecipeBuilder extends AbstractRecipeBuilder { + private final List rows = new ArrayList<>(); + private final Map key = new LinkedHashMap<>(); + private final List functions = new ArrayList<>(); + + private TransformShapedRecipeBuilder(RecipeCategory category, ItemStack result) { + super(category, result); + } + + public static TransformShapedRecipeBuilder of(RecipeCategory category, ItemStack result) { + return new TransformShapedRecipeBuilder(category, result); + } + + public static TransformShapedRecipeBuilder of(RecipeCategory category, ItemLike result) { + return new TransformShapedRecipeBuilder(category, new ItemStack(result)); + } + + public TransformShapedRecipeBuilder define(char key, Ingredient ingredient) { + if (this.key.containsKey(key)) throw new IllegalArgumentException("Symbol '" + key + "' is already defined!"); + if (key == ' ') throw new IllegalArgumentException("Symbol ' ' (whitespace) is reserved and cannot be defined"); + + this.key.put(key, ingredient); + return this; + } + + public TransformShapedRecipeBuilder define(char key, TagKey tag) { + return this.define(key, Ingredient.of(tag)); + } + + public TransformShapedRecipeBuilder define(char key, ItemLike item) { + return define(key, Ingredient.of(item)); + } + + public TransformShapedRecipeBuilder pattern(String pattern) { + if (!rows.isEmpty() && pattern.length() != rows.getFirst().length()) { + throw new IllegalArgumentException("Pattern must be the same width on every line!"); + } else { + rows.add(pattern); + return this; + } + } + + public TransformShapedRecipeBuilder function(RecipeFunction function) { + functions.add(function); + return this; + } + + @Override + protected TransformShapedRecipe build() { + if (functions.isEmpty()) throw new IllegalStateException("Must have at least one recipe function"); + return new TransformShapedRecipe(group, RecipeBuilder.determineBookCategory(category), ShapedRecipePattern.of(key, rows), result, functions); + } +} diff --git a/src/data/java/li/cil/oc/data/recipe/TransformShapelessRecipeBuilder.java b/src/data/java/li/cil/oc/data/recipe/TransformShapelessRecipeBuilder.java new file mode 100644 index 0000000000..b1bd8f49b8 --- /dev/null +++ b/src/data/java/li/cil/oc/data/recipe/TransformShapelessRecipeBuilder.java @@ -0,0 +1,68 @@ +package li.cil.oc.data.recipe; + +import li.cil.oc.common.recipe.TransformShapelessRecipe; +import li.cil.oc.common.recipe.function.RecipeFunction; +import net.minecraft.core.NonNullList; +import net.minecraft.data.recipes.RecipeBuilder; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; + +import java.util.ArrayList; +import java.util.List; + +/** + * A builder for {@link TransformShapelessRecipe}s, much like {@link ShapelessRecipeBuilder}. + */ +public final class TransformShapelessRecipeBuilder extends AbstractRecipeBuilder { + private final NonNullList ingredients = NonNullList.create(); + private final List functions = new ArrayList<>(); + + private TransformShapelessRecipeBuilder(RecipeCategory category, ItemStack result) { + super(category, result); + } + + public static TransformShapelessRecipeBuilder of(RecipeCategory category, ItemStack result) { + return new TransformShapelessRecipeBuilder(category, result); + } + + public static TransformShapelessRecipeBuilder of(RecipeCategory category, ItemLike result) { + return new TransformShapelessRecipeBuilder(category, new ItemStack(result)); + } + + public TransformShapelessRecipeBuilder requires(Ingredient ingredient, int count) { + for (int i = 0; i < count; i++) ingredients.add(ingredient); + return this; + } + + public TransformShapelessRecipeBuilder requires(Ingredient ingredient) { + return requires(ingredient, 1); + } + + public TransformShapelessRecipeBuilder requires(ItemLike item) { + return requires(Ingredient.of(new ItemStack(item))); + } + + public TransformShapelessRecipeBuilder requires(ItemLike item, int count) { + return requires(Ingredient.of(new ItemStack(item)), count); + } + + public TransformShapelessRecipeBuilder requires(TagKey item) { + return requires(Ingredient.of(item)); + } + + public TransformShapelessRecipeBuilder function(RecipeFunction function) { + this.functions.add(function); + return this; + } + + @Override + protected TransformShapelessRecipe build() { + if (functions.isEmpty()) throw new IllegalStateException("Must have at least one recipe function"); + return new TransformShapelessRecipe(group, RecipeBuilder.determineBookCategory(category), result, ingredients, functions); + } +} diff --git a/src/main/generatedResources/data/c/tags/block/froglights.json b/src/main/generatedResources/data/c/tags/block/froglights.json new file mode 100644 index 0000000000..ca83c5dc0a --- /dev/null +++ b/src/main/generatedResources/data/c/tags/block/froglights.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:ochre_froglight", + "minecraft:pearlescent_froglight", + "minecraft:verdant_froglight" + ] +} \ No newline at end of file diff --git a/src/main/generatedResources/data/c/tags/item/beacon_base_blocks.json b/src/main/generatedResources/data/c/tags/item/beacon_base_blocks.json deleted file mode 100644 index a44cd4a8bd..0000000000 --- a/src/main/generatedResources/data/c/tags/item/beacon_base_blocks.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "values": [ - "minecraft:netherite_block", - "minecraft:emerald_block", - "minecraft:diamond_block", - "minecraft:gold_block", - "minecraft:iron_block" - ] -} \ No newline at end of file diff --git a/src/main/generatedResources/data/c/tags/item/froglights.json b/src/main/generatedResources/data/c/tags/item/froglights.json new file mode 100644 index 0000000000..ca83c5dc0a --- /dev/null +++ b/src/main/generatedResources/data/c/tags/item/froglights.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:ochre_froglight", + "minecraft:pearlescent_froglight", + "minecraft:verdant_froglight" + ] +} \ No newline at end of file diff --git a/src/main/generatedResources/data/minecraft/tags/block/beacon_base_blocks.json b/src/main/generatedResources/data/minecraft/tags/block/beacon_base_blocks.json deleted file mode 100644 index f72d209df7..0000000000 --- a/src/main/generatedResources/data/minecraft/tags/block/beacon_base_blocks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "values": [] -} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu1.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu1.json new file mode 100644 index 0000000000..aaef6aff09 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu1.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cpu2": { + "conditions": { + "items": [ + { + "items": "opencomputers:cpu2" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_graphicscard1": { + "conditions": { + "items": [ + { + "items": "opencomputers:graphicscard1" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:apu1" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_cpu2", + "has_graphicscard1" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:apu1" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu2.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu2.json new file mode 100644 index 0000000000..5ff13ef3d3 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu2.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cpu3": { + "conditions": { + "items": [ + { + "items": "opencomputers:cpu3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_graphicscard2": { + "conditions": { + "items": [ + { + "items": "opencomputers:graphicscard2" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:apu2" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_cpu3", + "has_graphicscard2" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:apu2" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu3.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu3.json new file mode 100644 index 0000000000..6878feaaef --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/apu3.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cpu4": { + "conditions": { + "items": [ + { + "items": "opencomputers:cpu4" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_graphicscard3": { + "conditions": { + "items": [ + { + "items": "opencomputers:graphicscard3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:apu3" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_cpu4", + "has_graphicscard3" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:apu3" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu1.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu1.json new file mode 100644 index 0000000000..dcb3d38a90 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu1.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_alu": { + "conditions": { + "items": [ + { + "items": "opencomputers:alu" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:cpu1" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_alu" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:cpu1" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu2.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu2.json new file mode 100644 index 0000000000..ea3ccb38eb --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu2.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_alu": { + "conditions": { + "items": [ + { + "items": "opencomputers:alu" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:cpu2" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_alu" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:cpu2" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu3.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu3.json new file mode 100644 index 0000000000..49c64e729c --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu3.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_alu": { + "conditions": { + "items": [ + { + "items": "opencomputers:alu" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:cpu3" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_alu" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:cpu3" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu4.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu4.json new file mode 100644 index 0000000000..ec8330c1bc --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/cpu4.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_alu": { + "conditions": { + "items": [ + { + "items": "opencomputers:alu" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:cpu4" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_alu" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:cpu4" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/copying.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/copying.json new file mode 100644 index 0000000000..4566410d14 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/copying.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_eeprom": { + "conditions": { + "items": [ + { + "items": "opencomputers:eeprom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:eeprom/copying" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_eeprom" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:eeprom/copying" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/formatting.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/formatting.json new file mode 100644 index 0000000000..a5fc64d41f --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/formatting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_eeprom": { + "conditions": { + "items": [ + { + "items": "opencomputers:eeprom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:eeprom/formatting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_eeprom" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:eeprom/formatting" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/luabios.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/luabios.json new file mode 100644 index 0000000000..e6b39c8a73 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/eeprom/luabios.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_eeprom": { + "conditions": { + "items": [ + { + "items": "opencomputers:eeprom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:eeprom/luabios" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_eeprom" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:eeprom/luabios" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/black.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/black.json new file mode 100644 index 0000000000..b54fcf71c2 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/black.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/black" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/black" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/blue.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/blue.json new file mode 100644 index 0000000000..e3c5c02027 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/blue.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/blue" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/blue" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/brown.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/brown.json new file mode 100644 index 0000000000..def2844818 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/brown.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/brown" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/brown" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/cyan.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/cyan.json new file mode 100644 index 0000000000..c70c347bc4 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/cyan.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/cyan" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/cyan" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/gray.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/gray.json new file mode 100644 index 0000000000..502c8c7077 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/gray.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/gray" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/gray" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/green.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/green.json new file mode 100644 index 0000000000..ed29ea83cf --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/green.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/green" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/green" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_blue.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_blue.json new file mode 100644 index 0000000000..08595256e9 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_blue.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/light_blue" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/light_blue" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_gray.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_gray.json new file mode 100644 index 0000000000..9666808e73 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/light_gray.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/light_gray" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/light_gray" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/lime.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/lime.json new file mode 100644 index 0000000000..a42cd0d194 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/lime.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/lime" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/lime" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/magenta.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/magenta.json new file mode 100644 index 0000000000..96b18b5d72 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/magenta.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/magenta" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/magenta" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/orange.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/orange.json new file mode 100644 index 0000000000..7b13ee40e2 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/orange.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/orange" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/orange" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/pink.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/pink.json new file mode 100644 index 0000000000..01706001a5 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/pink.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/pink" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/pink" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/purple.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/purple.json new file mode 100644 index 0000000000..1e4853e159 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/purple.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/purple" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/purple" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/red.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/red.json new file mode 100644 index 0000000000..4b6935a0e8 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/red.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/red" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/red" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/white.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/white.json new file mode 100644 index 0000000000..79ef4c1216 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/white.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/white" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/white" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/yellow.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/yellow.json new file mode 100644 index 0000000000..f89010191a --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/coloring/yellow.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/coloring/yellow" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/coloring/yellow" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/formatting.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/formatting.json new file mode 100644 index 0000000000..d2a7c00935 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/floppy/formatting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_floppy": { + "conditions": { + "items": [ + { + "items": "opencomputers:floppy" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:floppy/formatting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_floppy" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:floppy/formatting" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting1.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting1.json new file mode 100644 index 0000000000..3de9db4132 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting1.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_hdd1": { + "conditions": { + "items": [ + { + "items": "opencomputers:hdd1" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:hdd/formatting1" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_hdd1" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:hdd/formatting1" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting2.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting2.json new file mode 100644 index 0000000000..c15bc5e617 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting2.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_hdd2": { + "conditions": { + "items": [ + { + "items": "opencomputers:hdd2" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:hdd/formatting2" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_hdd2" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:hdd/formatting2" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting3.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting3.json new file mode 100644 index 0000000000..a03aa2ba01 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting3.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_hdd3": { + "conditions": { + "items": [ + { + "items": "opencomputers:hdd3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:hdd/formatting3" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_hdd3" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:hdd/formatting3" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting4.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting4.json new file mode 100644 index 0000000000..44d21eeb7d --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/hdd/formatting4.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_hdd4": { + "conditions": { + "items": [ + { + "items": "opencomputers:hdd4" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:hdd/formatting4" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_hdd4" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:hdd/formatting4" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/linkedcard.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/linkedcard.json new file mode 100644 index 0000000000..8e0e273656 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/linkedcard.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_chip3": { + "conditions": { + "items": [ + { + "items": "opencomputers:chip3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:linkedcard" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_chip3" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:linkedcard" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/navigationupgrade.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/navigationupgrade.json new file mode 100644 index 0000000000..6608416351 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/navigationupgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_printedcircuitboard": { + "conditions": { + "items": [ + { + "items": "opencomputers:printedcircuitboard" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:navigationupgrade" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_printedcircuitboard" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:navigationupgrade" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone.json new file mode 100644 index 0000000000..e52fa00e50 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_print": { + "conditions": { + "items": [ + { + "items": "opencomputers:print" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:print/glowstone" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_print" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:print/glowstone" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone_dust.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone_dust.json new file mode 100644 index 0000000000..24e6be39e9 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/print/glowstone_dust.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_print": { + "conditions": { + "items": [ + { + "items": "opencomputers:print" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:print/glowstone_dust" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_print" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:print/glowstone_dust" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/minecraft/advancement/recipes/misc/printedcircuitboard_from_smelting_rawcircuitboard.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/printedcircuitboard.json similarity index 77% rename from src/main/generatedResources/data/minecraft/advancement/recipes/misc/printedcircuitboard_from_smelting_rawcircuitboard.json rename to src/main/generatedResources/data/opencomputers/advancement/recipes/misc/printedcircuitboard.json index 5a558fba63..73c6d475da 100644 --- a/src/main/generatedResources/data/minecraft/advancement/recipes/misc/printedcircuitboard_from_smelting_rawcircuitboard.json +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/printedcircuitboard.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:printedcircuitboard_from_smelting_rawcircuitboard" + "recipe": "opencomputers:printedcircuitboard" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "minecraft:printedcircuitboard_from_smelting_rawcircuitboard" + "opencomputers:printedcircuitboard" ] } } \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/linkedcard.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/linkedcard.json new file mode 100644 index 0000000000..90efd9b082 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/linkedcard.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_chip3": { + "conditions": { + "items": [ + { + "items": "opencomputers:chip3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recrafting/linkedcard" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_chip3" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recrafting/linkedcard" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/navigationupgrade.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/navigationupgrade.json new file mode 100644 index 0000000000..445098955e --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recrafting/navigationupgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_navigationupgrade": { + "conditions": { + "items": [ + { + "items": "opencomputers:navigationupgrade" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recrafting/navigationupgrade" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_navigationupgrade" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recrafting/navigationupgrade" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingdrone.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingdrone.json new file mode 100644 index 0000000000..b62671bd30 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingdrone.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_drone": { + "conditions": { + "items": [ + { + "items": "opencomputers:drone" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recraftingdrone" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_drone" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recraftingdrone" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingmicrocontroller.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingmicrocontroller.json new file mode 100644 index 0000000000..9fde9400a4 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingmicrocontroller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_microcontroller": { + "conditions": { + "items": [ + { + "items": "opencomputers:microcontroller" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recraftingmicrocontroller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_microcontroller" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recraftingmicrocontroller" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingrobot.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingrobot.json new file mode 100644 index 0000000000..555d9263ef --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingrobot.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_robot": { + "conditions": { + "items": [ + { + "items": "opencomputers:robot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recraftingrobot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_robot" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recraftingrobot" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingtablet.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingtablet.json new file mode 100644 index 0000000000..8d1bd379b6 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/recraftingtablet.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_tablet": { + "conditions": { + "items": [ + { + "items": "opencomputers:tablet" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:recraftingtablet" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_tablet" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:recraftingtablet" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/rainbow_flag.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/rainbow_flag.json new file mode 100644 index 0000000000..e8091b0cc4 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/rainbow_flag.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_robot": { + "conditions": { + "items": [ + { + "items": "opencomputers:robot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:robot/rainbow_flag" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_robot" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:robot/rainbow_flag" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/trans_flag.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/trans_flag.json new file mode 100644 index 0000000000..a68ed117e6 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/robot/trans_flag.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_robot": { + "conditions": { + "items": [ + { + "items": "opencomputers:robot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:robot/trans_flag" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_robot" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:robot/trans_flag" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting1.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting1.json new file mode 100644 index 0000000000..d39953b614 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting1.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ssd1": { + "conditions": { + "items": [ + { + "items": "opencomputers:ssd1" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:ssd/formatting1" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_ssd1" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:ssd/formatting1" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting2.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting2.json new file mode 100644 index 0000000000..b0f9a0ba64 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting2.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ssd2": { + "conditions": { + "items": [ + { + "items": "opencomputers:ssd2" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:ssd/formatting2" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_ssd2" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:ssd/formatting2" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting3.json b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting3.json new file mode 100644 index 0000000000..06e460b0e7 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/advancement/recipes/misc/ssd/formatting3.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ssd3": { + "conditions": { + "items": [ + { + "items": "opencomputers:ssd3" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "opencomputers:ssd/formatting3" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_ssd3" + ] + ], + "rewards": { + "recipes": [ + "opencomputers:ssd/formatting3" + ] + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/apu1.json b/src/main/generatedResources/data/opencomputers/recipe/apu1.json new file mode 100644 index 0000000000..c4d2fcb6e6 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/apu1.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "B": { + "item": "opencomputers:componentbus1" + }, + "C": { + "item": "opencomputers:chip1" + }, + "G": { + "item": "opencomputers:graphicscard1" + }, + "P": { + "item": "opencomputers:cpu2" + }, + "g": { + "tag": "c:nuggets/gold" + } + }, + "pattern": [ + "gCg", + "PBG", + "gCg" + ], + "result": { + "count": 1, + "id": "opencomputers:apu1" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/apu2.json b/src/main/generatedResources/data/opencomputers/recipe/apu2.json new file mode 100644 index 0000000000..29916c3dd9 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/apu2.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "B": { + "item": "opencomputers:componentbus2" + }, + "C": { + "item": "opencomputers:chip2" + }, + "G": { + "item": "opencomputers:graphicscard2" + }, + "P": { + "item": "opencomputers:cpu3" + }, + "d": { + "item": "opencomputers:chipdiamond" + } + }, + "pattern": [ + "dCd", + "PBG", + "dCd" + ], + "result": { + "count": 1, + "id": "opencomputers:apu2" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/apu3.json b/src/main/generatedResources/data/opencomputers/recipe/apu3.json new file mode 100644 index 0000000000..d21537e3c2 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/apu3.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "B": { + "item": "opencomputers:componentbus3" + }, + "C": { + "item": "opencomputers:chip3" + }, + "G": { + "item": "opencomputers:graphicscard3" + }, + "P": { + "item": "opencomputers:cpu4" + }, + "n": { + "item": "opencomputers:netheritesilicon" + } + }, + "pattern": [ + "nCn", + "PBG", + "nCn" + ], + "result": { + "count": 1, + "id": "opencomputers:apu3" + } +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/colorize/cable.json b/src/main/generatedResources/data/opencomputers/recipe/colorize/cable.json similarity index 100% rename from src/main/resources/data/opencomputers/recipe/colorize/cable.json rename to src/main/generatedResources/data/opencomputers/recipe/colorize/cable.json diff --git a/src/main/resources/data/opencomputers/recipe/colorize/hoverboots.json b/src/main/generatedResources/data/opencomputers/recipe/colorize/hoverboots.json similarity index 100% rename from src/main/resources/data/opencomputers/recipe/colorize/hoverboots.json rename to src/main/generatedResources/data/opencomputers/recipe/colorize/hoverboots.json diff --git a/src/main/generatedResources/data/opencomputers/recipe/cpu1.json b/src/main/generatedResources/data/opencomputers/recipe/cpu1.json new file mode 100644 index 0000000000..00a79c5313 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/cpu1.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "A": { + "item": "opencomputers:alu" + }, + "C": { + "item": "opencomputers:chip1" + }, + "U": { + "item": "opencomputers:cu" + }, + "i": { + "tag": "c:nuggets/iron" + }, + "r": { + "tag": "c:dusts/redstone" + } + }, + "pattern": [ + "iri", + "CUC", + "iAi" + ], + "result": { + "count": 1, + "id": "opencomputers:cpu1" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/cpu2.json b/src/main/generatedResources/data/opencomputers/recipe/cpu2.json new file mode 100644 index 0000000000..7e4b7bdd45 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/cpu2.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "A": { + "item": "opencomputers:alu" + }, + "C": { + "item": "opencomputers:chip2" + }, + "U": { + "item": "opencomputers:cu" + }, + "g": { + "tag": "c:nuggets/gold" + }, + "r": { + "tag": "c:dusts/redstone" + } + }, + "pattern": [ + "grg", + "CUC", + "gAg" + ], + "result": { + "count": 1, + "id": "opencomputers:cpu2" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/cpu3.json b/src/main/generatedResources/data/opencomputers/recipe/cpu3.json new file mode 100644 index 0000000000..9c9d0ebfc3 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/cpu3.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "A": { + "item": "opencomputers:alu" + }, + "C": { + "item": "opencomputers:chip3" + }, + "U": { + "item": "opencomputers:cu" + }, + "d": { + "item": "opencomputers:chipdiamond" + }, + "r": { + "tag": "c:dusts/redstone" + } + }, + "pattern": [ + "drd", + "CUC", + "dAd" + ], + "result": { + "count": 1, + "id": "opencomputers:cpu3" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/cpu4.json b/src/main/generatedResources/data/opencomputers/recipe/cpu4.json new file mode 100644 index 0000000000..3f22a8149d --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/cpu4.json @@ -0,0 +1,35 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_default_architecture" + } + ], + "key": { + "A": { + "item": "opencomputers:alu" + }, + "C": { + "item": "opencomputers:chip4" + }, + "U": { + "item": "opencomputers:cu" + }, + "n": { + "item": "opencomputers:netheritesilicon" + }, + "r": { + "tag": "c:dusts/redstone" + } + }, + "pattern": [ + "nrn", + "CUC", + "nAn" + ], + "result": { + "count": 1, + "id": "opencomputers:cpu4" + } +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/decolorize/cable.json b/src/main/generatedResources/data/opencomputers/recipe/decolorize/cable.json similarity index 100% rename from src/main/resources/data/opencomputers/recipe/decolorize/cable.json rename to src/main/generatedResources/data/opencomputers/recipe/decolorize/cable.json diff --git a/src/main/resources/data/opencomputers/recipe/decolorize/hoverboots.json b/src/main/generatedResources/data/opencomputers/recipe/decolorize/hoverboots.json similarity index 100% rename from src/main/resources/data/opencomputers/recipe/decolorize/hoverboots.json rename to src/main/generatedResources/data/opencomputers/recipe/decolorize/hoverboots.json diff --git a/src/main/generatedResources/data/opencomputers/recipe/eeprom/copying.json b/src/main/generatedResources/data/opencomputers/recipe/eeprom/copying.json new file mode 100644 index 0000000000..291721ff20 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/eeprom/copying.json @@ -0,0 +1,27 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:address" + ], + "from": { + "item": "opencomputers:eeprom" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:eeprom" + }, + { + "item": "opencomputers:eeprom" + } + ], + "result": { + "count": 2, + "id": "opencomputers:eeprom" + } +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/eeprom/formatting.json b/src/main/generatedResources/data/opencomputers/recipe/eeprom/formatting.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/eeprom/formatting.json rename to src/main/generatedResources/data/opencomputers/recipe/eeprom/formatting.json index eb14def790..55d58fe4f3 100644 --- a/src/main/resources/data/opencomputers/recipe/eeprom/formatting.json +++ b/src/main/generatedResources/data/opencomputers/recipe/eeprom/formatting.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:eeprom" } ], "result": { + "count": 1, "id": "opencomputers:eeprom" } -} +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/eeprom/luabios.json b/src/main/generatedResources/data/opencomputers/recipe/eeprom/luabios.json new file mode 100644 index 0000000000..b54f944151 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/eeprom/luabios.json @@ -0,0 +1,26 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_eeprom_data", + "script": "bios.lua" + } + ], + "ingredients": [ + { + "item": "opencomputers:eeprom" + }, + { + "item": "opencomputers:manual" + } + ], + "result": { + "components": { + "opencomputers:label": "EEPROM (Lua BIOS)", + "opencomputers:readonly": false + }, + "count": 1, + "id": "opencomputers:eeprom" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/black.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/black.json new file mode 100644 index 0000000000..a7d25591b8 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/black.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/black" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "black" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/blue.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/blue.json new file mode 100644 index 0000000000..bfede50203 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/blue.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/blue" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "blue" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/brown.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/brown.json new file mode 100644 index 0000000000..71cc0ed7b1 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/brown.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/brown" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "brown" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/cyan.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/cyan.json new file mode 100644 index 0000000000..c82a34850a --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/cyan.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/cyan" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "cyan" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/gray.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/gray.json new file mode 100644 index 0000000000..49f7391ed7 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/gray.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/gray" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "gray" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/green.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/green.json new file mode 100644 index 0000000000..0911b18891 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/green.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/green" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "green" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_blue.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_blue.json new file mode 100644 index 0000000000..2fe6f84064 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_blue.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/light_blue" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "light_blue" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_gray.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_gray.json new file mode 100644 index 0000000000..e945cc813a --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/light_gray.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/light_gray" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "light_gray" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/lime.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/lime.json new file mode 100644 index 0000000000..73f93a4841 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/lime.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/lime" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "lime" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/magenta.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/magenta.json new file mode 100644 index 0000000000..4902fde576 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/magenta.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/magenta" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "magenta" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/orange.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/orange.json new file mode 100644 index 0000000000..ad056c2120 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/orange.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/orange" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "orange" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/pink.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/pink.json new file mode 100644 index 0000000000..bd9638dc5f --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/pink.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/pink" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "pink" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/purple.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/purple.json new file mode 100644 index 0000000000..7deae6aede --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/purple.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/purple" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "purple" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/red.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/red.json new file mode 100644 index 0000000000..96c2a7dcba --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/red.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/red" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "red" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/white.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/white.json new file mode 100644 index 0000000000..f6c96104ea --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/white.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/white" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "white" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/yellow.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/yellow.json new file mode 100644 index 0000000000..71b8739914 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/coloring/yellow.json @@ -0,0 +1,30 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:disk_color" + ], + "from": { + "item": "opencomputers:floppy" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + }, + { + "tag": "c:dyes/yellow" + } + ], + "result": { + "components": { + "opencomputers:disk_color": "yellow" + }, + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/floppy/formatting.json b/src/main/generatedResources/data/opencomputers/recipe/floppy/formatting.json new file mode 100644 index 0000000000..dab9173dcf --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/floppy/formatting.json @@ -0,0 +1,24 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:floppy" + }, + "include": [ + "opencomputers:disk_color" + ] + } + ], + "ingredients": [ + { + "item": "opencomputers:floppy" + } + ], + "result": { + "count": 1, + "id": "opencomputers:floppy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/hdd/formatting1.json b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting1.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/hdd/formatting1.json rename to src/main/generatedResources/data/opencomputers/recipe/hdd/formatting1.json index d78debc613..944b6ba09e 100644 --- a/src/main/resources/data/opencomputers/recipe/hdd/formatting1.json +++ b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting1.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:hdd1" } ], "result": { + "count": 1, "id": "opencomputers:hdd1" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/hdd/formatting2.json b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting2.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/hdd/formatting2.json rename to src/main/generatedResources/data/opencomputers/recipe/hdd/formatting2.json index 94d1690058..525ab59cbc 100644 --- a/src/main/resources/data/opencomputers/recipe/hdd/formatting2.json +++ b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting2.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:hdd2" } ], "result": { + "count": 1, "id": "opencomputers:hdd2" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/hdd/formatting3.json b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting3.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/hdd/formatting3.json rename to src/main/generatedResources/data/opencomputers/recipe/hdd/formatting3.json index 4c947386a9..d9c51c2ce9 100644 --- a/src/main/resources/data/opencomputers/recipe/hdd/formatting3.json +++ b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting3.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:hdd3" } ], "result": { + "count": 1, "id": "opencomputers:hdd3" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/hdd/formatting4.json b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting4.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/hdd/formatting4.json rename to src/main/generatedResources/data/opencomputers/recipe/hdd/formatting4.json index dc0556fdc7..ade8e51e9c 100644 --- a/src/main/resources/data/opencomputers/recipe/hdd/formatting4.json +++ b/src/main/generatedResources/data/opencomputers/recipe/hdd/formatting4.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:hdd4" } ], "result": { + "count": 1, "id": "opencomputers:hdd4" } -} +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/linkedcard.json b/src/main/generatedResources/data/opencomputers/recipe/linkedcard.json new file mode 100644 index 0000000000..696cc694d5 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/linkedcard.json @@ -0,0 +1,32 @@ +{ + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_unique_tunnel" + } + ], + "key": { + "C": { + "item": "opencomputers:chip3" + }, + "I": { + "item": "opencomputers:interweb" + }, + "L": { + "item": "opencomputers:internetcard" + }, + "e": { + "item": "minecraft:ender_eye" + } + }, + "pattern": [ + "e e", + "LIL", + "C C" + ], + "result": { + "count": 2, + "id": "opencomputers:linkedcard" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/lootdisks/cycling.json b/src/main/generatedResources/data/opencomputers/recipe/lootdisks/cycling.json new file mode 100644 index 0000000000..98fb8fbd1a --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/lootdisks/cycling.json @@ -0,0 +1,4 @@ +{ + "type": "opencomputers:crafting_lootdisk_cycling", + "category": "misc" +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/navigationupgrade.json b/src/main/generatedResources/data/opencomputers/recipe/navigationupgrade.json similarity index 57% rename from src/main/resources/data/opencomputers/recipe/navigationupgrade.json rename to src/main/generatedResources/data/opencomputers/recipe/navigationupgrade.json index cad0a3b30e..6773415875 100644 --- a/src/main/resources/data/opencomputers/recipe/navigationupgrade.json +++ b/src/main/generatedResources/data/opencomputers/recipe/navigationupgrade.json @@ -1,28 +1,38 @@ { - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "gcg", - "CmC", - "gpg" + "type": "opencomputers:transform_shaped", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_source_map", + "from": { + "item": "minecraft:filled_map" + } + } ], "key": { - "g": { - "tag": "c:ingots/gold" + "C": { + "item": "opencomputers:chip2" }, "c": { "item": "minecraft:compass" }, + "g": { + "tag": "c:ingots/gold" + }, "m": { "item": "minecraft:filled_map" }, "p": { "tag": "c:potions/bottle" - }, - "C": { - "tag": "opencomputers:circuitchip2" } }, + "pattern": [ + "gcg", + "CmC", + "gpg" + ], "result": { + "count": 1, "id": "opencomputers:navigationupgrade" } -} +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/print/glowstone.json b/src/main/generatedResources/data/opencomputers/recipe/print/glowstone.json new file mode 100644 index 0000000000..0063726257 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/print/glowstone.json @@ -0,0 +1,33 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:print" + } + }, + { + "type": "opencomputers:add_print_light", + "light": 4 + } + ], + "ingredients": [ + { + "item": "opencomputers:print" + }, + [ + { + "item": "minecraft:glowstone" + }, + { + "tag": "c:froglights" + } + ] + ], + "result": { + "count": 1, + "id": "opencomputers:print" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/print/glowstone_dust.json b/src/main/generatedResources/data/opencomputers/recipe/print/glowstone_dust.json new file mode 100644 index 0000000000..145eec5689 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/print/glowstone_dust.json @@ -0,0 +1,28 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:print" + } + }, + { + "type": "opencomputers:add_print_light", + "light": 1 + } + ], + "ingredients": [ + { + "item": "opencomputers:print" + }, + { + "tag": "c:dusts/glowstone" + } + ], + "result": { + "count": 1, + "id": "opencomputers:print" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/minecraft/recipe/printedcircuitboard_from_smelting_rawcircuitboard.json b/src/main/generatedResources/data/opencomputers/recipe/printedcircuitboard.json similarity index 100% rename from src/main/generatedResources/data/minecraft/recipe/printedcircuitboard_from_smelting_rawcircuitboard.json rename to src/main/generatedResources/data/opencomputers/recipe/printedcircuitboard.json diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/linkedcard.json b/src/main/generatedResources/data/opencomputers/recipe/recrafting/linkedcard.json similarity index 57% rename from src/main/resources/data/opencomputers/recipe/recrafting/linkedcard.json rename to src/main/generatedResources/data/opencomputers/recipe/recrafting/linkedcard.json index e3a7084456..d498fc508a 100644 --- a/src/main/resources/data/opencomputers/recipe/recrafting/linkedcard.json +++ b/src/main/generatedResources/data/opencomputers/recipe/recrafting/linkedcard.json @@ -1,5 +1,11 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_unique_tunnel" + } + ], "ingredients": [ { "item": "opencomputers:linkedcard" @@ -12,4 +18,4 @@ "count": 2, "id": "opencomputers:linkedcard" } -} +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/recrafting/navigationupgrade.json b/src/main/generatedResources/data/opencomputers/recipe/recrafting/navigationupgrade.json new file mode 100644 index 0000000000..6f33252f27 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/recrafting/navigationupgrade.json @@ -0,0 +1,24 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:set_source_map", + "from": { + "item": "minecraft:filled_map" + } + } + ], + "ingredients": [ + { + "item": "opencomputers:navigationupgrade" + }, + { + "item": "minecraft:filled_map" + } + ], + "result": { + "count": 1, + "id": "opencomputers:navigationupgrade" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/recraftingdrone.json b/src/main/generatedResources/data/opencomputers/recipe/recraftingdrone.json new file mode 100644 index 0000000000..306a335aae --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/recraftingdrone.json @@ -0,0 +1,27 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:drone" + } + }, + { + "type": "opencomputers:replace_eeprom" + } + ], + "ingredients": [ + { + "item": "opencomputers:drone" + }, + { + "item": "opencomputers:eeprom" + } + ], + "result": { + "count": 1, + "id": "opencomputers:drone" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/recraftingmicrocontroller.json b/src/main/generatedResources/data/opencomputers/recipe/recraftingmicrocontroller.json new file mode 100644 index 0000000000..8dd5427b45 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/recraftingmicrocontroller.json @@ -0,0 +1,27 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:microcontroller" + } + }, + { + "type": "opencomputers:replace_eeprom" + } + ], + "ingredients": [ + { + "item": "opencomputers:microcontroller" + }, + { + "item": "opencomputers:eeprom" + } + ], + "result": { + "count": 1, + "id": "opencomputers:microcontroller" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/recraftingrobot.json b/src/main/generatedResources/data/opencomputers/recipe/recraftingrobot.json new file mode 100644 index 0000000000..0392e61473 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/recraftingrobot.json @@ -0,0 +1,27 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:robot" + } + }, + { + "type": "opencomputers:replace_eeprom" + } + ], + "ingredients": [ + { + "item": "opencomputers:robot" + }, + { + "item": "opencomputers:eeprom" + } + ], + "result": { + "count": 1, + "id": "opencomputers:robot" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/recraftingtablet.json b/src/main/generatedResources/data/opencomputers/recipe/recraftingtablet.json new file mode 100644 index 0000000000..7f8a4f232c --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/recraftingtablet.json @@ -0,0 +1,27 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "from": { + "item": "opencomputers:tablet" + } + }, + { + "type": "opencomputers:replace_eeprom" + } + ], + "ingredients": [ + { + "item": "opencomputers:tablet" + }, + { + "item": "opencomputers:eeprom" + } + ], + "result": { + "count": 1, + "id": "opencomputers:tablet" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/robot/rainbow_flag.json b/src/main/generatedResources/data/opencomputers/recipe/robot/rainbow_flag.json new file mode 100644 index 0000000000..1b52c97086 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/robot/rainbow_flag.json @@ -0,0 +1,48 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:robot_flag" + ], + "from": { + "item": "opencomputers:robot" + } + } + ], + "ingredients": [ + { + "tag": "c:dyes/red" + }, + { + "tag": "c:dyes/orange" + }, + { + "tag": "c:dyes/yellow" + }, + { + "tag": "c:dyes/green" + }, + { + "tag": "c:dyes/blue" + }, + { + "tag": "c:dyes/purple" + }, + { + "item": "minecraft:stick" + }, + { + "item": "opencomputers:robot" + } + ], + "result": { + "components": { + "opencomputers:robot_flag": "opencomputers:rainbow_flag" + }, + "count": 1, + "id": "opencomputers:robot" + } +} \ No newline at end of file diff --git a/src/main/generatedResources/data/opencomputers/recipe/robot/trans_flag.json b/src/main/generatedResources/data/opencomputers/recipe/robot/trans_flag.json new file mode 100644 index 0000000000..c5ce502630 --- /dev/null +++ b/src/main/generatedResources/data/opencomputers/recipe/robot/trans_flag.json @@ -0,0 +1,39 @@ +{ + "type": "opencomputers:transform_shapeless", + "category": "misc", + "functions": [ + { + "type": "opencomputers:copy_components", + "exclude": [ + "opencomputers:robot_flag" + ], + "from": { + "item": "opencomputers:robot" + } + } + ], + "ingredients": [ + { + "tag": "c:dyes/light_blue" + }, + { + "tag": "c:dyes/pink" + }, + { + "tag": "c:dyes/white" + }, + { + "item": "minecraft:stick" + }, + { + "item": "opencomputers:robot" + } + ], + "result": { + "components": { + "opencomputers:robot_flag": "opencomputers:trans_flag" + }, + "count": 1, + "id": "opencomputers:robot" + } +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/ssd/formatting1.json b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting1.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/ssd/formatting1.json rename to src/main/generatedResources/data/opencomputers/recipe/ssd/formatting1.json index 444a1d72eb..2087309f2d 100644 --- a/src/main/resources/data/opencomputers/recipe/ssd/formatting1.json +++ b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting1.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:ssd1" } ], "result": { + "count": 1, "id": "opencomputers:ssd1" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/ssd/formatting2.json b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting2.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/ssd/formatting2.json rename to src/main/generatedResources/data/opencomputers/recipe/ssd/formatting2.json index 73329e7ddc..fab0cc184b 100644 --- a/src/main/resources/data/opencomputers/recipe/ssd/formatting2.json +++ b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting2.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:ssd2" } ], "result": { + "count": 1, "id": "opencomputers:ssd2" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/ssd/formatting3.json b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting3.json similarity index 60% rename from src/main/resources/data/opencomputers/recipe/ssd/formatting3.json rename to src/main/generatedResources/data/opencomputers/recipe/ssd/formatting3.json index d835864b2a..a885db72b0 100644 --- a/src/main/resources/data/opencomputers/recipe/ssd/formatting3.json +++ b/src/main/generatedResources/data/opencomputers/recipe/ssd/formatting3.json @@ -1,11 +1,13 @@ { - "type": "opencomputers:crafting_shapeless_extended", + "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "opencomputers:ssd3" } ], "result": { + "count": 1, "id": "opencomputers:ssd3" } -} +} \ No newline at end of file diff --git a/src/main/java/li/cil/oc/common/recipe/BasicRecipeSerializer.java b/src/main/java/li/cil/oc/common/recipe/BasicRecipeSerializer.java new file mode 100644 index 0000000000..92aadbedd2 --- /dev/null +++ b/src/main/java/li/cil/oc/common/recipe/BasicRecipeSerializer.java @@ -0,0 +1,12 @@ +package li.cil.oc.common.recipe; + +import com.mojang.serialization.MapCodec; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; + +record BasicRecipeSerializer>( + MapCodec codec, StreamCodec streamCodec +) implements RecipeSerializer { +} diff --git a/src/main/java/li/cil/oc/common/recipe/TransformShapedRecipe.java b/src/main/java/li/cil/oc/common/recipe/TransformShapedRecipe.java new file mode 100644 index 0000000000..a22fba0c6d --- /dev/null +++ b/src/main/java/li/cil/oc/common/recipe/TransformShapedRecipe.java @@ -0,0 +1,73 @@ +package li.cil.oc.common.recipe; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import li.cil.oc.common.recipe.function.RecipeFunction; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.RegistryAccess; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.*; + +import java.util.List; + +import static li.cil.oc.common.recipe.TransformShapelessRecipe.configureResult; + +/** + * A {@link ShapedRecipe} that applies a list of {@linkplain RecipeFunction recipe functions}. + */ +public final class TransformShapedRecipe extends ShapedRecipe { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group( + RecipeSerializer.SHAPED_RECIPE.codec().forGetter(TransformShapedRecipe::getOriginal), + RecipeFunction.LIST_CODEC.fieldOf("functions").forGetter(x -> x.functions) + ).apply(instance, (r, funcs) -> + new TransformShapedRecipe(r.getGroup(), r.category(), r.pattern, r.getResultItem(RegistryAccess.EMPTY), funcs) + )); + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + RecipeSerializer.SHAPED_RECIPE.streamCodec(), TransformShapedRecipe::getOriginal, + ItemStack.STREAM_CODEC, x -> x.transformedResult, + RecipeFunction.LIST_STREAM_CODEC, x -> x.functions, + (r, transRes, funcs) -> + new TransformShapedRecipe(r.getGroup(), r.category(), r.pattern, r.getResultItem(RegistryAccess.EMPTY), transRes, funcs) + ); + + public static final RecipeSerializer SERIALIZER = new BasicRecipeSerializer<>(CODEC, STREAM_CODEC); + + private final List functions; + private final ItemStack originalResult; + private final ItemStack transformedResult; + + public TransformShapedRecipe( + String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result, List functions + ) { + this(group, category, pattern, result, configureResult(result, functions), functions); + } + + private TransformShapedRecipe( + String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack originalResult, ItemStack transformedResult, List functions + ) { + super(group, category, pattern, transformedResult); + this.functions = functions; + this.originalResult = originalResult; + this.transformedResult = transformedResult; + } + + private ShapedRecipe getOriginal() { + return new ShapedRecipe(getGroup(), category(), pattern, originalResult); + } + + @Override + public ItemStack assemble(CraftingInput inventory, HolderLookup.Provider registryAccess) { + var result = super.assemble(inventory, registryAccess); + for (var function : functions) result = function.apply(inventory, result); + return result; + } + + @Override + public RecipeSerializer getSerializer() { + return SERIALIZER; + } +} + diff --git a/src/main/java/li/cil/oc/common/recipe/TransformShapelessRecipe.java b/src/main/java/li/cil/oc/common/recipe/TransformShapelessRecipe.java new file mode 100644 index 0000000000..ce307c123e --- /dev/null +++ b/src/main/java/li/cil/oc/common/recipe/TransformShapelessRecipe.java @@ -0,0 +1,79 @@ +package li.cil.oc.common.recipe; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import li.cil.oc.common.recipe.function.RecipeFunction; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.NonNullList; +import net.minecraft.core.RegistryAccess; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.*; + +import java.util.List; + +/** + * A {@link ShapelessRecipe} that applies a list of {@linkplain RecipeFunction recipe functions}. + */ +public final class TransformShapelessRecipe extends ShapelessRecipe { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group( + RecipeSerializer.SHAPELESS_RECIPE.codec().forGetter(TransformShapelessRecipe::getOriginal), + RecipeFunction.LIST_CODEC.fieldOf("functions").forGetter(x -> x.functions) + ).apply(instance, (r, funcs) -> + new TransformShapelessRecipe(r.getGroup(), r.category(), r.getResultItem(RegistryAccess.EMPTY), r.getIngredients(), funcs) + )); + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + RecipeSerializer.SHAPELESS_RECIPE.streamCodec(), TransformShapelessRecipe::getOriginal, + ItemStack.OPTIONAL_STREAM_CODEC, x -> x.transformedResult, + RecipeFunction.LIST_STREAM_CODEC, x -> x.functions, + (r, transRes, funcs) -> + new TransformShapelessRecipe(r.getGroup(), r.category(), r.getResultItem(RegistryAccess.EMPTY), transRes, r.getIngredients(), funcs) + ); + + public static final RecipeSerializer SERIALIZER = new BasicRecipeSerializer<>(CODEC, STREAM_CODEC); + + private final List functions; + private final ItemStack originalResult; + private final ItemStack transformedResult; + + public TransformShapelessRecipe( + String group, CraftingBookCategory category, ItemStack result, NonNullList ingredients, List functions + ) { + this(group, category, result, configureResult(result, functions), ingredients, functions); + } + + private TransformShapelessRecipe( + String group, CraftingBookCategory category, ItemStack originalResult, ItemStack transformedResult, NonNullList ingredients, + List functions + ) { + super(group, category, transformedResult, ingredients); + this.originalResult = originalResult; + this.transformedResult = transformedResult; + this.functions = functions; + } + + private ShapelessRecipe getOriginal() { + return new ShapelessRecipe(getGroup(), category(), originalResult, getIngredients()); + } + + static ItemStack configureResult(ItemStack stack, List functions) { + var result = stack.copy(); + for (var function : functions) function.configureResult(result); + return result; + } + + @Override + public ItemStack assemble(CraftingInput inventory, HolderLookup.Provider registryAccess) { + var result = super.assemble(inventory, registryAccess); + for (var function : functions) result = function.apply(inventory, result); + return result; + } + + @Override + public RecipeSerializer getSerializer() { + return SERIALIZER; + } +} + diff --git a/src/main/java/li/cil/oc/common/recipe/function/CopyComponents.java b/src/main/java/li/cil/oc/common/recipe/function/CopyComponents.java new file mode 100644 index 0000000000..6165510bed --- /dev/null +++ b/src/main/java/li/cil/oc/common/recipe/function/CopyComponents.java @@ -0,0 +1,177 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.core.component.DataComponentPatch; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction; +import org.jspecify.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +/** + * A {@link RecipeFunction} that copies components from one of the ingredients to the result. + *

+ * This has the same behaviour as {@linkplain CopyComponentsFunction}, but operating within the scope of recipes. + */ +public final class CopyComponents implements RecipeFunction { + private static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group( + Ingredient.CODEC_NONEMPTY.fieldOf("from").forGetter(x -> x.from), + DataComponentType.CODEC.listOf().optionalFieldOf("include").forGetter(x -> x.include), + DataComponentType.CODEC.listOf().optionalFieldOf("exclude").forGetter(x -> x.exclude) + ).apply(instance, CopyComponents::new)); + + private static final StreamCodec STREAM_CODEC = StreamCodec.composite( + Ingredient.CONTENTS_STREAM_CODEC, x -> x.from, + ByteBufCodecs.optional(DataComponentType.STREAM_CODEC.apply(ByteBufCodecs.list())), x -> x.include, + ByteBufCodecs.optional(DataComponentType.STREAM_CODEC.apply(ByteBufCodecs.list())), x -> x.exclude, + CopyComponents::new + ); + + public static final RecipeFunction.Type TYPE = new RecipeFunction.Type<>(CODEC, STREAM_CODEC); + + private final Ingredient from; + private final Optional>> include; + private final Optional>> exclude; + + private final @Nullable Set> includeSet; + private final @Nullable Set> excludeSet; + + /** + * Create a new {@link CopyComponents} that copies all components from an ingredient. + * + * @param from The ingredient to copy from. + */ + public CopyComponents(Ingredient from) { + this(from, Optional.empty(), Optional.empty()); + } + + /** + * Create a new {@link CopyComponents} that copies all components from an ingredient. + * + * @param from The ingredient to copy from. + */ + public CopyComponents(ItemLike from) { + this(Ingredient.of(from)); + } + + private CopyComponents(Ingredient from, Optional>> include, Optional>> exclude) { + this.from = from; + this.include = include.map(List::copyOf); + this.exclude = exclude.map(List::copyOf); + + includeSet = include.map(Set::copyOf).orElse(null); + excludeSet = exclude.map(Set::copyOf).orElse(null); + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ItemStack apply(CraftingInput container, ItemStack result) { + for (var item : container.items()) { + if (from.test(item)) { + applyPatch(item.getComponentsPatch(), result); + break; + } + } + + return result; + } + + private void applyPatch(DataComponentPatch patch, ItemStack result) { + if (includeSet == null && excludeSet == null) { + result.applyComponents(patch); + return; + } + + // Only apply components in the include set (if present) and not in the exclude set (if present). + for (var component : patch.entrySet()) { + var type = component.getKey(); + if ((includeSet == null || includeSet.contains(type)) && (excludeSet == null || !excludeSet.contains(type))) { + unsafeSetComponent(result, type, component.getValue().orElse(null)); + } + } + } + + @SuppressWarnings("unchecked") + private static void unsafeSetComponent(ItemStack stack, DataComponentType type, @Nullable T value) { + stack.set((DataComponentType) type, value); + } + + /** + * Create a new {@link CopyComponents} builder, that copies components from an ingredient. + * + * @param ingredient The ingredient to copy from. + * @return The builder. + */ + public static Builder builder(Ingredient ingredient) { + return new Builder(ingredient); + } + + /** + * Create a new {@link CopyComponents} builder, that copies components from an ingredient. + * + * @param ingredient The ingredient to copy from. + * @return The builder. + */ + public static Builder builder(ItemLike ingredient) { + return new Builder(Ingredient.of(ingredient)); + } + + public static final class Builder { + private final Ingredient from; + private @Nullable List> include; + private @Nullable List> exclude; + + private Builder(Ingredient from) { + this.from = from; + } + + /** + * Only copy the specified component. + * + * @param type The component to include. + * @return {@code this}, for chaining. + */ + public Builder include(DataComponentType type) { + if (this.include == null) include = new ArrayList<>(); + include.add(type); + return this; + } + + /** + * Exclude a component from being copied. + * + * @param type The component to exclude. + * @return {@code this}, for chaining. + */ + public Builder exclude(DataComponentType type) { + if (exclude == null) exclude = new ArrayList<>(); + exclude.add(type); + return this; + } + + /** + * Build the resulting {@link CopyComponents} instance. + * + * @return The constructed {@link CopyComponents} recipe function. + */ + public CopyComponents build() { + return new CopyComponents(from, Optional.ofNullable(include), Optional.ofNullable(exclude)); + } + } +} + diff --git a/src/main/java/li/cil/oc/common/recipe/function/RecipeFunction.java b/src/main/java/li/cil/oc/common/recipe/function/RecipeFunction.java new file mode 100644 index 0000000000..09bfddb3aa --- /dev/null +++ b/src/main/java/li/cil/oc/common/recipe/function/RecipeFunction.java @@ -0,0 +1,99 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import li.cil.oc.common.recipe.TransformShapedRecipe; +import li.cil.oc.common.recipe.TransformShapelessRecipe; +import net.minecraft.core.Registry; +import net.minecraft.core.RegistryAccess; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; + +import java.util.List; + +/** + * A function that is applied to the result of a recipe, mutating it in some way. These can be used from within a recipe + * JSON file to define basic dynamic recipes, rather than having to fall back to Java. + *

+ * For instance, the recipe to dye a floppy, is defined as a basic shaped recipes plus an additional + * {@link CopyComponents} function, that copies all components but the color from the floppy. + *

+ * The design and implementation of these are very similar to Minecraft's existing {@linkplain LootItemFunction loot + * functions}. + * + * @see TransformShapedRecipe + * @see TransformShapelessRecipe + */ +public interface RecipeFunction { + /** + * The registry where {@link RecipeFunction}s are registered. + */ + ResourceKey>> REGISTRY = ResourceKey.createRegistryKey(ResourceLocation.fromNamespaceAndPath("opencomputers", "recipe_function")); + + /** + * The codec to read and write {@link RecipeFunction}s with. + */ + Codec CODEC = Codec + .lazyInitialized(() -> RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY).registryOrThrow(REGISTRY).byNameCodec()) + .dispatch(RecipeFunction::getType, Type::codec); + + /** + * A codec for a list of functions. + */ + Codec> LIST_CODEC = CODEC.listOf(1, Integer.MAX_VALUE); + + /** + * The {@link StreamCodec} equivalent of {@link #CODEC}. + */ + StreamCodec STREAM_CODEC = ByteBufCodecs.registry(REGISTRY).dispatch(RecipeFunction::getType, Type::streamCodec); + + /** + * The {@link StreamCodec} equivalent of {@link #LIST_CODEC}. + */ + StreamCodec> LIST_STREAM_CODEC = STREAM_CODEC.apply(ByteBufCodecs.list()); + + /** + * Get the type of this recipe function. + * + * @return The type of this recipe function. + */ + Type getType(); + + /** + * Modify the static result of this recipe. + * + * @param result The stack to modify. + */ + default void configureResult(ItemStack result) { + } + + /** + * Apply this recipe function, modifying the result item. + * + * @param container The current crafting container. + * @param result The result item to modify. This may be mutated in place. + * @return The new result item. This may be {@code result}. + */ + default ItemStack apply(CraftingInput container, ItemStack result) { + return result; + } + + /** + * Properties about a type of {@link RecipeFunction}. These are stored in {@linkplain #REGISTRY a Minecraft + * registry}, and returned by {@link #getType()}. + * + * @param codec The codec to read and write this class of recipe functions with. + * @param streamCodec The network codec to read and write this class of recipe functions with. + * @param The type of recipe function. + */ + record Type(MapCodec codec, StreamCodec streamCodec) { + } +} + diff --git a/src/main/resources/data/opencomputers/recipe/apu1.json b/src/main/resources/data/opencomputers/recipe/apu1.json deleted file mode 100644 index 72fbcb548c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/apu1.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "gCg", - "PBG", - "gCg" - ], - "key": { - "g": { - "tag": "c:nuggets/gold" - }, - "C": { - "tag": "opencomputers:circuitchip1" - }, - "B": { - "tag": "opencomputers:componentbus1" - }, - "P": { - "tag": "opencomputers:cpu2" - }, - "G": { - "tag": "opencomputers:graphicscard1" - } - }, - "result": { - "id": "opencomputers:apu1" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/apu2.json b/src/main/resources/data/opencomputers/recipe/apu2.json deleted file mode 100644 index ccd81cc012..0000000000 --- a/src/main/resources/data/opencomputers/recipe/apu2.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "dCd", - "PBG", - "dCd" - ], - "key": { - "d": { - "tag": "opencomputers:chipdiamond" - }, - "C": { - "tag": "opencomputers:circuitchip2" - }, - "B": { - "tag": "opencomputers:componentbus2" - }, - "P": { - "tag": "opencomputers:cpu3" - }, - "G": { - "tag": "opencomputers:graphicscard2" - } - }, - "result": { - "id": "opencomputers:apu2" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/apu3.json b/src/main/resources/data/opencomputers/recipe/apu3.json deleted file mode 100644 index d18fdd06d6..0000000000 --- a/src/main/resources/data/opencomputers/recipe/apu3.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "nCn", - "PBG", - "nCn" - ], - "key": { - "n": { - "tag": "opencomputers:siliconnetherite" - }, - "C": { - "tag": "opencomputers:circuitchip3" - }, - "B": { - "tag": "opencomputers:componentbus3" - }, - "P": { - "tag": "opencomputers:cpu4" - }, - "G": { - "tag": "opencomputers:graphicscard3" - } - }, - "result": { - "id": "opencomputers:apu3" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/cpu1.json b/src/main/resources/data/opencomputers/recipe/cpu1.json deleted file mode 100644 index fba0da9e10..0000000000 --- a/src/main/resources/data/opencomputers/recipe/cpu1.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "iri", - "CUC", - "iAi" - ], - "key": { - "i": { - "tag": "c:nuggets/iron" - }, - "r": { - "tag": "c:dusts/redstone" - }, - "C": { - "tag": "opencomputers:circuitchip1" - }, - "U": { - "tag": "opencomputers:materialcu" - }, - "A": { - "tag": "opencomputers:materialalu" - } - }, - "result": { - "id": "opencomputers:cpu1" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/cpu2.json b/src/main/resources/data/opencomputers/recipe/cpu2.json deleted file mode 100644 index f3661763e6..0000000000 --- a/src/main/resources/data/opencomputers/recipe/cpu2.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "grg", - "CUC", - "gAg" - ], - "key": { - "g": { - "tag": "c:nuggets/gold" - }, - "r": { - "tag": "c:dusts/redstone" - }, - "C": { - "tag": "opencomputers:circuitchip2" - }, - "U": { - "tag": "opencomputers:materialcu" - }, - "A": { - "tag": "opencomputers:materialalu" - } - }, - "result": { - "id": "opencomputers:cpu2" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/cpu3.json b/src/main/resources/data/opencomputers/recipe/cpu3.json deleted file mode 100644 index 52cae8b470..0000000000 --- a/src/main/resources/data/opencomputers/recipe/cpu3.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "drd", - "CUC", - "dAd" - ], - "key": { - "d": { - "tag": "opencomputers:chipdiamond" - }, - "r": { - "tag": "c:dusts/redstone" - }, - "C": { - "tag": "opencomputers:circuitchip3" - }, - "U": { - "tag": "opencomputers:materialcu" - }, - "A": { - "tag": "opencomputers:materialalu" - } - }, - "result": { - "id": "opencomputers:cpu3" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/cpu4.json b/src/main/resources/data/opencomputers/recipe/cpu4.json deleted file mode 100644 index 95f0a917c3..0000000000 --- a/src/main/resources/data/opencomputers/recipe/cpu4.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "nrn", - "CUC", - "nAn" - ], - "key": { - "n": { - "tag": "opencomputers:siliconnetherite" - }, - "r": { - "tag": "c:dusts/redstone" - }, - "C": { - "tag": "opencomputers:circuitchip4" - }, - "U": { - "tag": "opencomputers:materialcu" - }, - "A": { - "tag": "opencomputers:materialalu" - } - }, - "result": { - "id": "opencomputers:cpu4" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/eeprom/copying.json b/src/main/resources/data/opencomputers/recipe/eeprom/copying.json deleted file mode 100644 index 400c782494..0000000000 --- a/src/main/resources/data/opencomputers/recipe/eeprom/copying.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:eeprom" - }, - { - "item": "opencomputers:eeprom" - } - ], - "result": { - "count": 2, - "id": "opencomputers:eeprom" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/eeprom/luabios.json b/src/main/resources/data/opencomputers/recipe/eeprom/luabios.json deleted file mode 100644 index 7423d21a2b..0000000000 --- a/src/main/resources/data/opencomputers/recipe/eeprom/luabios.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:eeprom" - }, - { - "tag": "opencomputers:manual" - } - ], - "result": { - "id": "opencomputers:eeprom", - "components": { - "minecraft:custom_data": { - "oc:data": { - "oc:label": "EEPROM (Lua BIOS)", - "oc:eeprom": "bios.lua", - "oc:readonly": false - } - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/black.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/black.json deleted file mode 100644 index b13eca1d25..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/black.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/black" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 15 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/blue.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/blue.json deleted file mode 100644 index 8ca371a9a4..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/blue.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/blue" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 11 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/brown.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/brown.json deleted file mode 100644 index 77ba8832bb..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/brown.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/brown" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 12 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/cyan.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/cyan.json deleted file mode 100644 index 55e363a0a9..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/cyan.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/cyan" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 9 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/gray.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/gray.json deleted file mode 100644 index c4e6ec0f0d..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/gray.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/gray" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 7 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/green.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/green.json deleted file mode 100644 index 7d87549cda..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/green.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/green" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 13 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_blue.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_blue.json deleted file mode 100644 index aee49c23d5..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_blue.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/light_blue" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 3 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_gray.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_gray.json deleted file mode 100644 index 3742aca2d1..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/light_gray.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/light_gray" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 8 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/lime.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/lime.json deleted file mode 100644 index 729c4e284c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/lime.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/lime" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 5 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/magenta.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/magenta.json deleted file mode 100644 index c543dd976a..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/magenta.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/magenta" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 2 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/orange.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/orange.json deleted file mode 100644 index cdce7312c4..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/orange.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/orange" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 1 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/pink.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/pink.json deleted file mode 100644 index 63dc6cec93..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/pink.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/pink" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 6 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/purple.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/purple.json deleted file mode 100644 index 2e1505f524..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/purple.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/purple" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 10 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/red.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/red.json deleted file mode 100644 index 975faceb6c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/red.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/red" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 14 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/white.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/white.json deleted file mode 100644 index d2719787c0..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/white.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/white" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 0 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/coloring/yellow.json b/src/main/resources/data/opencomputers/recipe/floppy/coloring/yellow.json deleted file mode 100644 index 2137bd4753..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/coloring/yellow.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - }, - { - "tag": "c:dyes/yellow" - } - ], - "result": { - "id": "opencomputers:floppy", - "components": { - "minecraft:custom_data": { - "oc:color": 4 - } - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/floppy/formatting.json b/src/main/resources/data/opencomputers/recipe/floppy/formatting.json deleted file mode 100644 index 0b50ee9980..0000000000 --- a/src/main/resources/data/opencomputers/recipe/floppy/formatting.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:floppy" - } - ], - "result": { - "id": "opencomputers:floppy" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/linkedcard.json b/src/main/resources/data/opencomputers/recipe/linkedcard.json deleted file mode 100644 index 2de242ed6f..0000000000 --- a/src/main/resources/data/opencomputers/recipe/linkedcard.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "opencomputers:crafting_shaped_extended", - "pattern": [ - "e e", - "LIL", - "C C" - ], - "key": { - "e": { - "item": "minecraft:ender_eye" - }, - "C": { - "tag": "opencomputers:circuitchip3" - }, - "I": { - "tag": "opencomputers:materialinterweb" - }, - "L": { - "tag": "opencomputers:lancard" - } - }, - "result": { - "count": 2, - "id": "opencomputers:linkedcard" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/lootdisks/cycling.json b/src/main/resources/data/opencomputers/recipe/lootdisks/cycling.json deleted file mode 100644 index 61e59a9a0b..0000000000 --- a/src/main/resources/data/opencomputers/recipe/lootdisks/cycling.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "opencomputers:crafting_lootdisk_cycling" -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/recipe/print/beacon.json b/src/main/resources/data/opencomputers/recipe/print/beacon.json deleted file mode 100644 index 3c84c9a90d..0000000000 --- a/src/main/resources/data/opencomputers/recipe/print/beacon.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:print" - }, - { - "tag": "c:beacon_base_blocks" - } - ], - "result": { - "id": "opencomputers:print" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/print/glowstone.json b/src/main/resources/data/opencomputers/recipe/print/glowstone.json deleted file mode 100644 index 6f344bf89d..0000000000 --- a/src/main/resources/data/opencomputers/recipe/print/glowstone.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:print" - }, - { - "item": "minecraft:glowstone" - } - ], - "result": { - "id": "opencomputers:print" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/print/glowstone_dust.json b/src/main/resources/data/opencomputers/recipe/print/glowstone_dust.json deleted file mode 100644 index 2cecae5c6c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/print/glowstone_dust.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:print" - }, - { - "tag": "c:dusts/glowstone" - } - ], - "result": { - "id": "opencomputers:print" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/printedcircuitboard.json b/src/main/resources/data/opencomputers/recipe/printedcircuitboard.json deleted file mode 100644 index 658e6b4b43..0000000000 --- a/src/main/resources/data/opencomputers/recipe/printedcircuitboard.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "opencomputers:materialcircuitboardraw" - }, - "result": { - "id": "opencomputers:printedcircuitboard" - }, - "experience": 0.1, - "cookingtime": 200 -} diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/drone.json b/src/main/resources/data/opencomputers/recipe/recrafting/drone.json deleted file mode 100644 index 18cec93933..0000000000 --- a/src/main/resources/data/opencomputers/recipe/recrafting/drone.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:drone" - }, - { - "item": "opencomputers:eeprom" - } - ], - "result": { - "id": "opencomputers:drone" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/microcontroller.json b/src/main/resources/data/opencomputers/recipe/recrafting/microcontroller.json deleted file mode 100644 index 70c6eeeaea..0000000000 --- a/src/main/resources/data/opencomputers/recipe/recrafting/microcontroller.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:microcontroller" - }, - { - "item": "opencomputers:eeprom" - } - ], - "result": { - "id": "opencomputers:microcontroller" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/navigationupgrade.json b/src/main/resources/data/opencomputers/recipe/recrafting/navigationupgrade.json deleted file mode 100644 index 8c404f9c3a..0000000000 --- a/src/main/resources/data/opencomputers/recipe/recrafting/navigationupgrade.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:navigationupgrade" - }, - { - "item": "minecraft:filled_map" - } - ], - "result": { - "id": "opencomputers:navigationupgrade" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/robot.json b/src/main/resources/data/opencomputers/recipe/recrafting/robot.json deleted file mode 100644 index 3a1673af4c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/recrafting/robot.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:robot" - }, - { - "item": "opencomputers:eeprom" - } - ], - "result": { - "id": "opencomputers:robot" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/recrafting/tablet.json b/src/main/resources/data/opencomputers/recipe/recrafting/tablet.json deleted file mode 100644 index d6ea55d673..0000000000 --- a/src/main/resources/data/opencomputers/recipe/recrafting/tablet.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "opencomputers:crafting_shapeless_extended", - "ingredients": [ - { - "item": "opencomputers:tablet" - }, - { - "item": "opencomputers:eeprom" - } - ], - "result": { - "id": "opencomputers:tablet" - } -} diff --git a/src/main/resources/data/opencomputers/recipe/robot/rainbow_flag.json b/src/main/resources/data/opencomputers/recipe/robot/rainbow_flag.json deleted file mode 100644 index a90833abfb..0000000000 --- a/src/main/resources/data/opencomputers/recipe/robot/rainbow_flag.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "opencomputers:crafting_robot_flag", - "category": "redstone", - "ingredients": [ - { "tag": "c:dyes/red" }, - { "tag": "c:dyes/orange" }, - { "tag": "c:dyes/yellow" }, - { "tag": "c:dyes/green" }, - { "tag": "c:dyes/blue" }, - { "tag": "c:dyes/purple" }, - { "item": "minecraft:stick" }, - { "item": "opencomputers:robot" } - ], - "result": { - "count": 1, - "id": "opencomputers:robot", - "components": { - "opencomputers:robot_flag": "opencomputers:rainbow_flag" - } - } -} diff --git a/src/main/resources/data/opencomputers/recipe/robot/trans_flag.json b/src/main/resources/data/opencomputers/recipe/robot/trans_flag.json deleted file mode 100644 index 3bc2f6638c..0000000000 --- a/src/main/resources/data/opencomputers/recipe/robot/trans_flag.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "opencomputers:crafting_robot_flag", - "category": "redstone", - "ingredients": [ - { "tag": "c:dyes/light_blue" }, - { "tag": "c:dyes/pink" }, - { "tag": "c:dyes/white" }, - { "item": "minecraft:stick" }, - { "item": "opencomputers:robot" } - ], - "result": { - "count": 1, - "id": "opencomputers:robot", - "components": { - "opencomputers:robot_flag": "opencomputers:trans_flag" - } - } -} diff --git a/src/main/resources/data/opencomputers/tags/item/adapter.json b/src/main/resources/data/opencomputers/tags/item/adapter.json deleted file mode 100644 index 40ea055820..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/adapter.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:adapter" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/analyzer.json b/src/main/resources/data/opencomputers/tags/item/analyzer.json deleted file mode 100644 index af2238c3ec..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/analyzer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:analyzer" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/angelupgrade.json b/src/main/resources/data/opencomputers/tags/item/angelupgrade.json deleted file mode 100644 index e8875be1e9..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/angelupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:angelupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/apu1.json b/src/main/resources/data/opencomputers/tags/item/apu1.json deleted file mode 100644 index f358b9b068..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/apu1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:apu1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/apu2.json b/src/main/resources/data/opencomputers/tags/item/apu2.json deleted file mode 100644 index 5b2bd1e547..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/apu2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:apu2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/apu3.json b/src/main/resources/data/opencomputers/tags/item/apu3.json deleted file mode 100644 index e1ec7be8c7..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/apu3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:apu3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/assembler.json b/src/main/resources/data/opencomputers/tags/item/assembler.json deleted file mode 100644 index ce253c7d63..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/assembler.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:assembler" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/backflatscreen1.json b/src/main/resources/data/opencomputers/tags/item/backflatscreen1.json deleted file mode 100644 index 99667b7d02..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/backflatscreen1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:backflatscreen1" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/backflatscreen2.json b/src/main/resources/data/opencomputers/tags/item/backflatscreen2.json deleted file mode 100644 index 9498c608bd..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/backflatscreen2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:backflatscreen2" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/backflatscreen3.json b/src/main/resources/data/opencomputers/tags/item/backflatscreen3.json deleted file mode 100644 index 0013af4443..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/backflatscreen3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:backflatscreen3" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/backflatscreen4.json b/src/main/resources/data/opencomputers/tags/item/backflatscreen4.json deleted file mode 100644 index 2a89f2e350..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/backflatscreen4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:backflatscreen4" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/batteryupgrade1.json b/src/main/resources/data/opencomputers/tags/item/batteryupgrade1.json deleted file mode 100644 index dd85c6333f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/batteryupgrade1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:batteryupgrade1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/batteryupgrade2.json b/src/main/resources/data/opencomputers/tags/item/batteryupgrade2.json deleted file mode 100644 index 68f6cf92e7..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/batteryupgrade2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:batteryupgrade2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/batteryupgrade3.json b/src/main/resources/data/opencomputers/tags/item/batteryupgrade3.json deleted file mode 100644 index 3ede5aa156..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/batteryupgrade3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:batteryupgrade3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cable.json b/src/main/resources/data/opencomputers/tags/item/cable.json deleted file mode 100644 index ddf88f324c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cable.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cable" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/capacitor.json b/src/main/resources/data/opencomputers/tags/item/capacitor.json deleted file mode 100644 index d5c5604646..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/capacitor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:capacitor" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cardcontainer1.json b/src/main/resources/data/opencomputers/tags/item/cardcontainer1.json deleted file mode 100644 index 66725d2e88..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cardcontainer1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cardcontainer1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cardcontainer2.json b/src/main/resources/data/opencomputers/tags/item/cardcontainer2.json deleted file mode 100644 index ee5802a3fe..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cardcontainer2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cardcontainer2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cardcontainer3.json b/src/main/resources/data/opencomputers/tags/item/cardcontainer3.json deleted file mode 100644 index 5448319176..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cardcontainer3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cardcontainer3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/carpetedcapacitor.json b/src/main/resources/data/opencomputers/tags/item/carpetedcapacitor.json deleted file mode 100644 index 3b0f159796..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/carpetedcapacitor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:carpetedcapacitor" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/case1.json b/src/main/resources/data/opencomputers/tags/item/case1.json deleted file mode 100644 index 36fe770a86..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/case1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:case1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/case2.json b/src/main/resources/data/opencomputers/tags/item/case2.json deleted file mode 100644 index 731dfce4f6..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/case2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:case2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/case3.json b/src/main/resources/data/opencomputers/tags/item/case3.json deleted file mode 100644 index 81cf6d2e6f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/case3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:case3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/chamelium.json b/src/main/resources/data/opencomputers/tags/item/chamelium.json deleted file mode 100644 index c01615e648..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/chamelium.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chamelium" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/chameliumblock.json b/src/main/resources/data/opencomputers/tags/item/chameliumblock.json deleted file mode 100644 index 96191a5dfa..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/chameliumblock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chameliumblock" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/charger.json b/src/main/resources/data/opencomputers/tags/item/charger.json deleted file mode 100644 index 1d72aca9d4..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/charger.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:charger" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/chipdiamond.json b/src/main/resources/data/opencomputers/tags/item/chipdiamond.json deleted file mode 100644 index 87db4e1169..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/chipdiamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chipdiamond" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/chunkloaderupgrade.json b/src/main/resources/data/opencomputers/tags/item/chunkloaderupgrade.json deleted file mode 100644 index d430fc32dd..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/chunkloaderupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chunkloaderupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/circuitchip1.json b/src/main/resources/data/opencomputers/tags/item/circuitchip1.json deleted file mode 100644 index 9dccfbae3f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/circuitchip1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chip1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/circuitchip2.json b/src/main/resources/data/opencomputers/tags/item/circuitchip2.json deleted file mode 100644 index c897187abb..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/circuitchip2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chip2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/circuitchip3.json b/src/main/resources/data/opencomputers/tags/item/circuitchip3.json deleted file mode 100644 index f5ba9efd4a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/circuitchip3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chip3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/circuitchip4.json b/src/main/resources/data/opencomputers/tags/item/circuitchip4.json deleted file mode 100644 index efea07f00d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/circuitchip4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:chip4" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/componentbus1.json b/src/main/resources/data/opencomputers/tags/item/componentbus1.json deleted file mode 100644 index 7f2ca6f071..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/componentbus1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:componentbus1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/componentbus2.json b/src/main/resources/data/opencomputers/tags/item/componentbus2.json deleted file mode 100644 index 90a40eafa3..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/componentbus2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:componentbus2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/componentbus3.json b/src/main/resources/data/opencomputers/tags/item/componentbus3.json deleted file mode 100644 index 098b9f43f1..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/componentbus3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:componentbus3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/componentbus4.json b/src/main/resources/data/opencomputers/tags/item/componentbus4.json deleted file mode 100644 index b5e9afcc0d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/componentbus4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:componentbus4" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cpu1.json b/src/main/resources/data/opencomputers/tags/item/cpu1.json deleted file mode 100644 index a05cbf708f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cpu1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cpu1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cpu2.json b/src/main/resources/data/opencomputers/tags/item/cpu2.json deleted file mode 100644 index 3d4e829a36..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cpu2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cpu2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cpu3.json b/src/main/resources/data/opencomputers/tags/item/cpu3.json deleted file mode 100644 index 5205e031a2..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cpu3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cpu3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/cpu4.json b/src/main/resources/data/opencomputers/tags/item/cpu4.json deleted file mode 100644 index 07cd15a77c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/cpu4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cpu4" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/craftingupgrade.json b/src/main/resources/data/opencomputers/tags/item/craftingupgrade.json deleted file mode 100644 index d830ebe4f9..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/craftingupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:craftingupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/databaseupgrade1.json b/src/main/resources/data/opencomputers/tags/item/databaseupgrade1.json deleted file mode 100644 index be39cac481..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/databaseupgrade1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:databaseupgrade1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/databaseupgrade2.json b/src/main/resources/data/opencomputers/tags/item/databaseupgrade2.json deleted file mode 100644 index 96e6e155bb..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/databaseupgrade2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:databaseupgrade2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/databaseupgrade3.json b/src/main/resources/data/opencomputers/tags/item/databaseupgrade3.json deleted file mode 100644 index b58c34e9d2..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/databaseupgrade3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:databaseupgrade3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/datacard1.json b/src/main/resources/data/opencomputers/tags/item/datacard1.json deleted file mode 100644 index 8eab0f3c6f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/datacard1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:datacard1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/datacard2.json b/src/main/resources/data/opencomputers/tags/item/datacard2.json deleted file mode 100644 index d654568b40..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/datacard2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:datacard2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/datacard3.json b/src/main/resources/data/opencomputers/tags/item/datacard3.json deleted file mode 100644 index 7d458b23c6..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/datacard3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:datacard3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/disassembler.json b/src/main/resources/data/opencomputers/tags/item/disassembler.json deleted file mode 100644 index b8edc0505a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/disassembler.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:disassembler" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/diskdrive.json b/src/main/resources/data/opencomputers/tags/item/diskdrive.json deleted file mode 100644 index c672b364d5..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/diskdrive.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:diskdrive" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/diskdrivemountable.json b/src/main/resources/data/opencomputers/tags/item/diskdrivemountable.json deleted file mode 100644 index 8fff553ef6..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/diskdrivemountable.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:diskdrivemountable" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/dronecase1.json b/src/main/resources/data/opencomputers/tags/item/dronecase1.json deleted file mode 100644 index 7c190a7b5d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/dronecase1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:dronecase1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/dronecase2.json b/src/main/resources/data/opencomputers/tags/item/dronecase2.json deleted file mode 100644 index aa73252c2e..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/dronecase2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:dronecase2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/dronecase3.json b/src/main/resources/data/opencomputers/tags/item/dronecase3.json deleted file mode 100644 index 5fd74fc732..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/dronecase3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:dronecase3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/eeprom.json b/src/main/resources/data/opencomputers/tags/item/eeprom.json deleted file mode 100644 index 047c279d2b..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/eeprom.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:eeprom" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/experienceupgrade.json b/src/main/resources/data/opencomputers/tags/item/experienceupgrade.json deleted file mode 100644 index 5a1b53a755..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/experienceupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:experienceupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/floppy.json b/src/main/resources/data/opencomputers/tags/item/floppy.json deleted file mode 100644 index b8a10369a6..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/floppy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:floppy" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/frontflatscreen1.json b/src/main/resources/data/opencomputers/tags/item/frontflatscreen1.json deleted file mode 100644 index 3c18cf7dcc..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/frontflatscreen1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:frontflatscreen1" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/frontflatscreen2.json b/src/main/resources/data/opencomputers/tags/item/frontflatscreen2.json deleted file mode 100644 index 32dc191e29..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/frontflatscreen2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:frontflatscreen2" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/frontflatscreen3.json b/src/main/resources/data/opencomputers/tags/item/frontflatscreen3.json deleted file mode 100644 index 3fdf8c2028..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/frontflatscreen3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:frontflatscreen3" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/frontflatscreen4.json b/src/main/resources/data/opencomputers/tags/item/frontflatscreen4.json deleted file mode 100644 index 4e2baa1908..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/frontflatscreen4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:frontflatscreen4" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/generatorupgrade.json b/src/main/resources/data/opencomputers/tags/item/generatorupgrade.json deleted file mode 100644 index 97bb3d82dd..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/generatorupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:generatorupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/geolyzer.json b/src/main/resources/data/opencomputers/tags/item/geolyzer.json deleted file mode 100644 index b5dee04f2f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/geolyzer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:geolyzer" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/graphicscard1.json b/src/main/resources/data/opencomputers/tags/item/graphicscard1.json deleted file mode 100644 index 26d1c3e174..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/graphicscard1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:graphicscard1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/graphicscard2.json b/src/main/resources/data/opencomputers/tags/item/graphicscard2.json deleted file mode 100644 index b5ea28761a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/graphicscard2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:graphicscard2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/graphicscard3.json b/src/main/resources/data/opencomputers/tags/item/graphicscard3.json deleted file mode 100644 index 30137a5fd7..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/graphicscard3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:graphicscard3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/graphicscard4.json b/src/main/resources/data/opencomputers/tags/item/graphicscard4.json deleted file mode 100644 index 85b09871f6..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/graphicscard4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:graphicscard4" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hdd1.json b/src/main/resources/data/opencomputers/tags/item/hdd1.json deleted file mode 100644 index d1ecab3167..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hdd1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hdd1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hdd2.json b/src/main/resources/data/opencomputers/tags/item/hdd2.json deleted file mode 100644 index 817933c135..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hdd2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hdd2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hdd3.json b/src/main/resources/data/opencomputers/tags/item/hdd3.json deleted file mode 100644 index 5330fcb450..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hdd3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hdd3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hologram1.json b/src/main/resources/data/opencomputers/tags/item/hologram1.json deleted file mode 100644 index f86e9ea22f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hologram1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hologram1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hologram2.json b/src/main/resources/data/opencomputers/tags/item/hologram2.json deleted file mode 100644 index 8cd7c2c5fa..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hologram2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hologram2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hologram3.json b/src/main/resources/data/opencomputers/tags/item/hologram3.json deleted file mode 100644 index 843f8cf88d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hologram3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hologram3" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/holoscreen1.json b/src/main/resources/data/opencomputers/tags/item/holoscreen1.json deleted file mode 100644 index 13f205fe03..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/holoscreen1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:holoscreen1" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/holoscreen2.json b/src/main/resources/data/opencomputers/tags/item/holoscreen2.json deleted file mode 100644 index d2a54c55da..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/holoscreen2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:holoscreen2" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/holoscreen3.json b/src/main/resources/data/opencomputers/tags/item/holoscreen3.json deleted file mode 100644 index 0664898172..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/holoscreen3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:holoscreen3" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/holoscreen4.json b/src/main/resources/data/opencomputers/tags/item/holoscreen4.json deleted file mode 100644 index c669777e3b..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/holoscreen4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:holoscreen4" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/hoverboots.json b/src/main/resources/data/opencomputers/tags/item/hoverboots.json deleted file mode 100644 index 838b71f60c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hoverboots.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hoverboots" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hoverupgrade1.json b/src/main/resources/data/opencomputers/tags/item/hoverupgrade1.json deleted file mode 100644 index 8473c87e8f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hoverupgrade1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hoverupgrade1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/hoverupgrade2.json b/src/main/resources/data/opencomputers/tags/item/hoverupgrade2.json deleted file mode 100644 index c801020560..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/hoverupgrade2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:hoverupgrade2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/inkcartridge.json b/src/main/resources/data/opencomputers/tags/item/inkcartridge.json deleted file mode 100644 index 9d3dd3a212..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/inkcartridge.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:inkcartridge" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/inkcartridgeempty.json b/src/main/resources/data/opencomputers/tags/item/inkcartridgeempty.json deleted file mode 100644 index d67e451ba5..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/inkcartridgeempty.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:inkcartridgeempty" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/internetcard.json b/src/main/resources/data/opencomputers/tags/item/internetcard.json deleted file mode 100644 index 29a889c3f3..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/internetcard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:internetcard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/inventorycontrollerupgrade.json b/src/main/resources/data/opencomputers/tags/item/inventorycontrollerupgrade.json deleted file mode 100644 index 7f9fd69e43..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/inventorycontrollerupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:inventorycontrollerupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/inventoryupgrade.json b/src/main/resources/data/opencomputers/tags/item/inventoryupgrade.json deleted file mode 100644 index b9fdb194fb..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/inventoryupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:inventoryupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/keyboard.json b/src/main/resources/data/opencomputers/tags/item/keyboard.json deleted file mode 100644 index 46c3a95875..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/keyboard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:keyboard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/lancard.json b/src/main/resources/data/opencomputers/tags/item/lancard.json deleted file mode 100644 index 9562ae20d9..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/lancard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:lancard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/leashupgrade.json b/src/main/resources/data/opencomputers/tags/item/leashupgrade.json deleted file mode 100644 index a83ef51852..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/leashupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:leashupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/linkedcard.json b/src/main/resources/data/opencomputers/tags/item/linkedcard.json deleted file mode 100644 index 1066cce0d2..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/linkedcard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:linkedcard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/manual.json b/src/main/resources/data/opencomputers/tags/item/manual.json deleted file mode 100644 index d9b481c608..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/manual.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:manual" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialacid.json b/src/main/resources/data/opencomputers/tags/item/materialacid.json deleted file mode 100644 index e8ccf9c9fd..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialacid.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:acid" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialalu.json b/src/main/resources/data/opencomputers/tags/item/materialalu.json deleted file mode 100644 index 5685dd87f8..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialalu.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:alu" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialarrowkey.json b/src/main/resources/data/opencomputers/tags/item/materialarrowkey.json deleted file mode 100644 index 3f5f54fbed..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialarrowkey.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:arrowkeys" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialbuttongroup.json b/src/main/resources/data/opencomputers/tags/item/materialbuttongroup.json deleted file mode 100644 index e94376c866..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialbuttongroup.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:buttongroup" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcard.json b/src/main/resources/data/opencomputers/tags/item/materialcard.json deleted file mode 100644 index d3ebfaeb8a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:card" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcircuitboard.json b/src/main/resources/data/opencomputers/tags/item/materialcircuitboard.json deleted file mode 100644 index 88fb275eaa..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcircuitboard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:circuitboard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcircuitboardprinted.json b/src/main/resources/data/opencomputers/tags/item/materialcircuitboardprinted.json deleted file mode 100644 index 4c9fe89560..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcircuitboardprinted.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:printedcircuitboard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcircuitboardraw.json b/src/main/resources/data/opencomputers/tags/item/materialcircuitboardraw.json deleted file mode 100644 index f14a4adfce..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcircuitboardraw.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:rawcircuitboard" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcu.json b/src/main/resources/data/opencomputers/tags/item/materialcu.json deleted file mode 100644 index 91d0fbdca8..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcu.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cu" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialcuttingwire.json b/src/main/resources/data/opencomputers/tags/item/materialcuttingwire.json deleted file mode 100644 index 4eb1e57db2..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialcuttingwire.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:cuttingwire" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialdisk.json b/src/main/resources/data/opencomputers/tags/item/materialdisk.json deleted file mode 100644 index 3e078d2187..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialdisk.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:disk" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialinterweb.json b/src/main/resources/data/opencomputers/tags/item/materialinterweb.json deleted file mode 100644 index fc870e7668..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialinterweb.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:interweb" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialnumpad.json b/src/main/resources/data/opencomputers/tags/item/materialnumpad.json deleted file mode 100644 index 086fe84d12..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialnumpad.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:numpad" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/materialtransistor.json b/src/main/resources/data/opencomputers/tags/item/materialtransistor.json deleted file mode 100644 index 7c9a852165..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/materialtransistor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:transistor" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/mfu.json b/src/main/resources/data/opencomputers/tags/item/mfu.json deleted file mode 100644 index b50de136d8..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/mfu.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:mfu" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/microcontrollercase1.json b/src/main/resources/data/opencomputers/tags/item/microcontrollercase1.json deleted file mode 100644 index 43f32db8c9..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/microcontrollercase1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:microcontrollercase1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/microcontrollercase2.json b/src/main/resources/data/opencomputers/tags/item/microcontrollercase2.json deleted file mode 100644 index b153013c2c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/microcontrollercase2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:microcontrollercase2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/microcontrollercase3.json b/src/main/resources/data/opencomputers/tags/item/microcontrollercase3.json deleted file mode 100644 index c90ef9c272..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/microcontrollercase3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:microcontrollercase3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/motionsensor.json b/src/main/resources/data/opencomputers/tags/item/motionsensor.json deleted file mode 100644 index 5bedd10526..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/motionsensor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:motionsensor" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/nanomachines.json b/src/main/resources/data/opencomputers/tags/item/nanomachines.json deleted file mode 100644 index a332667aa0..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/nanomachines.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:nanomachines" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/navigationupgrade.json b/src/main/resources/data/opencomputers/tags/item/navigationupgrade.json deleted file mode 100644 index 7ac0d12787..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/navigationupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:navigationupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/netsplitter.json b/src/main/resources/data/opencomputers/tags/item/netsplitter.json deleted file mode 100644 index 1a34747e99..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/netsplitter.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:netsplitter" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/pistonupgrade.json b/src/main/resources/data/opencomputers/tags/item/pistonupgrade.json deleted file mode 100644 index 20eda93a1c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/pistonupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:pistonupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/powerconverter.json b/src/main/resources/data/opencomputers/tags/item/powerconverter.json deleted file mode 100644 index f1c25c0541..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/powerconverter.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:powerconverter" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/powerdistributor.json b/src/main/resources/data/opencomputers/tags/item/powerdistributor.json deleted file mode 100644 index 327ec64106..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/powerdistributor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:powerdistributor" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/printer.json b/src/main/resources/data/opencomputers/tags/item/printer.json deleted file mode 100644 index e519cbe8b0..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/printer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:printer" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/quadgraphicscard.json b/src/main/resources/data/opencomputers/tags/item/quadgraphicscard.json deleted file mode 100644 index c0034ef458..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/quadgraphicscard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:quadgraphicscard" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/rack.json b/src/main/resources/data/opencomputers/tags/item/rack.json deleted file mode 100644 index 5c21c51ef2..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/rack.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:rack" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/rackkvm.json b/src/main/resources/data/opencomputers/tags/item/rackkvm.json deleted file mode 100644 index 64963f92eb..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/rackkvm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:rackkvm" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/raid.json b/src/main/resources/data/opencomputers/tags/item/raid.json deleted file mode 100644 index 94d790f968..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/raid.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:raid" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram1.json b/src/main/resources/data/opencomputers/tags/item/ram1.json deleted file mode 100644 index a4dcf07983..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram2.json b/src/main/resources/data/opencomputers/tags/item/ram2.json deleted file mode 100644 index 6c87031c7b..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram3.json b/src/main/resources/data/opencomputers/tags/item/ram3.json deleted file mode 100644 index 7f610e2893..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram4.json b/src/main/resources/data/opencomputers/tags/item/ram4.json deleted file mode 100644 index a51a2f174a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram4" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram5.json b/src/main/resources/data/opencomputers/tags/item/ram5.json deleted file mode 100644 index f9db65e3d0..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram5.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram5" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram6.json b/src/main/resources/data/opencomputers/tags/item/ram6.json deleted file mode 100644 index fdc3a46ab4..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram6.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram6" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram7.json b/src/main/resources/data/opencomputers/tags/item/ram7.json deleted file mode 100644 index 33131ccb85..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram7.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram7" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ram8.json b/src/main/resources/data/opencomputers/tags/item/ram8.json deleted file mode 100644 index ec0ee3be0d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ram8.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ram8" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/redstone.json b/src/main/resources/data/opencomputers/tags/item/redstone.json deleted file mode 100644 index b02efc6970..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/redstone.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:redstone" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/redstonecard1.json b/src/main/resources/data/opencomputers/tags/item/redstonecard1.json deleted file mode 100644 index f3b377bdcf..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/redstonecard1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:redstonecard1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/redstonecard2.json b/src/main/resources/data/opencomputers/tags/item/redstonecard2.json deleted file mode 100644 index 99f07d8657..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/redstonecard2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:redstonecard2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/relay.json b/src/main/resources/data/opencomputers/tags/item/relay.json deleted file mode 100644 index 8777de68ce..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/relay.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:relay" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/screen1.json b/src/main/resources/data/opencomputers/tags/item/screen1.json deleted file mode 100644 index 3715f2df5a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/screen1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:screen1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/screen2.json b/src/main/resources/data/opencomputers/tags/item/screen2.json deleted file mode 100644 index 43611f12cc..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/screen2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:screen2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/screen3.json b/src/main/resources/data/opencomputers/tags/item/screen3.json deleted file mode 100644 index 7747d82efb..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/screen3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:screen3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/screen4.json b/src/main/resources/data/opencomputers/tags/item/screen4.json deleted file mode 100644 index 063d654018..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/screen4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:screen4" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/server1.json b/src/main/resources/data/opencomputers/tags/item/server1.json deleted file mode 100644 index 4d02054e2f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/server1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:server1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/server2.json b/src/main/resources/data/opencomputers/tags/item/server2.json deleted file mode 100644 index bec50adc68..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/server2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:server2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/server3.json b/src/main/resources/data/opencomputers/tags/item/server3.json deleted file mode 100644 index 513579991a..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/server3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:server3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/signupgrade.json b/src/main/resources/data/opencomputers/tags/item/signupgrade.json deleted file mode 100644 index a23e2aa3dd..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/signupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:signupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/siliconnetherite.json b/src/main/resources/data/opencomputers/tags/item/siliconnetherite.json deleted file mode 100644 index 45be2a5816..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/siliconnetherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:netheritesilicon" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/solargeneratorupgrade.json b/src/main/resources/data/opencomputers/tags/item/solargeneratorupgrade.json deleted file mode 100644 index 10b9e99dca..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/solargeneratorupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:solargeneratorupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/ssd1.json b/src/main/resources/data/opencomputers/tags/item/ssd1.json deleted file mode 100644 index c6ff50e257..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ssd1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ssd1" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/ssd2.json b/src/main/resources/data/opencomputers/tags/item/ssd2.json deleted file mode 100644 index dbf06641f3..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ssd2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ssd2" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/ssd3.json b/src/main/resources/data/opencomputers/tags/item/ssd3.json deleted file mode 100644 index 479930d489..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/ssd3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:ssd3" - ] -} diff --git a/src/main/resources/data/opencomputers/tags/item/stickypistonupgrade.json b/src/main/resources/data/opencomputers/tags/item/stickypistonupgrade.json deleted file mode 100644 index 4c5f04cff8..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/stickypistonupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:stickypistonupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tabletcase1.json b/src/main/resources/data/opencomputers/tags/item/tabletcase1.json deleted file mode 100644 index 5e42ce3d02..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tabletcase1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tabletcase1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tabletcase2.json b/src/main/resources/data/opencomputers/tags/item/tabletcase2.json deleted file mode 100644 index d971384a20..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tabletcase2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tabletcase2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tankcontrollerupgrade.json b/src/main/resources/data/opencomputers/tags/item/tankcontrollerupgrade.json deleted file mode 100644 index 31fd709c36..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tankcontrollerupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tankcontrollerupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tankupgrade.json b/src/main/resources/data/opencomputers/tags/item/tankupgrade.json deleted file mode 100644 index 29f0047b03..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tankupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tankupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/terminal.json b/src/main/resources/data/opencomputers/tags/item/terminal.json deleted file mode 100644 index aa9109ac64..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/terminal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:terminal" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/terminalserver.json b/src/main/resources/data/opencomputers/tags/item/terminalserver.json deleted file mode 100644 index ce1e0bd0cf..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/terminalserver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:terminalserver" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/texturepicker.json b/src/main/resources/data/opencomputers/tags/item/texturepicker.json deleted file mode 100644 index 12d8e59604..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/texturepicker.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:texturepicker" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tractorbeamupgrade.json b/src/main/resources/data/opencomputers/tags/item/tractorbeamupgrade.json deleted file mode 100644 index 2d1d93a476..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tractorbeamupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tractorbeamupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/tradingupgrade.json b/src/main/resources/data/opencomputers/tags/item/tradingupgrade.json deleted file mode 100644 index 5fc253cc65..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/tradingupgrade.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:tradingupgrade" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/transposer.json b/src/main/resources/data/opencomputers/tags/item/transposer.json deleted file mode 100644 index b27df92e33..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/transposer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:transposer" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/upgradecontainer1.json b/src/main/resources/data/opencomputers/tags/item/upgradecontainer1.json deleted file mode 100644 index d4d4f8100c..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/upgradecontainer1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:upgradecontainer1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/upgradecontainer2.json b/src/main/resources/data/opencomputers/tags/item/upgradecontainer2.json deleted file mode 100644 index ed7a840a9e..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/upgradecontainer2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:upgradecontainer2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/upgradecontainer3.json b/src/main/resources/data/opencomputers/tags/item/upgradecontainer3.json deleted file mode 100644 index 50a255cca5..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/upgradecontainer3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:upgradecontainer3" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/waypoint.json b/src/main/resources/data/opencomputers/tags/item/waypoint.json deleted file mode 100644 index 9096c6243d..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/waypoint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:waypoint" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/wlancard1.json b/src/main/resources/data/opencomputers/tags/item/wlancard1.json deleted file mode 100644 index 50b4f85d5f..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/wlancard1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:wlancard1" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/wlancard2.json b/src/main/resources/data/opencomputers/tags/item/wlancard2.json deleted file mode 100644 index df25029370..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/wlancard2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:wlancard2" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/opencomputers/tags/item/wrench.json b/src/main/resources/data/opencomputers/tags/item/wrench.json deleted file mode 100644 index af355bef28..0000000000 --- a/src/main/resources/data/opencomputers/tags/item/wrench.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "opencomputers:wrench" - ] -} \ No newline at end of file diff --git a/src/main/scala/li/cil/oc/common/init/OCItems.scala b/src/main/scala/li/cil/oc/common/init/OCItems.scala index c25f5e39a5..926b9664a8 100644 --- a/src/main/scala/li/cil/oc/common/init/OCItems.scala +++ b/src/main/scala/li/cil/oc/common/init/OCItems.scala @@ -1,20 +1,20 @@ package li.cil.oc.common.init +import li.cil.oc.{common, Constants, OpenComputers, Settings} import li.cil.oc.api.detail.{ItemAPI, ItemInfo} import li.cil.oc.api.fs.FileSystem +import li.cil.oc.common.{item, Loot, Tier} import li.cil.oc.common.block.SimpleBlock import li.cil.oc.common.datacomponents.OCComponents import li.cil.oc.common.item.data._ import li.cil.oc.common.item.traits.SimpleItem -import li.cil.oc.common.{Loot, Tier, item} import li.cil.oc.server.machine.luac.LuaStateFactory import li.cil.oc.util.{Rarity => OCRarity} -import li.cil.oc.{Constants, OpenComputers, Settings, common} import net.minecraft.core.registries.Registries import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceLocation -import net.minecraft.world.item.Item.Properties import net.minecraft.world.item._ +import net.minecraft.world.item.Item.Properties import net.minecraft.world.level.block.Block import net.neoforged.bus.api.{EventPriority, IEventBus} import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent @@ -24,6 +24,7 @@ import java.nio.ByteBuffer import java.util.concurrent.Callable import scala.collection.mutable import scala.collection.mutable.ArrayBuffer +import scala.util.Using object OCItems extends ItemAPI { private val ITEMS: DeferredRegister.Items = DeferredRegister.createItems(Settings.resourceDomain) @@ -527,9 +528,8 @@ object OCItems extends ItemAPI { private def initPostStorage(): Unit = { val luaBios = { - val code = new Array[Byte](4 * 1024) - val count = OpenComputers.getClass.getResourceAsStream(Settings.scriptPath + "bios.lua").read(code) - createEEPROM("EEPROM (Lua BIOS)", code.take(count), null, readonly = false) + val code = Using.resource(OpenComputers.getClass.getResourceAsStream(Settings.scriptPath + "bios.lua"))(_.readAllBytes()) + createEEPROM("EEPROM (Lua BIOS)", code, null, readonly = false) } registerStack(luaBios, Constants.ItemName.LuaBios) } diff --git a/src/main/scala/li/cil/oc/common/init/OCTags.java b/src/main/scala/li/cil/oc/common/init/OCTags.java new file mode 100644 index 0000000000..2832e140fb --- /dev/null +++ b/src/main/scala/li/cil/oc/common/init/OCTags.java @@ -0,0 +1,32 @@ +package li.cil.oc.common.init; + +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +public final class OCTags { + private OCTags() { + } + + public final class Blocks { + private Blocks() { + } + + /** + * Conventional tag for all froglights. + */ + public static final TagKey FROGLIGHTS = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "froglights")); + } + + public final class Items { + private Items() { + } + + /** + * Conventional tag for all froglights. + */ + public static final TagKey FROGLIGHTS = TagKey.create(Registries.ITEM, Blocks.FROGLIGHTS.location()); + } +} diff --git a/src/main/scala/li/cil/oc/common/item/LinkedCard.scala b/src/main/scala/li/cil/oc/common/item/LinkedCard.scala index 1ada33f708..e336cda802 100644 --- a/src/main/scala/li/cil/oc/common/item/LinkedCard.scala +++ b/src/main/scala/li/cil/oc/common/item/LinkedCard.scala @@ -1,41 +1,30 @@ package li.cil.oc.common.item -import java.util -import li.cil.oc.Settings -import li.cil.oc.util.{ItemUtils, Tooltip} -import li.cil.oc.util.ExtendedItemStack._ -import net.minecraft.world.item.Item -import net.minecraft.world.item.Item.{Properties, TooltipContext} -import net.minecraft.world.item.ItemStack -import net.neoforged.api.distmarker.Dist -import net.neoforged.api.distmarker.OnlyIn - -import scala.collection.convert.ImplicitConversionsToScala._ -import net.minecraft.world.level.Level +import li.cil.oc.common.datacomponents.OCComponents +import li.cil.oc.util.ExtendedDataComponentHolder.convert +import li.cil.oc.util.Tooltip import net.minecraft.network.chat.Component -import net.minecraft.world.item.TooltipFlag +import net.minecraft.world.item.{Item, ItemStack, TooltipFlag} +import net.minecraft.world.item.Item.{Properties, TooltipContext} import net.neoforged.neoforge.common.extensions.IItemExtension +import java.util +import scala.jdk.CollectionConverters._ + class LinkedCard(props: Properties) extends Item(props) with traits.SimpleItem with traits.ItemTier with IItemExtension { - @OnlyIn(Dist.CLIENT) override def appendHoverText(stack: ItemStack, context: TooltipContext, tooltip: util.List[Component], flag: TooltipFlag): Unit = { super.appendHoverText(stack, context, tooltip, flag) - val tag = ItemUtils.getTag(stack) - if (tag != null && tag.contains(Settings.namespace + "data")) { - val data = tag.getCompound(Settings.namespace + "data") - if (data.contains(Settings.namespace + "tunnel")) { - val channel = data.getString(Settings.namespace + "tunnel") - if (channel.length > 13) { - for (curr <- Tooltip.get(unlocalizedName + "_channel", channel.substring(0, 13) + "...")) { - tooltip.add(Component.literal(curr).setStyle(Tooltip.DefaultStyle)) - } - } - else { - for (curr <- Tooltip.get(unlocalizedName + "_channel", channel)) { - tooltip.add(Component.literal(curr).setStyle(Tooltip.DefaultStyle)) - } - } + + stack.getComponent(OCComponents.TUNNEL).foreach(channel => { + val truncatedChannel = if (channel.length > 13) { + channel.substring(0, 13) + "..." + } else { + channel + } + + for (curr <- Tooltip.get(unlocalizedName + "_channel", truncatedChannel).asScala) { + tooltip.add(Component.literal(curr).setStyle(Tooltip.DefaultStyle)) } - } + }) } } diff --git a/src/main/scala/li/cil/oc/common/item/data/PrintData.scala b/src/main/scala/li/cil/oc/common/item/data/PrintData.scala index f6d3541917..763f8c8957 100644 --- a/src/main/scala/li/cil/oc/common/item/data/PrintData.scala +++ b/src/main/scala/li/cil/oc/common/item/data/PrintData.scala @@ -4,7 +4,7 @@ import cats.implicits.catsSyntaxOrder import com.mojang.serialization.Codec import com.mojang.serialization.codecs.RecordCodecBuilder import io.netty.buffer.ByteBuf -import li.cil.oc.{Constants, Settings, api} +import li.cil.oc.{api, Constants, Settings} import li.cil.oc.common.IMC import li.cil.oc.common.datacomponents.{OCComponents, ScalaCodec, ScalaStreamCodec} import li.cil.oc.util.ExtendedAABB._ @@ -26,6 +26,7 @@ case class PrintData(var label: Option[String] = None, var pressurePlate: Boolean = false, val stateOff: mutable.Set[PrintData.Shape] = mutable.Set.empty[PrintData.Shape], val stateOn: mutable.Set[PrintData.Shape] = mutable.Set.empty[PrintData.Shape], + @Deprecated var isBeaconBase: Boolean = false, var lightLevel: Int = 0, var noclipOff: Boolean = false, diff --git a/src/main/scala/li/cil/oc/common/item/traits/FileSystemLike.scala b/src/main/scala/li/cil/oc/common/item/traits/FileSystemLike.scala index cd3440ccdf..c10bf3178e 100644 --- a/src/main/scala/li/cil/oc/common/item/traits/FileSystemLike.scala +++ b/src/main/scala/li/cil/oc/common/item/traits/FileSystemLike.scala @@ -23,7 +23,7 @@ import net.minecraft.world.InteractionResult import net.minecraft.world.item.Item.TooltipContext trait FileSystemLike extends SimpleItem { - override protected def tooltipName = None + override protected def tooltipName: Option[String] = None def kiloBytes: Int diff --git a/src/main/scala/li/cil/oc/common/item/traits/SimpleItem.scala b/src/main/scala/li/cil/oc/common/item/traits/SimpleItem.scala index 9d42d34501..9f061dd856 100644 --- a/src/main/scala/li/cil/oc/common/item/traits/SimpleItem.scala +++ b/src/main/scala/li/cil/oc/common/item/traits/SimpleItem.scala @@ -87,7 +87,7 @@ trait SimpleItem extends Item with api.driver.item.UpgradeRenderer with IItemExt case _ => 0 } - protected def tooltipName = Option(unlocalizedName) + protected def tooltipName: Option[String] = Option(unlocalizedName) protected def tooltipData = Seq.empty[Any] diff --git a/src/main/scala/li/cil/oc/common/recipe/ColorizeRecipe.scala b/src/main/scala/li/cil/oc/common/recipe/ColorizeRecipe.scala index cd63df4c43..dea6332323 100644 --- a/src/main/scala/li/cil/oc/common/recipe/ColorizeRecipe.scala +++ b/src/main/scala/li/cil/oc/common/recipe/ColorizeRecipe.scala @@ -15,7 +15,7 @@ import net.minecraft.world.level.{ItemLike, Level} /** * @author asie, Vexatos */ -class ColorizeRecipe(id: ResourceLocation, target: ItemLike) extends CustomRecipe(CraftingBookCategory.MISC) { +class ColorizeRecipe(target: ItemLike) extends CustomRecipe(CraftingBookCategory.MISC) { val targetItem: Item = target.asItem() override def matches(crafting: CraftingInput, level: Level): Boolean = { @@ -82,5 +82,5 @@ class ColorizeRecipe(id: ResourceLocation, target: ItemLike) extends CustomRecip override def canCraftInDimensions(width: Int, height: Int): Boolean = width * height >= 2 - override def getSerializer = Recipes.COLORIZE.getSerializer + override def getSerializer = Recipes.COLORIZE.get } diff --git a/src/main/scala/li/cil/oc/common/recipe/DecolorizeRecipe.scala b/src/main/scala/li/cil/oc/common/recipe/DecolorizeRecipe.scala index 68838f87d4..116679d8fa 100644 --- a/src/main/scala/li/cil/oc/common/recipe/DecolorizeRecipe.scala +++ b/src/main/scala/li/cil/oc/common/recipe/DecolorizeRecipe.scala @@ -1,19 +1,15 @@ package li.cil.oc.common.recipe -import li.cil.oc.util.ItemColorizer -import li.cil.oc.util.StackOption +import li.cil.oc.util.{ItemColorizer, StackOption} import net.minecraft.core.HolderLookup -import net.minecraft.world.item.Item -import net.minecraft.world.item.Items -import net.minecraft.world.item.ItemStack -import net.minecraft.resources.ResourceLocation -import net.minecraft.world.item.crafting.{CraftingBookCategory, CustomRecipe, CraftingInput} +import net.minecraft.world.item.{Item, Items, ItemStack} +import net.minecraft.world.item.crafting.{CraftingBookCategory, CraftingInput, CustomRecipe} import net.minecraft.world.level.{ItemLike, Level} /** - * @author Vexatos - */ -class DecolorizeRecipe(id: ResourceLocation, target: ItemLike) extends CustomRecipe(CraftingBookCategory.MISC) { + * @author Vexatos + */ +class DecolorizeRecipe(target: ItemLike) extends CustomRecipe(CraftingBookCategory.MISC) { val targetItem: Item = target.asItem() override def matches(crafting: CraftingInput, level: Level): Boolean = { @@ -43,5 +39,5 @@ class DecolorizeRecipe(id: ResourceLocation, target: ItemLike) extends CustomRec override def canCraftInDimensions(width: Int, height: Int): Boolean = width * height >= 2 - override def getSerializer = Recipes.DECOLORIZE.getSerializer + override def getSerializer = Recipes.DECOLORIZE.get } diff --git a/src/main/scala/li/cil/oc/common/recipe/ExtendedRecipe.scala b/src/main/scala/li/cil/oc/common/recipe/ExtendedRecipe.scala deleted file mode 100644 index 761acf92da..0000000000 --- a/src/main/scala/li/cil/oc/common/recipe/ExtendedRecipe.scala +++ /dev/null @@ -1,316 +0,0 @@ -package li.cil.oc.common.recipe - -import java.util.UUID -import li.cil.oc.Constants -import li.cil.oc.OpenComputers -import li.cil.oc.Settings -import li.cil.oc.api -import li.cil.oc.api.ImmutableItemStack -import li.cil.oc.api.detail.ItemInfo -import li.cil.oc.common.datacomponents.OCComponents -import li.cil.oc.common.item.data.DroneData -import li.cil.oc.common.item.data.MicrocontrollerData -import li.cil.oc.common.item.data.PrintData -import li.cil.oc.common.item.data.RobotData -import li.cil.oc.common.item.data.TabletData -import li.cil.oc.server.machine.luac.LuaStateFactory -import li.cil.oc.util.ExtendedDataComponentHolder._ -import li.cil.oc.util.{ItemUtils, SideTracker} -import net.minecraft.core.component.DataComponents -import net.minecraft.core.HolderLookup -import net.minecraft.world.level.block.Blocks -import net.minecraft.world.item.DyeColor -import net.minecraft.world.item.Items -import net.minecraft.world.item.ItemStack -import net.minecraft.nbt.{CompoundTag, StringTag} -import net.minecraft.world.item.component.CustomData -import net.minecraft.resources.ResourceLocation -import net.minecraft.tags.{BlockTags, ItemTags} -import net.minecraft.world.item.crafting.{CraftingInput, Recipe} - -import java.nio.ByteBuffer -import scala.collection.convert.ImplicitConversionsToScala._ -import scala.util.control.Breaks._ - -object ExtendedRecipe { - private lazy val drone = api.Items.get(Constants.ItemName.Drone) - private lazy val eeprom = api.Items.get(Constants.ItemName.EEPROM) - private lazy val luaBios = api.Items.get(Constants.ItemName.LuaBios) - private lazy val mcu = api.Items.get(Constants.BlockName.Microcontroller) - private lazy val navigationUpgrade = api.Items.get(Constants.ItemName.NavigationUpgrade) - private lazy val linkedCard = api.Items.get(Constants.ItemName.LinkedCard) - private lazy val floppy = api.Items.get(Constants.ItemName.Floppy) - private lazy val drives = Array( - api.Items.get(Constants.ItemName.HDDTier1), - api.Items.get(Constants.ItemName.HDDTier2), - api.Items.get(Constants.ItemName.HDDTier3), - api.Items.get(Constants.ItemName.HDDTier4), - api.Items.get(Constants.ItemName.SSDTier1), - api.Items.get(Constants.ItemName.SSDTier2), - api.Items.get(Constants.ItemName.SSDTier3) - ) - private lazy val cpus = Array( - api.Items.get(Constants.ItemName.CPUTier1), - api.Items.get(Constants.ItemName.CPUTier2), - api.Items.get(Constants.ItemName.CPUTier3), - api.Items.get(Constants.ItemName.APUTier1), - api.Items.get(Constants.ItemName.APUTier2) - ) - private lazy val robot = api.Items.get(Constants.BlockName.Robot) - private lazy val tablet = api.Items.get(Constants.ItemName.Tablet) - private lazy val print = api.Items.get(Constants.BlockName.Print) - val beaconBlocks = ItemTags.create(ResourceLocation.fromNamespaceAndPath("c", "beacon_base_blocks")) - - def initializeStaticResultData(recipe: Recipe[_], resultStack: ItemStack): Unit = { - val resultItemName = api.Items.get(resultStack) - val tag = ItemUtils.getTag(resultStack) - - // EEPROM recipe JSON stores script paths in custom data. Resolve them - // only when the recipe is assembled, not while datapacks are being decoded. - if (resultItemName == eeprom && - resultStack.getCount == 1 && tag != null && - recipe.getIngredients.size == 2) { - val nbt = tag.getCompound(Settings.namespace + "data") - - val labelNbt = nbt.get(Settings.namespace + "label") - if (labelNbt != null && labelNbt.getType == StringTag.TYPE) { - resultStack.set(OCComponents.LABEL, labelNbt.asInstanceOf[StringTag].getAsString) - } - if (nbt.contains(Settings.namespace + "readonly")) { - resultStack.set(OCComponents.READONLY, nbt.getBoolean(Settings.namespace + "readonly")) - } - - val codeNbt = nbt.get(Settings.namespace + "eeprom") - if (codeNbt != null && codeNbt.getType == StringTag.TYPE) { - val codePath = codeNbt.asInstanceOf[StringTag].getAsString - val code = new Array[Byte](Settings.get.eepromSize) - val stream = OpenComputers.getClass.getResourceAsStream(Settings.scriptPath + codePath) - if (stream != null) { - try { - val count = stream.read(code) - if (count >= 0) resultStack.set(OCComponents.EEPROM_CODE, ByteBuffer.wrap(code.take(count))) - } - finally stream.close() - } - } - - val dataNbt = nbt.get(Settings.namespace + "userdata") - if (dataNbt != null && dataNbt.getType == StringTag.TYPE) { - val dataPath = dataNbt.asInstanceOf[StringTag].getAsString - val data = new Array[Byte](Settings.get.eepromDataSize) - val stream = OpenComputers.getClass.getResourceAsStream(Settings.scriptPath + dataPath) - if (stream != null) { - try { - val count = stream.read(data) - if (count >= 0) resultStack.set(OCComponents.EEPROM_DATA, ByteBuffer.wrap(data.take(count))) - } - finally stream.close() - } - } - - // The custom data above is recipe-only initialization metadata. Keeping - // it would make JEI treat this result as a different EEPROM subtype from - // the registered Lua BIOS stack, whose state is stored in components. - resultStack.remove(DataComponents.CUSTOM_DATA) - } - } - - def addNBTToResult(recipe: Recipe[_], craftedStack: ItemStack, inventory: CraftingInput, provider: HolderLookup.Provider): ItemStack = { - initializeStaticResultData(recipe, craftedStack) - val craftedItemName = api.Items.get(craftedStack) - - if (craftedItemName == navigationUpgrade) { - for (stack <- getItems(inventory)) { - if (stack.getItem == Items.FILLED_MAP) { - // Store information of the map used for crafting in the result. - craftedStack.setComponent(OCComponents.SOURCE_MAP_ITEM, ImmutableItemStack.copyOf(stack)) - } - } - } - - if (craftedItemName == linkedCard) { - if (SideTracker.isServer) { - craftedStack.setComponent(OCComponents.TUNNEL, UUID.randomUUID().toString) - } - } - - if (cpus.contains(craftedItemName)) { - LuaStateFactory.setDefaultArch(craftedStack) - } - - if (craftedItemName == floppy || drives.contains(craftedItemName)) { - CustomData.update(DataComponents.CUSTOM_DATA, craftedStack, nbt => { - if (recipe.canCraftInDimensions(1, 1)) { - // Formatting / loot to normal disk conversion, only keep coloring. - val colorKey = Settings.namespace + "color" - for (stack <- getItems(inventory)) { - val oldData = ItemUtils.getTag(stack) - if (api.Items.get(stack) != null && (api.Items.get(stack) == floppy || api.Items.get(stack).name == "lootDisk") && oldData != null) { - if (oldData.contains(colorKey) && oldData.getInt(colorKey) != DyeColor.LIGHT_GRAY.getId) { - nbt.put(colorKey, oldData.get(colorKey).copy()) - } - } - } - } - else if (getItems(inventory).forall(api.Items.get(_) == floppy)) { - // Copy operation. - for (stack <- getItems(inventory)) { - val oldData = ItemUtils.getTag(stack) - if (api.Items.get(stack) == floppy && oldData != null) { - for (oldTagName <- oldData.getAllKeys.map(_.asInstanceOf[String]) if !nbt.contains(oldTagName)) { - nbt.put(oldTagName, oldData.get(oldTagName).copy()) - } - } - } - } - }) - } - - if (craftedItemName == print && - recipe.getIngredients.size == 2) { - // First, copy old data. - val data = new PrintData(craftedStack) - val inputs = getItems(inventory) - for (stack <- inputs) { - if (api.Items.get(stack) == print) { - data.loadData(stack) - } - } - - // Then apply new data. - val glowstoneDust = new ItemStack(Items.GLOWSTONE_DUST) - val glowstone = new ItemStack(Blocks.GLOWSTONE) - for (stack <- inputs) { - if (stack.is(beaconBlocks)) { - if (data.isBeaconBase) { - // Crafting wouldn't change anything, prevent accidental resource loss. - return ItemStack.EMPTY - } - data.isBeaconBase = true - } - if (ItemStack.isSameItem(glowstoneDust, stack)) { - if (data.lightLevel == 15) { - // Crafting wouldn't change anything, prevent accidental resource loss. - return ItemStack.EMPTY - } - data.lightLevel = math.min(15, data.lightLevel + 1) - } - if (ItemStack.isSameItem(glowstone, stack)) { - if (data.lightLevel == 15) { - // Crafting wouldn't change anything, prevent accidental resource loss. - return ItemStack.EMPTY - } - data.lightLevel = math.min(15, data.lightLevel + 4) - } - } - - // Finally apply modified data. - data.saveData(craftedStack) - } - - // EEPROM copying. - if (craftedItemName == eeprom && - craftedStack.getCount == 2 && - recipe.getIngredients.size == 2) breakable { - for (stack <- getItems(inventory)) { - val copy = ItemUtils.getTag(stack) - if (api.Items.get(stack) == eeprom && copy != null) { - // Erase node address, just in case. - copy.getCompound(Settings.namespace + "data").getCompound("node").remove("address") - CustomData.set(DataComponents.CUSTOM_DATA, craftedStack, copy) - break() - } - } - } - - // Swapping EEPROM in devices. - recraft(provider, craftedStack, inventory, mcu, stack => new MCUDataWrapper(stack)) - recraft(provider, craftedStack, inventory, drone, stack => new DroneDataWrapper(stack)) - recraft(provider, craftedStack, inventory, robot, stack => new RobotDataWrapper(stack)) - recraft(provider, craftedStack, inventory, tablet, stack => new TabletDataWrapper(stack)) - - craftedStack - } - - private def getItems(inventory: CraftingInput) = (0 until inventory.size).map(inventory.getItem).filter(!_.isEmpty) - - private def recraft(provider: HolderLookup.Provider, craftedStack: ItemStack, inventory: CraftingInput, descriptor: ItemInfo, dataFactory: (ItemStack) => ItemDataWrapper): Unit = { - if (api.Items.get(craftedStack) == descriptor) { - // Find old Microcontroller. - getItems(inventory).find(api.Items.get(_) == descriptor) match { - case Some(oldMcu) => - val data = dataFactory(oldMcu) - - // Remove old EEPROM. - val oldRom = data.components.filter(api.Items.get(_) == eeprom) - data.components = data.components.diff(oldRom) - - // Insert new EEPROM. - for (stack <- getItems(inventory)) { - if (api.Items.get(stack) == eeprom) { - data.components :+= stack.copy.split(1) - } - } - - data.save(craftedStack, provider) - case _ => - } - } - } - - private trait ItemDataWrapper { - def components: Array[ItemStack] - - def components_=(value: Array[ItemStack]): Unit - - def save(stack: ItemStack, provider: HolderLookup.Provider): Unit - } - - private class MCUDataWrapper(val stack: ItemStack) extends ItemDataWrapper { - private val data = new MicrocontrollerData(stack) - - override def components: Array[ItemStack] = data.components - - override def components_=(value: Array[ItemStack]): Unit = data.components = value - - override def save(stack: ItemStack, provider: HolderLookup.Provider): Unit = data.saveData(stack) - } - - private class DroneDataWrapper(val stack: ItemStack) extends ItemDataWrapper { - private val data = new DroneData(stack) - - override def components: Array[ItemStack] = data.components - - override def components_=(value: Array[ItemStack]): Unit = data.components = value - - override def save(stack: ItemStack, provider: HolderLookup.Provider): Unit = data.saveData(stack) - } - - private class RobotDataWrapper(val stack: ItemStack) extends ItemDataWrapper { - private val data = new RobotData(stack) - - override def components: Array[ItemStack] = data.components - - override def components_=(value: Array[ItemStack]): Unit = data.components = value - - override def save(stack: ItemStack, provider: HolderLookup.Provider): Unit = data.saveData(stack) - } - - private class TabletDataWrapper(val stack: ItemStack) extends ItemDataWrapper { - private val data = new TabletData(stack) - - private var _components: Array[ItemStack] = data.items.filter(!_.isEmpty) - - override def components: Array[ItemStack] = _components - - override def components_=(value: Array[ItemStack]): Unit = { - _components = value - } - - override def save(stack: ItemStack, provider: HolderLookup.Provider): Unit = { - data.items = _components.clone() - data.saveData(stack) - } - } - -} diff --git a/src/main/scala/li/cil/oc/common/recipe/ExtendedShapedRecipe.java b/src/main/scala/li/cil/oc/common/recipe/ExtendedShapedRecipe.java deleted file mode 100644 index c84eeb944d..0000000000 --- a/src/main/scala/li/cil/oc/common/recipe/ExtendedShapedRecipe.java +++ /dev/null @@ -1,103 +0,0 @@ -package li.cil.oc.common.recipe; - -import com.mojang.serialization.MapCodec; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.NonNullList; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.*; -import net.minecraft.world.level.Level; -import org.jetbrains.annotations.NotNull; - -public class ExtendedShapedRecipe implements CraftingRecipe { - private final ShapedRecipe wrapped; - - public ExtendedShapedRecipe(ShapedRecipe wrapped) { - this.wrapped = wrapped; - } - - @Override - public boolean matches(@NotNull CraftingInput inv, @NotNull Level level) { - return wrapped.matches(inv, level); - } - - @Override - @NotNull - public ItemStack assemble(@NotNull CraftingInput inv, @NotNull HolderLookup.Provider registries) { - return ExtendedRecipe.addNBTToResult(this, wrapped.assemble(inv, registries), inv, registries); - } - - @Override - public boolean canCraftInDimensions(int w, int h) { - return wrapped.canCraftInDimensions(w, h); - } - - @Override - public ItemStack getResultItem(@NotNull HolderLookup.Provider registries) { - return wrapped.getResultItem(registries); - } - - @Override - public NonNullList getRemainingItems(CraftingInput inv) { - return wrapped.getRemainingItems(inv); - } - - @Override - public NonNullList getIngredients() { - return wrapped.getIngredients(); - } - - @Override - @NotNull - public RecipeSerializer getSerializer() { - return Recipes.SHAPED_EXTENDED.getSerializer(); - } - - @Override - @NotNull - public RecipeType getType() { - return RecipeType.CRAFTING; - } - - @Override - @NotNull - public CraftingBookCategory category() { - return CraftingBookCategory.MISC; - } - - @Override - public String getGroup() { - return wrapped.getGroup(); - } - - @Override - public boolean showNotification() { - return wrapped.showNotification(); - } - - public int getWidth() { - return wrapped.getWidth(); - } - - public int getHeight() { - return wrapped.getHeight(); - } - - public static final class Serializer implements RecipeSerializer { - private static final MapCodec CODEC = - ShapedRecipe.Serializer.CODEC.xmap(ExtendedShapedRecipe::new, recipe -> recipe.wrapped); - private static final StreamCodec STREAM_CODEC = - RecipeSerializer.SHAPED_RECIPE.streamCodec().map(ExtendedShapedRecipe::new, recipe -> recipe.wrapped); - - @Override - public MapCodec codec() { - return CODEC; - } - - @Override - public StreamCodec streamCodec() { - return STREAM_CODEC; - } - } -} diff --git a/src/main/scala/li/cil/oc/common/recipe/ExtendedShapelessRecipe.java b/src/main/scala/li/cil/oc/common/recipe/ExtendedShapelessRecipe.java deleted file mode 100644 index 4c415c0292..0000000000 --- a/src/main/scala/li/cil/oc/common/recipe/ExtendedShapelessRecipe.java +++ /dev/null @@ -1,93 +0,0 @@ -package li.cil.oc.common.recipe; - -import com.mojang.serialization.MapCodec; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.NonNullList; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.*; -import net.minecraft.world.level.Level; -import org.jetbrains.annotations.NotNull; -import org.jspecify.annotations.NonNull; - -public class ExtendedShapelessRecipe implements CraftingRecipe { - private final ShapelessRecipe wrapped; - - public ExtendedShapelessRecipe(ShapelessRecipe wrapped) { - this.wrapped = wrapped; - } - - @Override - public boolean matches(@NonNull CraftingInput inv, @NonNull Level level) { - return wrapped.matches(inv, level); - } - - @Override - public ItemStack assemble(@NonNull CraftingInput inv, @NotNull HolderLookup.Provider provider) { - return ExtendedRecipe.addNBTToResult(this, wrapped.assemble(inv, provider), inv, provider); - } - - @Override - public boolean canCraftInDimensions(int w, int h) { - return wrapped.canCraftInDimensions(w, h); - } - - @Override - public ItemStack getResultItem(@NotNull HolderLookup.Provider registries) { - ItemStack result = wrapped.getResultItem(registries); - ExtendedRecipe.initializeStaticResultData(this, result); - return result; - } - - @Override - public NonNullList getRemainingItems(CraftingInput inv) { - return wrapped.getRemainingItems(inv); - } - - @Override - public NonNullList getIngredients() { - return wrapped.getIngredients(); - } - - @Override - @NotNull - public RecipeSerializer getSerializer() { - return Recipes.SHAPELESS_EXTENDED.getSerializer(); - } - - @Override - @NotNull - public RecipeType getType() { - return RecipeType.CRAFTING; - } - - @Override - @NotNull - public CraftingBookCategory category() { - return CraftingBookCategory.MISC; - } - - @Override - public String getGroup() { - return wrapped.getGroup(); - } - - public static final class Serializer implements RecipeSerializer { - private static final MapCodec CODEC = - RecipeSerializer.SHAPELESS_RECIPE.codec().xmap(ExtendedShapelessRecipe::new, recipe -> recipe.wrapped); - private static final StreamCodec STREAM_CODEC = - RecipeSerializer.SHAPELESS_RECIPE.streamCodec().map(ExtendedShapelessRecipe::new, recipe -> recipe.wrapped); - - @Override - @NotNull - public MapCodec codec() { - return CODEC; - } - - @Override - public StreamCodec streamCodec() { - return STREAM_CODEC; - } - } -} diff --git a/src/main/scala/li/cil/oc/common/recipe/ItemSpecialSerializer.java b/src/main/scala/li/cil/oc/common/recipe/ItemSpecialSerializer.java deleted file mode 100644 index bf18ea0bb8..0000000000 --- a/src/main/scala/li/cil/oc/common/recipe/ItemSpecialSerializer.java +++ /dev/null @@ -1,49 +0,0 @@ -package li.cil.oc.common.recipe; - -import java.util.function.BiFunction; -import java.util.function.Function; - -import com.mojang.serialization.MapCodec; -import li.cil.oc.OpenComputers; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.ByteBufCodecs; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.crafting.Recipe; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.level.ItemLike; -import org.jetbrains.annotations.NotNull; - -public class ItemSpecialSerializer> implements RecipeSerializer { - - private static final ResourceLocation GENERATED_ID = ResourceLocation.fromNamespaceAndPath(OpenComputers.ID(), "special"); - - private final BiFunction ctor; - private final Function getter; - private final MapCodec codec; - private final StreamCodec streamCodec; - - public ItemSpecialSerializer(BiFunction ctor, Function getter) { - this.ctor = ctor; - this.getter = getter; - this.codec = BuiltInRegistries.ITEM.byNameCodec() - .fieldOf("item") - .xmap(item -> ctor.apply(GENERATED_ID, item), getter); - this.streamCodec = ByteBufCodecs.registry(Registries.ITEM) - .map(item -> ctor.apply(GENERATED_ID, item), getter); - } - - @Override - @NotNull - public MapCodec codec() { - return codec; - } - - @Override - public StreamCodec streamCodec() { - return streamCodec; - } -} diff --git a/src/main/scala/li/cil/oc/common/recipe/LootDiskCyclingRecipe.scala b/src/main/scala/li/cil/oc/common/recipe/LootDiskCyclingRecipe.scala index 2afeb94ff8..70db2773e5 100644 --- a/src/main/scala/li/cil/oc/common/recipe/LootDiskCyclingRecipe.scala +++ b/src/main/scala/li/cil/oc/common/recipe/LootDiskCyclingRecipe.scala @@ -1,32 +1,25 @@ package li.cil.oc.common.recipe -import li.cil.oc.Constants -import li.cil.oc.Settings -import li.cil.oc.api +import li.cil.oc.{api, Constants} import li.cil.oc.common.Loot import li.cil.oc.common.datacomponents.OCComponents import li.cil.oc.integration.util.Wrench -import li.cil.oc.util.{ItemUtils, StackOption} -import net.minecraft.core.{HolderLookup, NonNullList, RegistryAccess} +import li.cil.oc.util.StackOption +import net.minecraft.core.{HolderLookup, NonNullList} import net.minecraft.resources.ResourceLocation -import net.minecraft.world.inventory.CraftingContainer import net.minecraft.world.item.ItemStack -import net.minecraft.world.item.crafting.{CraftingBookCategory, CraftingInput, CraftingRecipe, Ingredient, Recipe, RecipeSerializer, RecipeType} +import net.minecraft.world.item.crafting._ import net.minecraft.world.level.Level -import scala.collection.JavaConverters import scala.collection.immutable -class LootDiskCyclingRecipe(val bookCategory: CraftingBookCategory) extends CraftingRecipe { - override def category(): CraftingBookCategory = bookCategory - +class LootDiskCyclingRecipe(val bookCategory: CraftingBookCategory) extends CustomRecipe(bookCategory) { override def matches(crafting: CraftingInput, level: Level): Boolean = { val stacks = collectStacks(crafting).toArray stacks.length == 2 && stacks.exists(Loot.isLootDisk) && stacks.exists(Wrench.isWrench) } - override def getType: RecipeType[_] = Recipes.LOOTDISK_CYCLING.getRecipeType - override def getSerializer: RecipeSerializer[_] = Recipes.LOOTDISK_CYCLING.getSerializer + override def getSerializer: RecipeSerializer[_] = Recipes.LOOTDISK_CYCLING.get() override def assemble(crafting: CraftingInput, provider: HolderLookup.Provider): ItemStack = { val lootDiskStacks = Loot.disksForCycling diff --git a/src/main/scala/li/cil/oc/common/recipe/Recipes.java b/src/main/scala/li/cil/oc/common/recipe/Recipes.java index 402c46210b..6a51e462c3 100644 --- a/src/main/scala/li/cil/oc/common/recipe/Recipes.java +++ b/src/main/scala/li/cil/oc/common/recipe/Recipes.java @@ -1,60 +1,56 @@ package li.cil.oc.common.recipe; import li.cil.oc.OpenComputers; +import li.cil.oc.common.recipe.function.*; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; -import net.minecraft.world.item.crafting.*; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.SimpleCraftingRecipeSerializer; +import net.minecraft.world.level.ItemLike; import net.neoforged.bus.api.IEventBus; -import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import net.neoforged.neoforge.registries.NewRegistryEvent; +import net.neoforged.neoforge.registries.RegistryBuilder; -import java.util.function.Supplier; +import java.util.function.Function; public final class Recipes { - public static final class RecipeRegistration> { - private final Supplier> recipeType; - private final Supplier> serializer; - - public RecipeRegistration(Supplier> recipeType, Supplier> serializer) { - this.recipeType = recipeType; - this.serializer = serializer; - } - - public RecipeType getRecipeType() { - return recipeType.get(); - } - - public RecipeSerializer getSerializer() { - return serializer.get(); - } - } - - public static final DeferredRegister> SERIALIZERS = DeferredRegister.create(Registries.RECIPE_SERIALIZER, OpenComputers.ID()); - public static final DeferredRegister> RECIPES = DeferredRegister.create(Registries.RECIPE_TYPE, OpenComputers.ID()); + private static final DeferredRegister> SERIALIZERS = DeferredRegister.create(Registries.RECIPE_SERIALIZER, OpenComputers.ID()); - public static final RecipeRegistration LOOTDISK_CYCLING = register( - "crafting_lootdisk_cycling", - new SimpleCraftingRecipeSerializer<>(LootDiskCyclingRecipe::new) + public static final DeferredHolder, RecipeSerializer> LOOTDISK_CYCLING = SERIALIZERS.register( + "crafting_lootdisk_cycling", + () -> new SimpleCraftingRecipeSerializer<>(LootDiskCyclingRecipe::new) ); - public static final RecipeRegistration COLORIZE = register("crafting_colorize", new ItemSpecialSerializer<>(ColorizeRecipe::new, ColorizeRecipe::targetItem)); - public static final RecipeRegistration DECOLORIZE = register("crafting_decolorize", new ItemSpecialSerializer<>(DecolorizeRecipe::new, DecolorizeRecipe::targetItem)); - public static final RecipeRegistration ROBOT_FLAG = register("crafting_robot_flag", new RobotFlagRecipe.Serializer()); - public static final RecipeRegistration SHAPED_EXTENDED = register("crafting_shaped_extended", new ExtendedShapedRecipe.Serializer()); - public static final RecipeRegistration SHAPELESS_EXTENDED = register("crafting_shapeless_extended", new ExtendedShapelessRecipe.Serializer()); - - private static > RecipeRegistration register(String id, RecipeSerializer serializer) { - DeferredHolder, RecipeType> recipeType = RECIPES.register(id, () -> new RecipeType<>() { - @Override - public String toString() { return id; } - }); - DeferredHolder, RecipeSerializer> recipeSerializer = SERIALIZERS.register(id, () -> serializer); - return new RecipeRegistration<>( - recipeType::get, - recipeSerializer::get - ); - } - + + public static final DeferredHolder, RecipeSerializer> COLORIZE = SERIALIZERS.register("crafting_colorize", () -> itemSpecialSerializer(ColorizeRecipe::new, ColorizeRecipe::targetItem)); + public static final DeferredHolder, RecipeSerializer> DECOLORIZE = SERIALIZERS.register("crafting_decolorize", () -> itemSpecialSerializer(DecolorizeRecipe::new, DecolorizeRecipe::targetItem)); + public static final DeferredHolder, RecipeSerializer> TRANSFORM_SHAPED = SERIALIZERS.register("transform_shaped", () -> TransformShapedRecipe.SERIALIZER); + public static final DeferredHolder, RecipeSerializer> TRANSFORM_SHAPELESS = SERIALIZERS.register("transform_shapeless", () -> TransformShapelessRecipe.SERIALIZER); + + private static final DeferredRegister> FUNCTIONS = DeferredRegister.create(RecipeFunction.REGISTRY, OpenComputers.ID()); + + public static final DeferredHolder, RecipeFunction.Type> ADD_PRINT_LIGHT = FUNCTIONS.register("add_print_light", () -> AddPrintLight.TYPE); + public static final DeferredHolder, RecipeFunction.Type> COPY_COMPONENTS = FUNCTIONS.register("copy_components", () -> CopyComponents.TYPE); + public static final DeferredHolder, RecipeFunction.Type> REPLACE_EEPROM = FUNCTIONS.register("replace_eeprom", () -> ReplaceEEPROM.TYPE); + public static final DeferredHolder, RecipeFunction.Type> SET_DEFAULT_ARCHITECTURE = FUNCTIONS.register("set_default_architecture", () -> SetDefaultArchitecture.TYPE); + public static final DeferredHolder, RecipeFunction.Type> SET_EEPROM_DATA = FUNCTIONS.register("set_eeprom_data", () -> SetEEPROMData.TYPE); + public static final DeferredHolder, RecipeFunction.Type> SET_SOURCE_MAP = FUNCTIONS.register("set_source_map", () -> SetSourceMap.TYPE); + public static final DeferredHolder, RecipeFunction.Type> SET_UNIQUE_TUNNEL = FUNCTIONS.register("set_unique_tunnel", () -> SetUniqueTunnel.TYPE); + public static void init(IEventBus eventBus) { - RECIPES.register(eventBus); + eventBus.addListener((NewRegistryEvent event) -> event.create(new RegistryBuilder<>(RecipeFunction.REGISTRY).sync(true))); SERIALIZERS.register(eventBus); + FUNCTIONS.register(eventBus); + } + + private static > RecipeSerializer itemSpecialSerializer(Function ctor, Function getter) { + return new BasicRecipeSerializer<>( + BuiltInRegistries.ITEM.byNameCodec().fieldOf("item").xmap(ctor, getter), + ByteBufCodecs.registry(Registries.ITEM).map(ctor, getter) + ); } } diff --git a/src/main/scala/li/cil/oc/common/recipe/RobotFlagRecipe.java b/src/main/scala/li/cil/oc/common/recipe/RobotFlagRecipe.java deleted file mode 100644 index d6dae1f5ec..0000000000 --- a/src/main/scala/li/cil/oc/common/recipe/RobotFlagRecipe.java +++ /dev/null @@ -1,118 +0,0 @@ -package li.cil.oc.common.recipe; - -import com.mojang.serialization.MapCodec; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.NonNullList; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.CraftingBookCategory; -import net.minecraft.world.item.crafting.CraftingInput; -import net.minecraft.world.item.crafting.CraftingRecipe; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.item.crafting.ShapelessRecipe; -import net.minecraft.world.level.Level; -import org.jetbrains.annotations.NotNull; -import org.jspecify.annotations.NonNull; - -/** - * Applies a flag to a robot while preserving the robot ItemStack verbatim. - * - *

The general extended recipe wrapper treats any device-to-device recipe as - * an EEPROM swap. A cosmetic recipe must not enter that path: it only applies - * the result's component patch to the input robot.

- */ -public final class RobotFlagRecipe implements CraftingRecipe { - private final ShapelessRecipe wrapped; - - public RobotFlagRecipe(ShapelessRecipe wrapped) { - this.wrapped = wrapped; - } - - @Override - public boolean matches(@NonNull CraftingInput inv, @NonNull Level level) { - return wrapped.matches(inv, level); - } - - @Override - public ItemStack assemble(@NonNull CraftingInput inv, @NotNull HolderLookup.Provider provider) { - ItemStack recipeResult = wrapped.assemble(inv, provider); - if (recipeResult.isEmpty()) return ItemStack.EMPTY; - - for (int slot = 0; slot < inv.size(); slot++) { - ItemStack input = inv.getItem(slot); - if (!input.isEmpty() && input.is(recipeResult.getItem())) { - ItemStack output = input.copy(); - output.setCount(recipeResult.getCount()); - output.applyComponents(recipeResult.getComponentsPatch()); - return output; - } - } - - return ItemStack.EMPTY; - } - - @Override - public boolean canCraftInDimensions(int width, int height) { - return wrapped.canCraftInDimensions(width, height); - } - - @Override - public ItemStack getResultItem(@NotNull HolderLookup.Provider provider) { - return wrapped.getResultItem(provider); - } - - @Override - public NonNullList getRemainingItems(CraftingInput inv) { - return wrapped.getRemainingItems(inv); - } - - @Override - public NonNullList getIngredients() { - return wrapped.getIngredients(); - } - - @Override - public RecipeSerializer getSerializer() { - return Recipes.ROBOT_FLAG.getSerializer(); - } - - @Override - public RecipeType getType() { - return RecipeType.CRAFTING; - } - - @Override - public CraftingBookCategory category() { - return wrapped.category(); - } - - @Override - public String getGroup() { - return wrapped.getGroup(); - } - - @Override - public boolean showNotification() { - return wrapped.showNotification(); - } - - public static final class Serializer implements RecipeSerializer { - private static final MapCodec CODEC = - RecipeSerializer.SHAPELESS_RECIPE.codec().xmap(RobotFlagRecipe::new, recipe -> recipe.wrapped); - private static final StreamCodec STREAM_CODEC = - RecipeSerializer.SHAPELESS_RECIPE.streamCodec().map(RobotFlagRecipe::new, recipe -> recipe.wrapped); - - @Override - public @NotNull MapCodec codec() { - return CODEC; - } - - @Override - public @NotNull StreamCodec streamCodec() { - return STREAM_CODEC; - } - } -} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/AddPrintLight.java b/src/main/scala/li/cil/oc/common/recipe/function/AddPrintLight.java new file mode 100644 index 0000000000..2fbee2873a --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/AddPrintLight.java @@ -0,0 +1,38 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.Codec; +import li.cil.oc.common.item.data.PrintData; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; + +/** + * Add the supplied light level to a print. + * + * @param light The light level to add. + */ +public record AddPrintLight(int light) implements RecipeFunction { + private static final int MAX_LIGHT = 15; + public static final RecipeFunction.Type TYPE = new RecipeFunction.Type<>( + Codec.INT.xmap(AddPrintLight::new, AddPrintLight::light).fieldOf("light"), + ByteBufCodecs.VAR_INT.map(AddPrintLight::new, AddPrintLight::light).cast() + ); + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ItemStack apply(CraftingInput container, ItemStack result) { + var print = new PrintData(result); + var oldLevel = print.lightLevel(); + + // Crafting wouldn't change anything, prevent accidental resource loss. + if (oldLevel == MAX_LIGHT) return ItemStack.EMPTY; + + print.lightLevel_$eq(Math.min(MAX_LIGHT, oldLevel + this.light())); + print.saveData(result); + return result; + } +} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/ReplaceEEPROM.java b/src/main/scala/li/cil/oc/common/recipe/function/ReplaceEEPROM.java new file mode 100644 index 0000000000..49127b378e --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/ReplaceEEPROM.java @@ -0,0 +1,74 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.MapCodec; +import li.cil.oc.api.ImmutableItemStack; +import li.cil.oc.common.datacomponents.OCComponents; +import li.cil.oc.common.init.OCBlocks; +import li.cil.oc.common.init.OCItems; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +/** + * Replace the EEPROM within an assembled device (e.g. drone or robot). + */ +public final class ReplaceEEPROM implements RecipeFunction { + public static ReplaceEEPROM INSTANCE = new ReplaceEEPROM(); + public static final Type TYPE = new Type<>(MapCodec.unit(INSTANCE), StreamCodec.unit(INSTANCE)); + + private ReplaceEEPROM() { + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ItemStack apply(CraftingInput container, ItemStack result) { + // Extract the EEPROM and other item from the input. + ItemStack eeprom = findItem(container, OCItems.EEPROM().get()); + if (eeprom.isEmpty()) return result; + + if (result.is(OCBlocks.Microcontroller().asItem()) || result.is(OCItems.Drone().get()) || result.is(OCBlocks.Robot().asItem())) { + replaceEEPROM(result, OCComponents.COMPONENTS().get(), eeprom); + } else if (result.is(OCItems.Tablet().get())) { + replaceEEPROM(result, OCComponents.CONTENTS().get(), eeprom); + } + + return result; + } + + private static ItemStack findItem(CraftingInput container, Item item) { + for (var stack : container.items()) { + if (stack.is(item)) return stack; + } + + return ItemStack.EMPTY; + } + + private static void replaceEEPROM( + ItemStack item, DataComponentType> component, ItemStack eeprom + ) { + // FIXME: There's some horrible munging of Scala <-> Java lists. Ideally we'd either use a Java collection or + // at least something more sensible than a consed List. + var items = item.get(component); + var itemList = items == null ? List.of() : scala.jdk.CollectionConverters.SeqHasAsJava(items).asJava(); + + var newItemsList = replaceEEPROM(itemList, eeprom); + item.set(component, scala.collection.immutable.List.from(scala.jdk.CollectionConverters.IterableHasAsScala(newItemsList).asScala())); + } + + private static List replaceEEPROM(Collection items, ItemStack eeprom) { + return Stream.concat( + items.stream().filter(x -> x.getItem() != OCItems.EEPROM().get()), + Stream.of(ImmutableItemStack.copyOf(eeprom.copyWithCount(1))) + ).toList(); + } +} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/SetDefaultArchitecture.java b/src/main/scala/li/cil/oc/common/recipe/function/SetDefaultArchitecture.java new file mode 100644 index 0000000000..3ae674fda3 --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/SetDefaultArchitecture.java @@ -0,0 +1,27 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.MapCodec; +import li.cil.oc.server.machine.luac.LuaStateFactory; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; + +/** + * Set the default on the resulting item. + */ +public class SetDefaultArchitecture implements RecipeFunction { + public static final SetDefaultArchitecture INSTANCE = new SetDefaultArchitecture(); + public static final Type TYPE = new Type<>(MapCodec.unit(INSTANCE), StreamCodec.unit(INSTANCE)); + + private SetDefaultArchitecture() { + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public void configureResult(ItemStack result) { + LuaStateFactory.setDefaultArch(result); + } +} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/SetEEPROMData.java b/src/main/scala/li/cil/oc/common/recipe/function/SetEEPROMData.java new file mode 100644 index 0000000000..64b895e5cb --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/SetEEPROMData.java @@ -0,0 +1,69 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import li.cil.oc.OpenComputers; +import li.cil.oc.Settings; +import li.cil.oc.common.datacomponents.OCComponents; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import org.jspecify.annotations.Nullable; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.ByteBuffer; +import java.nio.file.NoSuchFileException; +import java.util.Arrays; +import java.util.Optional; + +/** + * Resolve the EEPROM script and data and set it on the resulting item stack. + * + * @param script The path to the EEPROM script. + * @param data The path to the EEPROM data, if specified. + */ +public record SetEEPROMData(String script, Optional data) implements RecipeFunction { + private static final MapCodec CODEC = RecordCodecBuilder.mapCodec(i -> i.group( + Codec.STRING.fieldOf("script").forGetter(SetEEPROMData::script), + Codec.STRING.optionalFieldOf("data").forGetter(SetEEPROMData::data) + ).apply(i, SetEEPROMData::new)); + + private static final StreamCodec STREAM_CODEC = StreamCodec.composite( + ByteBufCodecs.STRING_UTF8, SetEEPROMData::script, + ByteBufCodecs.optional(ByteBufCodecs.STRING_UTF8), SetEEPROMData::data, + SetEEPROMData::new + ); + + public static final RecipeFunction.Type TYPE = new RecipeFunction.Type<>(CODEC, STREAM_CODEC); + + @Override + public Type getType() { + return TYPE; + } + + @Override + public void configureResult(ItemStack result) { + result.set(OCComponents.EEPROM_CODE().get(), readData(script(), Settings.get().eepromSize())); + + if (data().isPresent()) { + result.set(OCComponents.EEPROM_DATA().get(), readData(data().get(), Settings.get().eepromDataSize())); + } + } + + private static @Nullable ByteBuffer readData(String path, int maxSize) { + try (var stream = OpenComputers.class.getResourceAsStream(Settings.scriptPath() + path)) { + if (stream == null) throw new NoSuchFileException(path); + + var data = new byte[maxSize]; + var read = stream.read(data); + if (read >= 0) return ByteBuffer.wrap(Arrays.copyOf(data, read)).asReadOnlyBuffer(); + } catch (IOException e) { + throw new UncheckedIOException("Failed to read EEPROM", e); + } + + return null; + } +} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/SetSourceMap.java b/src/main/scala/li/cil/oc/common/recipe/function/SetSourceMap.java new file mode 100644 index 0000000000..e3c4ae4fb5 --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/SetSourceMap.java @@ -0,0 +1,36 @@ +package li.cil.oc.common.recipe.function; + +import li.cil.oc.api.ImmutableItemStack; +import li.cil.oc.common.datacomponents.OCComponents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.Ingredient; + +/** + * Store an item in the recipe input in the {@link OCComponents#SOURCE_MAP_ITEM()} component. + * + * @param map The map item to store. + */ +public record SetSourceMap(Ingredient map) implements RecipeFunction { + public static final RecipeFunction.Type TYPE = new RecipeFunction.Type<>( + Ingredient.CODEC_NONEMPTY.fieldOf("from").xmap(SetSourceMap::new, SetSourceMap::map), + Ingredient.CONTENTS_STREAM_CODEC.map(SetSourceMap::new, SetSourceMap::map) + ); + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ItemStack apply(CraftingInput container, ItemStack result) { + for (var item : container.items()) { + if (map.test(item)) { + result.set(OCComponents.SOURCE_MAP_ITEM().get(), ImmutableItemStack.copyOf(item)); + break; + } + } + + return result; + } +} diff --git a/src/main/scala/li/cil/oc/common/recipe/function/SetUniqueTunnel.java b/src/main/scala/li/cil/oc/common/recipe/function/SetUniqueTunnel.java new file mode 100644 index 0000000000..daf2713555 --- /dev/null +++ b/src/main/scala/li/cil/oc/common/recipe/function/SetUniqueTunnel.java @@ -0,0 +1,31 @@ +package li.cil.oc.common.recipe.function; + +import com.mojang.serialization.MapCodec; +import li.cil.oc.common.datacomponents.OCComponents; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; + +import java.util.UUID; + +/** + * Set the {@link OCComponents#TUNNEL()} to a random, unique ID. + */ +public class SetUniqueTunnel implements RecipeFunction { + public static final SetUniqueTunnel INSTANCE = new SetUniqueTunnel(); + public static final Type TYPE = new Type<>(MapCodec.unit(INSTANCE), StreamCodec.unit(INSTANCE)); + + private SetUniqueTunnel() { + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ItemStack apply(CraftingInput container, ItemStack result) { + result.set(OCComponents.TUNNEL(), UUID.randomUUID().toString()); + return result; + } +} diff --git a/src/main/scala/li/cil/oc/server/component/LinkedCard.scala b/src/main/scala/li/cil/oc/server/component/LinkedCard.scala index 6022abf0c5..8e22044b3a 100644 --- a/src/main/scala/li/cil/oc/server/component/LinkedCard.scala +++ b/src/main/scala/li/cil/oc/server/component/LinkedCard.scala @@ -89,8 +89,6 @@ class LinkedCard extends AbstractManagedEnvironment with QuantumNetwork.QuantumN // ----------------------------------------------------------------------- // - private final val TunnelTag = Settings.namespace + "tunnel" - override def loadData(holder: DataComponentHolder): Unit = { super.loadData(holder)