diff --git a/RebornCore/src/main/java/reborncore/common/misc/RebornCoreTags.java b/RebornCore/src/main/java/reborncore/common/misc/RebornCoreTags.java index 727ff10eb..beb1ce03b 100644 --- a/RebornCore/src/main/java/reborncore/common/misc/RebornCoreTags.java +++ b/RebornCore/src/main/java/reborncore/common/misc/RebornCoreTags.java @@ -24,11 +24,11 @@ package reborncore.common.misc; -import net.fabricmc.fabric.api.tag.TagRegistry; +import net.fabricmc.fabric.api.tag.TagFactory; import net.minecraft.item.Item; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; public class RebornCoreTags { - public static final Tag WATER_EXPLOSION_ITEM = TagRegistry.item(new Identifier("reborncore", "water_explosion")); + public static final Tag.Identified WATER_EXPLOSION_ITEM = TagFactory.ITEM.create(new Identifier("reborncore", "water_explosion")); } diff --git a/build.gradle b/build.gradle index efb76ffed..b5a10e3e4 100644 --- a/build.gradle +++ b/build.gradle @@ -236,7 +236,7 @@ jar { from { crowdin.getDidWork() ? fileTree('build/translations').matching{exclude "**/en_US.json"} : null} dependsOn 'fixTranslations' - dependsOn 'compileRecipes' + dependsOn 'runDatagen' } diff --git a/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy b/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy index 2b3d4b165..5c8677280 100644 --- a/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy +++ b/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy @@ -2,10 +2,13 @@ package techreborn.datagen import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator +import techreborn.datagen.recipes.smelting.SmeltingRecipesProvider +import techreborn.datagen.tags.WaterExplosionTagProvider class TechRebornDataGen implements DataGeneratorEntrypoint { @Override void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { - // TODO generate data here + fabricDataGenerator.addProvider(WaterExplosionTagProvider.&new) + fabricDataGenerator.addProvider(SmeltingRecipesProvider.&new) } } diff --git a/src/datagen/groovy/techreborn/datagen/recipes/smelting/SmeltingRecipesProvider.groovy b/src/datagen/groovy/techreborn/datagen/recipes/smelting/SmeltingRecipesProvider.groovy new file mode 100644 index 000000000..3bc7c4125 --- /dev/null +++ b/src/datagen/groovy/techreborn/datagen/recipes/smelting/SmeltingRecipesProvider.groovy @@ -0,0 +1,56 @@ +package techreborn.datagen.recipes.smelting + +import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator +import net.minecraft.data.server.recipe.CookingRecipeJsonFactory +import net.minecraft.item.ItemConvertible +import net.minecraft.item.Items +import net.minecraft.recipe.CookingRecipeSerializer +import net.minecraft.recipe.RecipeSerializer +import techreborn.datagen.tags.CommonTagsTrait +import techreborn.init.TRContent + +class SmeltingRecipesProvider extends TechRebornRecipesProvider implements CommonTagsTrait { + SmeltingRecipesProvider(FabricDataGenerator dataGenerator) { + super(dataGenerator) + } + + @Override + void generateRecipes() { + // Add smelting and blasting recipes. + [ + (TRContent.Ingots.MIXED_METAL): TRContent.Ingots.ADVANCED_ALLOY, + (cItem("brass_dusts")): TRContent.Ingots.BRASS, + (TRContent.Dusts.BRONZE): TRContent.Ingots.BRONZE, + (cItem("electrum_dusts")): TRContent.Ingots.ELECTRUM, + (TRContent.Dusts.INVAR): TRContent.Ingots.INVAR, + (cItem("lead_ores")): TRContent.Ingots.LEAD, + (cItem("raw_lead_ores")): TRContent.Ingots.LEAD, + (TRContent.Dusts.NICKEL): TRContent.Ingots.NICKEL, + (cItem("sheldonite_ores")): TRContent.Ingots.PLATINUM, + (cItem("platinum_dusts")): TRContent.Ingots.PLATINUM, + (Items.IRON_INGOT): TRContent.Ingots.REFINED_IRON, + (cItem("silver_ores")): TRContent.Ingots.SILVER, + (cItem("raw_silver_ores")): TRContent.Ingots.SILVER, + (cItem("tin_ores")): TRContent.Ingots.TIN, + (cItem("raw_tin_ores")): TRContent.Ingots.TIN, + (cItem("zinc_dusts")): TRContent.Ingots.ZINC + ].each {input, output -> + offerSmelting(input, output) + offerBlasting(input, output) + } + } + + def offerSmelting(def input, ItemConvertible output, float experience = 0.5f, int cookingTime = 200) { + offerCookingRecipe(input, output, experience, cookingTime, RecipeSerializer.SMELTING, "smelting/") + } + + def offerBlasting(def input, ItemConvertible output, float experience = 0.5f, int cookingTime = 200) { + offerCookingRecipe(input, output, experience, cookingTime, RecipeSerializer.BLASTING, "blasting/") + } + + def offerCookingRecipe(def input, ItemConvertible output, float experience, int cookingTime, CookingRecipeSerializer serializer, String prefix = "") { + CookingRecipeJsonFactory.create(createIngredient(input), output, experience, cookingTime, serializer) + .criterion(getCriterionName(input), getCriterionConditions(input)) + .offerTo(this.exporter, prefix + getInputPath(output) + "_from_" + getInputPath(input)) + } +} diff --git a/src/datagen/groovy/techreborn/datagen/recipes/smelting/TechRebornRecipesProvider.groovy b/src/datagen/groovy/techreborn/datagen/recipes/smelting/TechRebornRecipesProvider.groovy new file mode 100644 index 000000000..ed1e9be2c --- /dev/null +++ b/src/datagen/groovy/techreborn/datagen/recipes/smelting/TechRebornRecipesProvider.groovy @@ -0,0 +1,72 @@ +package techreborn.datagen.recipes.smelting + +import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator +import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipesProvider +import net.minecraft.advancement.criterion.CriterionConditions +import net.minecraft.data.server.recipe.RecipeJsonProvider +import net.minecraft.item.ItemConvertible +import net.minecraft.recipe.Ingredient +import net.minecraft.tag.Tag +import net.minecraft.util.Identifier + +import java.util.function.Consumer + +abstract class TechRebornRecipesProvider extends FabricRecipesProvider { + protected Consumer exporter + TechRebornRecipesProvider(FabricDataGenerator dataGenerator) { + super(dataGenerator) + } + + @Override + protected void generateRecipes(Consumer exporter) { + this.exporter = exporter + generateRecipes() + } + + abstract void generateRecipes() + + static Ingredient createIngredient(def input) { + if (input instanceof ItemConvertible) { + return Ingredient.ofItems(input) + } else if (input instanceof Tag.Identified) { + return Ingredient.fromTag(input) + } + + throw new UnsupportedOperationException() + } + + static String getCriterionName(def input) { + if (input instanceof ItemConvertible) { + return hasItem(input) + } else if (input instanceof Tag.Identified) { + return "has_tag_" + input.getId() + } + + throw new UnsupportedOperationException() + } + + static CriterionConditions getCriterionConditions(def input) { + if (input instanceof ItemConvertible) { + return conditionsFromItem(input) + } else if (input instanceof Tag.Identified) { + return conditionsFromTag(input) + } + + throw new UnsupportedOperationException() + } + + static String getInputPath(def input) { + if (input instanceof ItemConvertible) { + return getItemPath(input) + } else if (input instanceof Tag.Identified) { + return input.getId().toString().replace(":", "_") + } + + throw new UnsupportedOperationException() + } + + @Override + protected Identifier getRecipeIdentifier(Identifier identifier) { + return new Identifier("techreborn", super.getRecipeIdentifier(identifier).path) + } +} diff --git a/src/datagen/groovy/techreborn/datagen/tags/CommonTagsTrait.groovy b/src/datagen/groovy/techreborn/datagen/tags/CommonTagsTrait.groovy new file mode 100644 index 000000000..cd785e1e6 --- /dev/null +++ b/src/datagen/groovy/techreborn/datagen/tags/CommonTagsTrait.groovy @@ -0,0 +1,12 @@ +package techreborn.datagen.tags + +import net.fabricmc.fabric.api.tag.TagFactory +import net.minecraft.item.Item +import net.minecraft.tag.Tag +import net.minecraft.util.Identifier + +trait CommonTagsTrait { + static Tag.Identified cItem(String path) { + return TagFactory.ITEM.create(new Identifier("c", path)) + } +} diff --git a/src/datagen/groovy/techreborn/datagen/tags/WaterExplosionTagProvider.groovy b/src/datagen/groovy/techreborn/datagen/tags/WaterExplosionTagProvider.groovy new file mode 100644 index 000000000..50cd8cad7 --- /dev/null +++ b/src/datagen/groovy/techreborn/datagen/tags/WaterExplosionTagProvider.groovy @@ -0,0 +1,18 @@ +package techreborn.datagen.tags + +import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator +import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider +import reborncore.common.misc.RebornCoreTags +import techreborn.init.ModFluids + +class WaterExplosionTagProvider extends FabricTagProvider.ItemTagProvider { + WaterExplosionTagProvider(FabricDataGenerator dataGenerator) { + super(dataGenerator) + } + + @Override + protected void generateTags() { + getOrCreateTagBuilder(RebornCoreTags.WATER_EXPLOSION_ITEM) + .add(ModFluids.SODIUM.getBucket()) + } +} diff --git a/src/datagen/resources/fabric.mod.json b/src/datagen/resources/fabric.mod.json index e7c5e401d..ebaa81480 100644 --- a/src/datagen/resources/fabric.mod.json +++ b/src/datagen/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "techreborn-datagen", - "name": "TechReborn Gametest", + "name": "TechReborn Datagen", "version": "1.0.0", "environment": "*", "entrypoints": { diff --git a/src/main/java/techreborn/init/ModFluids.java b/src/main/java/techreborn/init/ModFluids.java index 8856e1355..56719c629 100644 --- a/src/main/java/techreborn/init/ModFluids.java +++ b/src/main/java/techreborn/init/ModFluids.java @@ -122,4 +122,8 @@ public enum ModFluids { public Identifier getIdentifier() { return identifier; } + + public RebornBucketItem getBucket() { + return bucket; + } } diff --git a/src/main/resources/data/reborncore/tags/items/water_explosion.json b/src/main/resources/data/reborncore/tags/items/water_explosion.json deleted file mode 100644 index a98ef4529..000000000 --- a/src/main/resources/data/reborncore/tags/items/water_explosion.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "techreborn:sodium_bucket" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/blasting/readme.txt b/src/main/resources/data/techreborn/recipes/blasting/readme.txt deleted file mode 100644 index ee732a234..000000000 --- a/src/main/resources/data/techreborn/recipes/blasting/readme.txt +++ /dev/null @@ -1,5 +0,0 @@ -This directory is for vanilla Minecraft's blast furnace, not the blast furnace added by TechReborn. - -!! DO NOT add recipes here unless they do not have a counterpart smelting recipe. !! - -All of TechReborn's smelting recipes are automatically added to the (vanilla) blast furnace at build time using the "compileRecipes" Gradle task. \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/advanced_alloy_ingot.json b/src/main/resources/data/techreborn/recipes/smelting/advanced_alloy_ingot.json deleted file mode 100644 index 79a91a342..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/advanced_alloy_ingot.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "item": "techreborn:mixed_metal_ingot" - }, - "result": "techreborn:advanced_alloy_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/brass_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/brass_ingot_from_dust.json deleted file mode 100644 index 06d7b2089..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/brass_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:brass_dusts" - }, - "result": "techreborn:brass_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/bronze_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/bronze_ingot_from_dust.json deleted file mode 100644 index 7b60aac8d..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/bronze_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "item": "techreborn:bronze_dust" - }, - "result": "techreborn:bronze_ingot", - "experience": 0.5, - "cookingtime": 200 -} diff --git a/src/main/resources/data/techreborn/recipes/smelting/electrum_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/electrum_ingot_from_dust.json deleted file mode 100644 index d99a89a17..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/electrum_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:electrum_dusts" - }, - "result": "techreborn:electrum_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/invar_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/invar_ingot_from_dust.json deleted file mode 100644 index eff3fa963..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/invar_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "item": "techreborn:invar_dust" - }, - "result": "techreborn:invar_ingot", - "experience": 0.5, - "cookingtime": 200 -} diff --git a/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_ore.json b/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_ore.json deleted file mode 100644 index 044368e4b..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_ore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:lead_ores" - }, - "result": "techreborn:lead_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_raw.json b/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_raw.json deleted file mode 100644 index f37a5afc3..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/lead_ingot_from_raw.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:raw_lead_ores" - }, - "result": "techreborn:lead_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/nickel_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/nickel_ingot_from_dust.json deleted file mode 100644 index 694d33cb6..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/nickel_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "item": "techreborn:nickel_dust" - }, - "result": "techreborn:nickel_ingot", - "experience": 0.5, - "cookingtime": 200 -} diff --git a/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot.json b/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot.json deleted file mode 100644 index 6f116cf3f..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:sheldonite_ores" - }, - "result": "techreborn:platinum_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot_from_dust.json deleted file mode 100644 index b070e7c54..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/platinum_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:platinum_dusts" - }, - "result": "techreborn:platinum_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/refined_iron_ingot.json b/src/main/resources/data/techreborn/recipes/smelting/refined_iron_ingot.json deleted file mode 100644 index 240e78290..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/refined_iron_ingot.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "item": "minecraft:iron_ingot" - }, - "result": "techreborn:refined_iron_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_ore.json b/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_ore.json deleted file mode 100644 index b6b05f781..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_ore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:silver_ores" - }, - "result": "techreborn:silver_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_raw.json b/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_raw.json deleted file mode 100644 index 4596ca6c0..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/silver_ingot_from_raw.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:raw_silver_ores" - }, - "result": "techreborn:silver_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_ore.json b/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_ore.json deleted file mode 100644 index 2757fba96..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_ore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:tin_ores" - }, - "result": "techreborn:tin_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_raw.json b/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_raw.json deleted file mode 100644 index 62a29ad27..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/tin_ingot_from_raw.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:raw_tin_ores" - }, - "result": "techreborn:tin_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/smelting/zinc_ingot_from_dust.json b/src/main/resources/data/techreborn/recipes/smelting/zinc_ingot_from_dust.json deleted file mode 100644 index dec78f9a4..000000000 --- a/src/main/resources/data/techreborn/recipes/smelting/zinc_ingot_from_dust.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "minecraft:smelting", - "ingredient": { - "tag": "c:zinc_dusts" - }, - "result": "techreborn:zinc_ingot", - "experience": 0.5, - "cookingtime": 200 -} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/tweakers/tweaker_test.js b/src/main/resources/data/techreborn/tweakers/tweaker_test.js deleted file mode 100644 index 176adfe6c..000000000 --- a/src/main/resources/data/techreborn/tweakers/tweaker_test.js +++ /dev/null @@ -1,92 +0,0 @@ -//Warn that the sample script is running -log.warn("WARNING! The TechReborn tweaker sample script is running!"); -log.warn("If you're seeing this and aren't in dev mode, please report it!"); - -var TRTweaker = libcd.require("techreborn.TRTweaker"); -var TweakerUtils = libcd.require("libcd.util.TweakerUtils"); - -//Add an alloy smelter recipe that takes 8 coal and 2 obsidian -> 2 diamonds -TRTweaker.addAlloySmelter(["minecraft:coal@8", "minecraft:obsidian@2"], ["minecraft:diamond@2"], 6, 200); - -//Add an assembling machine recipe that takes 3 diamonds and 2 sticks -> 1 diamond pickaxe -TRTweaker.addAssemblingMachine(["minecraft:diamond@3", "minecraft:stick@2"], ["minecraft:diamond_pickaxe"], 20, 200); - -//Add a blast furnace recipe that takes 64 of any item in the minecraft:coals tag -> 8 diamonds -TRTweaker.addBlastFurnace(["#minecraft:coals@64"], ["minecraft:diamond@8"], 128, 200, 1300); - -//Add a centrifuge recipe that takes any potion -> a water bottle -TRTweaker.addCentrifuge(["minecraft:potion"], [TweakerUtils.getSpecialStack("minecraft:potion->minecraft:water")], 5, 1000); - -//Add a chemical reactor recipe that takes a water bottle and a can of methane -> a potion of fire resistance -//DISCLAIMER: do not try this at home -TRTweaker.addChemicalReactor(["minecraft:potion->minecraft:water", TRTweaker.createFluidIngredient("techreborn:methane", ["techreborn:cell"], -1)], [TweakerUtils.getSpecialStack("minecraft:potion->minecraft:fire_resistance")], 30, 800); - -//Add a compressor recipe that takes 9 coal blocks -> 3 pieces of obsidian -TRTweaker.addCompressor(["minecraft:coal_ore@9"], ["minecraft:coal_block@3"], 10, 300); - -//Add a distillation tower recipe that takes a potion of regneration -> a strong potion of regeneration -TRTweaker.addDistillationTower(["minecraft:potion->minecraft:regeneration"], [TweakerUtils.getSpecialStack("minecraft:potion->minecraft:strong_regeneration")], 20, 400); - -//Add an extractor recipe that takes 4 coal -> 1 gunpowder -TRTweaker.addExtractor(["minecraft:coal@4"], ["minecraft:gunpowder"], 10, 300); - -//Add a grinder recipe of 1 sugar cane -> 3 sugar -TRTweaker.addGrinder(["minecraft:sugar_cane"], ["minecraft:sugar@3"], 4, 270); - -//Add an implosion compressor recipe of 32 coal and 16 flint -> 16 diamonds -TRTweaker.addImplosionCompressor(["minecraft:coal@32", "minecraft:flint@16"], ["minecraft:diamond@16"], 30, 2000); - -//Add an industrial electrolyzer recipe of 1 skeleton skull -> 1 wither skeleton skull -TRTweaker.addIndustrialElectrolyzer(["minecraft:skeleton_skull"], ["minecraft:wither_skeleton_skull"], 50, 1400); - -//Add an industrial electrolyzer recipe of 1 sea lantern -> 5 prismarine crystals and 4 prismarine shards -TRTweaker.addIndustrialGrinder(["minecraft:sea_lantern"], ["minecraft:prismarine_crystals@5", "minecraft:prismarine_shard@4"], 64, 100); - -//Add an industrial electrolyzer recipe of 1 sea lantern and 1 bucket of electrolyzed water -> 9 prismarine crystals -TRTweaker.addIndustrialGrinder(["minecraft:sea_lantern"], ["minecraft:prismarine_crystals@9"], 64, 100, "techreborn:electrolyzed_water@1000"); - -//Add an industrial sawmill recipe of 3 sugar cane -> 18 paper -TRTweaker.addIndustrialSawmill(["minecraft:sugar_cane@3"], ["minecraft:paper@18"], 40, 200); - -//Add an industrial sawmill recipe of 1 heart of the sea and 1/2 bucket of water -> 16 nautilus shells -TRTweaker.addIndustrialSawmill(["minecraft:heart_of_the_sea"], ["minecraft:nautilus_shell@16"], 40, 200, "minecraft:water@500"); - -//Add a recycler recipe of 1 water bucket -> 1 empty bucket -TRTweaker.addRecycler(["minecraft:water_bucket"], ["minecraft:bucket"], 5, 40); - -//Add a scrapbox recipe of 1 scrap box -> 1 shulker box -TRTweaker.addScrapbox("minecraft:shulker_box", 10, 20); - -//Add a scrapbox recipe of 1 cell of water -> 1 blue ice -TRTweaker.addVacuumFreezer([TRTweaker.createFluidIngredient("minecraft:water", ["techreborn:cell"], -1)], ["minecraft:blue_ice"], 60, 440); - -//Add a fluid replicator recipe of 2 uu matter and 1 bucket of wulframium -> 2 buckets of wolframium -TRTweaker.addFluidReplicator(["techreborn:uu_matter@2"], 40, 100, "techreborn:wolframium@1000"); - -//Add a fusion reactor recipe of 3 wither skeleton skulls and 4 soul sand -> 1 nether star -TRTweaker.addFusionReactor(["minecraft:wither_skeleton_skull@3", "minecraft:soul_sand@4"], ["minecraft:nether_star"], -2048, 1024, 90000, 1); - -//Add a rolling machine recipe for 5 popped chorus fruit in a helmet shape -> a shulker shell -var chorus = "minecraft:popped_chorus_fruit"; -TRTweaker.addRollingMachine([[chorus, chorus, chorus], [chorus, "", chorus]], "minecraft:shulker_shell"); - -//Create a pattern/dictionary set for a shaped recipe -var pattern = [ '/ /', - '/_/', - '/ /']; -var dict = { - "/": "minecraft:stick", - "_": "#minecraft:wooden_slabs" -}; - -//Add a rolling machine recipe for sticks on the sides and any wooden slab in the middle -> six ladders -TRTweaker.addDictRollingMachine(pattern, dict, "minecraft:ladder@12"); - -//Add a solid canning machine recipe for 1 empty cell and 1 blue ice -> a cell full of water -TRTweaker.addSolidCanningMachine(["techreborn:cell{}", "minecraft:blue_ice"], [TweakerUtils.getSpecialStack("techreborn:cell->minecraft:water")], 1, 100); - -//Add a wire mill recipe for 1 woll -> 4 string -TRTweaker.addWireMill(["#minecraft:wool"], ["minecraft:string@4"], 2, 200); - -//Add a plasma fluid generator recipe for 1 mB of wolframium -> 300 EU -TRTweaker.addFluidGenerator("plasma", "techreborn:wolframium", 300); diff --git a/src/main/resources/data/techreborn/tweakers/tweaker_test.js.mcmeta b/src/main/resources/data/techreborn/tweakers/tweaker_test.js.mcmeta deleted file mode 100644 index 9aee49839..000000000 --- a/src/main/resources/data/techreborn/tweakers/tweaker_test.js.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "when": [ - { "libcd:dev_mode": true } - ] -}