From 961786b8eee8df97a4c20b3fab48812805573096 Mon Sep 17 00:00:00 2001 From: Redeix Date: Mon, 2 Feb 2026 06:21:48 -0600 Subject: [PATCH] egh update (#2950) * egh update * changelog and config * add spore blossom, remove beneath leaves (those are for mars) Signed-off-by: Pyritie * Update tags.beneath.js Signed-off-by: Pyritie --------- Signed-off-by: Pyritie Co-authored-by: Pyritie --- CHANGELOG.md | 11 + config/via_romana.json | 62 ++++++ kubejs/server_scripts/afc/recipes.js | 59 +++--- kubejs/server_scripts/beneath/recipes.js | 14 ++ kubejs/server_scripts/firmalife/recipes.js | 2 + kubejs/server_scripts/firmalife/tags.js | 5 + .../server_scripts/macaws_for_tfc/recipes.js | 10 +- kubejs/server_scripts/tfc/recipes.js | 28 +++ kubejs/server_scripts/tfc/tags.js | 15 ++ .../tfg/aquaponics/recipes.greenhouse.js | 192 +++++++++++------- .../tfg/aquaponics/recipes.pisciculture.js | 6 +- .../tfg/beneath/tags.beneath.js | 20 +- kubejs/startup_scripts/firmalife/constants.js | 4 +- kubejs/startup_scripts/tfc/constants.js | 18 +- 14 files changed, 323 insertions(+), 123 deletions(-) create mode 100644 config/via_romana.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e468ca9..53f929102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,12 @@ (tom's changelist goes here) #### IV changes - Multi-Layer Insulated Shielding is now required for HSS-G coils. +#### Electric Greenhouse changes +- You can now use glass casings and trapdoors for the EGH floor. @Redeix +- Aquaponic multiblocks now only need half an amp to run. (#2950) @Redeix +- Base recipe duration has been reduced to 600/450/300 seconds. (#2950) @Redeix +- More circuit options for recipes that priorities seeds/saplings and recipes that prioritize leaves have been added. (#2950) @Redeix +- More plants have been added for production. @Redeix & @thederpysockdude123 ### Changes - Added much more music to the different dimensions @Pyritie - Vanadium magnetite is now usable as an iron ore for TFC purposes (#2834) @Pyritie @@ -49,6 +55,11 @@ - Added a furnace recipe for dead grass to thatch (#2935) @Coox1e - Added support for Bluemap (#2922) @trisjob - Added mixer and barrel recipes for dye fluids (#2925, #2938) @OLOXpl +- Added recipes to convert leaves into leaf piles. (#2950) @Redeix +- Added a recipe to convert fruit leaf blocks into firmalife fruit leaf items. (#2950) @Redeix +- Added a recipe to turn leaf blocks into hedges. (#2950) @Redeix +- Added recipes to make krummholz. (#2950) @Redeix +- Added config file for Via Romana support. (#2950) @Redeix ### Bug fixes - Fixed large miners not outputting crushed ore when mining Migmatite @Pyritie - Fixed red granite ores never dropping poor or rich raw ores @Pyritie diff --git a/config/via_romana.json b/config/via_romana.json new file mode 100644 index 000000000..faa359fe6 --- /dev/null +++ b/config/via_romana.json @@ -0,0 +1,62 @@ +{ + "infrastructure_check_radius": 1, + "path_quality_threshold": 0.6, + "node_distance_minimum": 10, + "node_distance_maximum": 20, + "path_block_ids": [ + ], + "path_block_tags": [ + "tfc:paths", + "forge:gravel", + "rnr:gravel_road_blocks", + "rnr:gravel_road_slabs", + "rnr:gravel_road_stairs", + "forge:cobblestone", + "minecraft:stairs", + "minecraft:slabs", + "rnr:cobbled_road_blocks", + "rnr:cobbled_road_stairs", + "rnr:cobbled_road_slabs", + "minecraft:mineable/pickaxe", + "minecraft:mineable/axe" + ], + "path_block_strings": [ + ], + "block_string_blacklist": [ + ], + "invalid_dimensions": [], + "no_gui_charting": false, + "invalid_entities": [], + "warp_block_ids": [ + "via_romana:warp_block" + ], + "warp_block_tags": [ + "minecraft:all_signs" + ], + "travel_fatigue_cooldown": 6, + "fast_movement_speed": 0.0, + "direct_warp": false, + "fog_of_war_distance": 10, + "spline_animation_time": 2.0, + "maximum_map_dimension": 512, + "map_refresh_interval": 10, + "map_refresh_threshold": 10, + "map_save_interval": 5, + "biome_color_pairs": [], + "use_biome_fallback_for_lowres": false, + "enable_remote_map_access": true, + "enable_surveyor_landmark": false, + "enable_surveyor_landmark_coloring": false, + "invalid_block_overlay_opacity": 0.4, + "biome_map_opacity": 0.3, + "node_vignette_opacity": 1.0, + "line_colors": [ + "#ffffff", + "#cccccc" + ], + "line_opacity": 1.0, + "enable_teleport_particles": true, + "enable_sign_particles": true, + "enable_custom_cursor": true, + "logging_enum": "NONE" +} \ No newline at end of file diff --git a/kubejs/server_scripts/afc/recipes.js b/kubejs/server_scripts/afc/recipes.js index 1fcc394c8..9f385e5c7 100644 --- a/kubejs/server_scripts/afc/recipes.js +++ b/kubejs/server_scripts/afc/recipes.js @@ -89,7 +89,37 @@ const registerAFCRecipes = (event) => { }).id(`afc:crafting/wood/${wood}_stomping_barrel`) - }) + event.recipes.gtceu.lathe(`tfg:stripping_${wood}_log`) + .itemInputs(`afc:wood/log/${wood}`) + .itemOutputs(`afc:wood/stripped_log/${wood}`) + .duration(50) + .EUt(2) + + event.recipes.gtceu.lathe(`tfg:stripping_${wood}_wood`) + .itemInputs(`afc:wood/wood/${wood}`) + .itemOutputs(`afc:wood/stripped_wood/${wood}`) + .duration(50) + .EUt(2) + + event.recipes.vintageimprovements.polishing(`afc:wood/stripped_log/${wood}`, `afc:wood/log/${wood}`) + .speedLimits(0) + .processingTime(50 * global.VINTAGE_IMPROVEMENTS_DURATION_MULTIPLIER) + .id(`tfg:vi/lathe/stripping_${wood}_log`) + + event.recipes.vintageimprovements.polishing(`afc:wood/stripped_wood/${wood}`, `afc:wood/wood/${wood}`) + .speedLimits(0) + .processingTime(50 * global.VINTAGE_IMPROVEMENTS_DURATION_MULTIPLIER) + .id(`tfg:vi/lathe/stripping_${wood}_wood`) + }); + + global.AFC_SAPLINGS.forEach(wood => { + event.shaped(`4x afc:wood/fallen_leaves/${wood.sapling}`,[ + 'AA', + 'AA' + ], { + A: `afc:wood/leaves/${wood.sapling}` + }).id(`tfg:shaped/afc/${wood.sapling}_leaves_to_fallen_leaves`); + }); // #endregion @@ -237,33 +267,6 @@ const registerAFCRecipes = (event) => { .outputItem('afc:birch_sugar') .id('tfg:barrel/birch_syrup_to_sugar') - - // Stripped logs - - global.AFC_WOOD_TYPES.forEach(wood => { - event.recipes.gtceu.lathe(`tfg:stripping_${wood}_log`) - .itemInputs(`afc:wood/log/${wood}`) - .itemOutputs(`afc:wood/stripped_log/${wood}`) - .duration(50) - .EUt(2) - - event.recipes.gtceu.lathe(`tfg:stripping_${wood}_wood`) - .itemInputs(`afc:wood/wood/${wood}`) - .itemOutputs(`afc:wood/stripped_wood/${wood}`) - .duration(50) - .EUt(2) - - event.recipes.vintageimprovements.polishing(`afc:wood/stripped_log/${wood}`, `afc:wood/log/${wood}`) - .speedLimits(0) - .processingTime(50 * global.VINTAGE_IMPROVEMENTS_DURATION_MULTIPLIER) - .id(`tfg:vi/lathe/stripping_${wood}_log`) - - event.recipes.vintageimprovements.polishing(`afc:wood/stripped_wood/${wood}`, `afc:wood/wood/${wood}`) - .speedLimits(0) - .processingTime(50 * global.VINTAGE_IMPROVEMENTS_DURATION_MULTIPLIER) - .id(`tfg:vi/lathe/stripping_${wood}_wood`) - }) - const MORE_STRIPPING = [ { wood: 'black_oak', stripped: 'oak', stripped_mod: 'tfc' }, { wood: 'rainbow_eucalyptus', stripped: 'eucalyptus', stripped_mod: 'afc' }, diff --git a/kubejs/server_scripts/beneath/recipes.js b/kubejs/server_scripts/beneath/recipes.js index b7036a19b..e5182c117 100644 --- a/kubejs/server_scripts/beneath/recipes.js +++ b/kubejs/server_scripts/beneath/recipes.js @@ -85,4 +85,18 @@ const registerBeneathRecipes = (event) => { C: 'beneath:wood/planks/warped', D: 'beneath:wood/log/warped' }).id('tfg:shaped/warped_sewing_table') + + event.shaped(`4x beneath:wood/fallen_leaves/crimson`,[ + 'AA', + 'AA' + ], { + A: `beneath:wood/leaves/crimson` + }).id(`tfg:shaped/beneath/crimson_leaves_to_fallen_leaves`); + + event.shaped(`4x beneath:wood/fallen_leaves/warped`,[ + 'AA', + 'AA' + ], { + A: `beneath:wood/leaves/warped` + }).id(`tfg:shaped/beneath/warped_leaves_to_fallen_leaves`); } \ No newline at end of file diff --git a/kubejs/server_scripts/firmalife/recipes.js b/kubejs/server_scripts/firmalife/recipes.js index 49e4e1ec5..e1e4ba600 100644 --- a/kubejs/server_scripts/firmalife/recipes.js +++ b/kubejs/server_scripts/firmalife/recipes.js @@ -200,6 +200,8 @@ const registerFirmaLifeRecipes = (event) => { .category(GTRecipeCategories.INGOT_MOLDING) event.replaceInput({ id: 'firmalife:crafting/bottle_label' }, 'firmalife:beeswax', '#forge:wax') + + event.shapeless('firmalife:fruit_leaf', ['#tfc:fruit_tree_leaves']).id('tfg:shapeless/firmalife/fruit_leaf_from_fruit_leaves'); //#endregion diff --git a/kubejs/server_scripts/firmalife/tags.js b/kubejs/server_scripts/firmalife/tags.js index 307bc6230..2264a45d2 100644 --- a/kubejs/server_scripts/firmalife/tags.js +++ b/kubejs/server_scripts/firmalife/tags.js @@ -22,6 +22,11 @@ const registerFirmaLifeItemTags = (event) => { .map(fruit => fruit.id) .filter(fruit => fruit !== 'betterend:shadow_berry_cooked' && fruit !== 'minecraft:popped_chorus_fruit') .forEach(fruit => event.add('tfg:dried_fruit', fruit)) + + event.add('tfc:fruit_tree_leaves', 'firmalife:plant/cocoa_leaves') + event.add('tfc:fruit_tree_leaves', 'firmalife:plant/fig_leaves') + event.add('minecraft:leaves', 'firmalife:plant/cocoa_leaves') + event.add('minecraft:leaves', 'firmalife:plant/fig_leaves') } const registerFirmaLifeBlockTags = (event) => { diff --git a/kubejs/server_scripts/macaws_for_tfc/recipes.js b/kubejs/server_scripts/macaws_for_tfc/recipes.js index 2880c456a..a412f913e 100644 --- a/kubejs/server_scripts/macaws_for_tfc/recipes.js +++ b/kubejs/server_scripts/macaws_for_tfc/recipes.js @@ -30,4 +30,12 @@ function registerMacawsForTFCRecipes(event) { 'mcw_tfc_aio:roofs/gray_roofs/gray_roof_slab', 'mcw_tfc_aio:roofs/gray_roofs/gray_roof_slab' ]).id('minecraft:gray_terracotta') -} + + event.shaped(`4x mcw_tfc_aio:fences/other_fences/hedge`, [ + 'BAB', + 'BAB' + ], { + A: '#forge:rods/wooden', + B: '#minecraft:leaves' + }).id(`tfg:shaped/mcw_tfc/hedge_fence_from_leaves`); +}; diff --git a/kubejs/server_scripts/tfc/recipes.js b/kubejs/server_scripts/tfc/recipes.js index 577940b86..6eb87bda4 100644 --- a/kubejs/server_scripts/tfc/recipes.js +++ b/kubejs/server_scripts/tfc/recipes.js @@ -256,4 +256,32 @@ const registerTFCRecipes = (event) => { event.shapeless('4x tfc:kaolin_clay', ['tfc:white_kaolin_clay']) event.shapeless('4x tfc:kaolin_clay', ['tfc:pink_kaolin_clay']) event.shapeless('4x tfc:kaolin_clay', ['tfc:red_kaolin_clay']) + + global.TFC_WOOD_TYPES.forEach(element => { + event.shaped(`4x tfc:wood/fallen_leaves/${element}`,[ + 'AA', + 'AA' + ], { + A: `tfc:wood/leaves/${element}` + }).id(`tfg:shaped/tfc/${element}_leaves_to_fallen_leaves`); + }); + + /** + * @property {string[]} krummholz_types - List of krummholz wood types. + */ + const krummholz_types = [ + 'aspen', + 'douglas_fir', + 'pine', + 'spruce', + 'white_cedar' + ]; + krummholz_types.forEach(type => { + event.shaped(`1x tfc:plant/${type}_krummholz`,[ + 'A', + 'A' + ], { + A: `tfc:wood/sapling/${type}` + }).id(`tfg:shaped/tfc/${type}_krummholz`); + }); } diff --git a/kubejs/server_scripts/tfc/tags.js b/kubejs/server_scripts/tfc/tags.js index 3637b57ff..b5d7879aa 100644 --- a/kubejs/server_scripts/tfc/tags.js +++ b/kubejs/server_scripts/tfc/tags.js @@ -137,6 +137,21 @@ function registerTFCItemTags(event) { //Plants event.add("tfc:plants", "#tfc:wild_fruits"); + /** + * @property {string[]} krummholz_types - List of krummholz wood types. + */ + const krummholz_types = [ + 'aspen', + 'douglas_fir', + 'pine', + 'spruce', + 'white_cedar' + ]; + krummholz_types.forEach(type => { + event.add('tfc:plants', `tfc:plant/${type}_krummholz`); + event.add('tfc:krummholz', `tfc:plant/${type}_krummholz`); + }); + // Для складывания event.add("tfc:pileable_ingots", "#forge:ingots"); event.add("tfc:pileable_sheets", "#forge:plates"); diff --git a/kubejs/server_scripts/tfg/aquaponics/recipes.greenhouse.js b/kubejs/server_scripts/tfg/aquaponics/recipes.greenhouse.js index fa8c59eb5..23a86cb19 100644 --- a/kubejs/server_scripts/tfg/aquaponics/recipes.greenhouse.js +++ b/kubejs/server_scripts/tfg/aquaponics/recipes.greenhouse.js @@ -5,11 +5,11 @@ //#region Balancing Values /** Base duration of recipes in ticks. */ -const greenhouse_base_duration = 16 * 60 * 20; +const greenhouse_base_duration = 10 * 60 * 20; /** Duration multiplier for fertilized recipes. */ -const greenhouse_duration_multiplier_fertilized = 0.5; +const greenhouse_duration_multiplier_fertilized = 0.75; /** Duration multiplier for aquaponic recipes. */ -const greenhouse_duration_multiplier_aquaponics = 0.4; +const greenhouse_duration_multiplier_aquaponics = 0.5; /** Hydroponic facility chance multiplier. */ const hydroponics_facility_chance_multiplier = 1.25; @@ -35,10 +35,10 @@ const greenhouse_chanced_output_aquaponics = 80; /** @param {...DimensionIndex[]} - Dimension settings array */ const greenhouse_dimension_index = [ // Overworld settings are also used as the default when no dimension is specified. - {id: 'minecraft:overworld', fluid: '#tfg:clean_water', fluid_tier2: 'tfg:nitrate_rich_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VA[GTValues.LV], oxygenated: true}, - {id: 'minecraft:the_nether', fluid: '#tfg:clean_water', fluid_tier2: 'tfg:nitrate_rich_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VA[GTValues.LV], oxygenated: true}, - {id: 'ad_astra:moon', fluid: 'gtceu:helium_3', fluid_tier2: null, fluid_chance: 2, fertilizer: null, eut: GTValues.VA[GTValues.MV], oxygenated: null}, - {id: 'ad_astra:mars', fluid: 'tfg:semiheavy_ammoniacal_water', fluid_tier2: 'tfg:nitrate_rich_semiheavy_ammoniacal_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VA[GTValues.HV], oxygenated: null} + {id: 'minecraft:overworld', fluid: '#tfg:clean_water', fluid_tier2: 'tfg:nitrate_rich_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VHA[GTValues.LV], oxygenated: true}, + {id: 'minecraft:the_nether', fluid: '#tfg:clean_water', fluid_tier2: 'tfg:nitrate_rich_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VHA[GTValues.LV], oxygenated: true}, + {id: 'ad_astra:moon', fluid: 'gtceu:helium_3', fluid_tier2: null, fluid_chance: 2, fertilizer: null, eut: GTValues.VHA[GTValues.MV], oxygenated: null}, + {id: 'ad_astra:mars', fluid: 'tfg:semiheavy_ammoniacal_water', fluid_tier2: 'tfg:nitrate_rich_semiheavy_ammoniacal_water', fluid_chance: 10, fertilizer: 'gtceu:fertilizer', eut: GTValues.VHA[GTValues.HV], oxygenated: null} ]; //#endregion @@ -54,8 +54,9 @@ const greenhouse_dimension_index = [ * @param {Internal.ItemStack} input -Input Item (seeds, saplings, etc.) * @param {Internal.ItemStack|Internal.ItemStack[]} output -Output Items. If array, first item is guaranteed while rest use chanced output. Last item in array is used for the rest of the chance outputs. * @param {number|null} chance_multiplier -Multiplies output chances by this value. Defaults to 1. + * @param {number|null} circuit - Circuit number. 1-32. Or null. */ -function generateGreenHouseRecipe(event, dimension, input, output, chance_multiplier) { +function generateGreenHouseRecipe(event, dimension, input, output, chance_multiplier, circuit) { // Resolve dimension based modifier defaults by comparing to the `greenhouse_dimension_index` array. @@ -83,25 +84,37 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip /** @type {boolean|null} - Whether the recipe requires an oxygenated environment. Defaults to true. */ const requiresOxygen = dimMods ? dimMods.oxygenated : true; + /** @type {string} - Circuit number for the recipe id. Defaults to an empty string if not provided. */ + const idCircuit = (circuit === null || circuit === undefined) ? "" : `/${circuit}`; + ///////////////////////////////////////////////////////////////////////////////////////////////////// /** Collect errors. */ const errors = []; - if (input === undefined || Array.isArray(input)) { - errors.push("input is undefined or is an array"); + if (input === undefined || input === null || Array.isArray(input) || (typeof input === 'string' && input.trim() === '')) { + errors.push(`input is invalid: ${JSON.stringify(input)}`); }; + if (output !== undefined && !Array.isArray(output)) { output = [output]; - } - if (output === undefined || output.length === 0 || output.length > 4) { - errors.push("output is undefined or has invalid length"); + }; + + if (output === undefined || output === null || output.length === 0 || output.length > 4) { + errors.push(`output is invalid: ${JSON.stringify(output)}`); + } else { + output.forEach((o, idx) => { + if (o === undefined || o === null) { + errors.push(`output[${idx}] is null or undefined`); + }; + }); }; // If there are any errors, log them all and throw once. if (errors.length > 0) { - throw new TypeError(`Greenhouse recipe errors for recipe ID ${`tfg:greenhouse/${linuxUnfucker(input)}`}\n - ${errors.join("\n - ")}`); + console.error(`Greenhouse recipe error details:\n input: ${JSON.stringify(input)}\n output: ${JSON.stringify(output)}\n dimension: ${JSON.stringify(dimension)}\n circuit: ${JSON.stringify(circuit)}\n chance_multiplier: ${JSON.stringify(chance_multiplier)}`); + throw new TypeError(`Greenhouse recipe errors for recipe ID ${`tfg:greenhouse/${linuxUnfucker(input)}${idCircuit}`}\n - ${errors.join("\n - ")}`); }; //////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -163,9 +176,8 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip //======================== Greenhouse Recipes ======================== // Base recipe. - let a = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}`) + let a = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}${idCircuit}`) .notConsumable(input) - .circuit(1) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -183,11 +195,13 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip a.chancedOutput(outputs_array[2], base_chance, 0) a.chancedOutput(outputs_array[3], base_chance, 0) }; + if (circuit !== null) { + a.circuit(circuit) + }; // Fertilized Recipe. - let b = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}_fertilized`) + let b = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}_fertilized${idCircuit}`) .notConsumable(input) - .circuit(2) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -206,11 +220,13 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip b.chancedOutput(outputs_array[3], fertilizer_chance, 0) b.itemInputs(Item.of(resolvedFertilizer, 8)) }; + if (circuit !== null) { + b.circuit(circuit + 1) + }; // Aquaponics Recipe. - let c = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}_aquaponic`) + let c = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}_aquaponic${idCircuit}`) .notConsumable(input) - .circuit(3) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluidTier2} 1`, resolvedChance, 0) @@ -228,14 +244,16 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip c.chancedOutput(outputs_array[2], aquaponic_chance, 0) c.chancedOutput(outputs_array[3], aquaponic_chance, 0) }; + if (circuit !== null) { + c.circuit(circuit + 2) + }; c.itemOutputs('tfg:flora_pellets'); //======================== Hydroponic Facility Recipes ======================== // Base recipe. - let d = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}`) + let d = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}${idCircuit}`) .notConsumable(input) - .circuit(1) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -250,11 +268,13 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip d.chancedOutput(outputs_array[2], hydroponics_base_chance, 0) d.chancedOutput(outputs_array[3], hydroponics_base_chance, 0) }; + if (circuit !== null) { + d.circuit(circuit) + }; // Fertilized Recipe. - let e = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}_fertilized`) + let e = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}_fertilized${idCircuit}`) .notConsumable(input) - .circuit(2) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -270,11 +290,13 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip e.chancedOutput(outputs_array[3], hydroponics_fertilizer_chance, 0) e.itemInputs(Item.of(resolvedFertilizer, 8)) }; + if (circuit !== null) { + e.circuit(circuit + 1) + }; // Aquaponics Recipe. - let f = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}_aquaponic`) + let f = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}_aquaponic${idCircuit}`) .notConsumable(input) - .circuit(3) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluidTier2} 1`, resolvedChance, 0) @@ -289,6 +311,9 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip f.chancedOutput(outputs_array[2], hydroponics_aquaponic_chance, 0) f.chancedOutput(outputs_array[3], hydroponics_aquaponic_chance, 0) }; + if (circuit !== null) { + f.circuit(circuit + 2) + }; f.itemOutputs('tfg:flora_pellets'); } else { @@ -296,9 +321,8 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip //======================== Greenhouse Recipes ======================== - let a = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}`) + let a = event.recipes.gtceu.greenhouse(`tfg:${linuxUnfucker(input)}${idCircuit}`) .notConsumable(input) - .circuit(1) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -316,12 +340,14 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip a.chancedOutput(outputs_array[2], fertilizer_chance, 0) a.chancedOutput(outputs_array[3], fertilizer_chance, 0) }; + if (circuit !== null) { + a.circuit(circuit) + }; //======================== Hydroponics Facility Recipes ======================== - let b = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}`) + let b = event.recipes.gtceu.hydroponics_facility(`tfg:${linuxUnfucker(input)}${idCircuit}`) .notConsumable(input) - .circuit(1) .itemOutputs(outputs_array[0]) .perTick(true) .chancedFluidInput(`${resolvedFluid} 1`, resolvedChance, 0) @@ -336,6 +362,9 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip b.chancedOutput(outputs_array[2], hydroponics_fertilizer_chance, 0) b.chancedOutput(outputs_array[3], hydroponics_fertilizer_chance, 0) }; + if (circuit !== null) { + b.circuit(circuit) + }; }; }; @@ -351,10 +380,15 @@ function generateGreenHouseRecipe(event, dimension, input, output, chance_multip * @param {Internal.Dimension|null} dimension -Dimension ID * @param {Internal.Ingredient} input -Input Item. (seed, bush, etc.) * @param {Internal.ItemStack} output -Output Item. (vegetable, fruit, etc.) + * @param {Internal.ItemStack|null} leaves - Leaf block. Generates extra recipes with leaf outputs if provided. * @param {number|null} chance_multiplier -Multiplies output chances by this value. Defaults to 1. */ -function generateCropGreenHouseRecipe(event, dimension, input, output, chance_multiplier) { - generateGreenHouseRecipe(event, dimension, `4x ${input}`, [Item.of(output, 20), Item.of(input, 1), Item.of(output, 4)], chance_multiplier); +function generateCropGreenHouseRecipe(event, dimension, input, output, leaves, chance_multiplier) { + generateGreenHouseRecipe(event, dimension, `4x ${input}`, [Item.of(output, 20), Item.of(input, 1), Item.of(output, 4)], chance_multiplier, 1); + generateGreenHouseRecipe(event, dimension, `4x ${input}`, [Item.of(output, 20), Item.of(input, 8), Item.of(input, 4)], chance_multiplier, 5); + if (leaves !== null && leaves !== undefined) { + generateGreenHouseRecipe(event, dimension, `4x ${input}`, [Item.of(output, 20), Item.of(leaves, 16), Item.of(leaves, 8)], chance_multiplier, 10); + }; }; /** @@ -369,10 +403,15 @@ function generateCropGreenHouseRecipe(event, dimension, input, output, chance_mu * @param {Internal.Dimension|null} dimension -Dimension ID * @param {Internal.Ingredient} input -Input Item. (sapling) * @param {Internal.ItemStack} output -Output Item. (wood) + * @param {Internal.ItemStack|null} leaves - Leaf block. Generates extra recipes with leaf outputs if provided. * @param {number|null} chance_multiplier -Multiplies output chances by this value. Defaults to 1. */ -function generateTreeGreenHouseRecipe(event, dimension, input, output, chance_multiplier) { - generateGreenHouseRecipe(event, dimension, `8x ${input}`, [Item.of(output, 64), Item.of(input, 4), Item.of(output, 16)], chance_multiplier); +function generateTreeGreenHouseRecipe(event, dimension, input, output, leaves, chance_multiplier) { + generateGreenHouseRecipe(event, dimension, `8x ${input}`, [Item.of(output, 64), Item.of(input, 4), Item.of(output, 16)], chance_multiplier, 1); + generateGreenHouseRecipe(event, dimension, `8x ${input}`, [Item.of(output, 64), Item.of(input, 16), Item.of(input, 8)], chance_multiplier, 5); + if (leaves !== null && leaves !== undefined) { + generateGreenHouseRecipe(event, dimension, `8x ${input}`, [Item.of(output, 64), Item.of(leaves, 32), Item.of(leaves, 16)], chance_multiplier, 10); + }; }; //#endregion @@ -466,88 +505,89 @@ const registerTFGGreenhouseRecipes = (event) => { // Mushrooms Ingredient.of('#tfg:plants/beneath').stacks.forEach(element => { - generateGreenHouseRecipe(event, 'minecraft:the_nether', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1); + generateGreenHouseRecipe(event, 'minecraft:the_nether', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1, 1); }); - generateGreenHouseRecipe(event, 'minecraft:the_nether', '8x minecraft:red_mushroom', ['24x minecraft:red_mushroom', '8x minecraft:red_mushroom'], 1); - generateGreenHouseRecipe(event, 'minecraft:the_nether', '8x minecraft:brown_mushroom', ['24x minecraft:brown_mushroom', '8x minecraft:brown_mushroom'], 1); + generateGreenHouseRecipe(event, 'minecraft:the_nether', '8x minecraft:red_mushroom', ['24x minecraft:red_mushroom', '8x minecraft:red_mushroom'], 1, 1); + generateGreenHouseRecipe(event, 'minecraft:the_nether', '8x minecraft:brown_mushroom', ['24x minecraft:brown_mushroom', '8x minecraft:brown_mushroom'], 1, 1); // Crops global.FIRMALIFE_GREENHOUSE_FRUIT_RECIPE_COMPONENTS.forEach(element => { - generateCropGreenHouseRecipe(event, null, element.input, element.output, 1); + generateCropGreenHouseRecipe(event, null, element.input, element.output, element.leaves, 1); }); global.TFC_GREENHOUSE_FRUIT_RECIPE_COMPONENTS.forEach(element => { - generateCropGreenHouseRecipe(event, null, element.input, element.output, 1); + generateCropGreenHouseRecipe(event, null, element.input, element.output, element.leaves, 1); }); global.TFC_GREENHOUSE_VEGETABLE_RECIPE_COMPONENTS.forEach(element => { - generateCropGreenHouseRecipe(event, null, element.input, element.output, 1); + generateCropGreenHouseRecipe(event, null, element.input, element.output, null, 1); }); global.TFC_GREENHOUSE_BERRY_RECIPE_COMPONENTS.forEach(element => { - generateCropGreenHouseRecipe(event, null, element.input, element.output, 1); + generateCropGreenHouseRecipe(event, null, element.input, element.output, null, 1); }); // Wood global.TFC_WOOD_TYPES.forEach(element => { - generateTreeGreenHouseRecipe(event, null, `tfc:wood/sapling/${element}`, `tfc:wood/log/${element}`, 1); + generateTreeGreenHouseRecipe(event, null, `tfc:wood/sapling/${element}`, `tfc:wood/log/${element}`, `tfc:wood/leaves/${element}`, 1); }); global.AFC_SAPLINGS.forEach(element => { - generateTreeGreenHouseRecipe(event, null, `afc:wood/sapling/${element.sapling}`, element.log, 1); + generateTreeGreenHouseRecipe(event, null, `afc:wood/sapling/${element.sapling}`, element.log, `afc:wood/leaves/${element.sapling}`, 1); }); // Plants Ingredient.of('#tfc:plants').subtract('#tfc:wild_fruits').stacks.forEach(element => { - generateGreenHouseRecipe(event, null, `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1); + generateGreenHouseRecipe(event, null, `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1, 1); + }); + Ingredient.of('#forge:corals').stacks.forEach(element => { + generateGreenHouseRecipe(event, null, `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1, 1); + }); + Ingredient.of('#forge:coral_blocks').stacks.forEach(element => { + generateGreenHouseRecipe(event, null, `8x ${element.id}`, [element.withCount(12), element.withCount(4)], 1, 1); }); - generateGreenHouseRecipe(event, null, '8x minecraft:bamboo', ['64x minecraft:bamboo', '8x minecraft:bamboo'], 1); - - generateGreenHouseRecipe(event, null, '8x tfc:food/fresh_seaweed', ['24x tfc:food/fresh_seaweed', '8x tfc:food/fresh_seaweed'], 1); + generateGreenHouseRecipe(event, null, '8x minecraft:bamboo', ['64x minecraft:bamboo', '8x minecraft:bamboo'], 1, 1); - generateGreenHouseRecipe(event, 'minecraft:the_nether', '4x minecraft:glow_berries', ['20x minecraft:glow_berries', '4x minecraft:glow_berries'], 1); + generateGreenHouseRecipe(event, null, '8x tfc:tree_roots', ['64x tfc:tree_roots', '8x tfc:tree_roots'], 1, 1); + + generateGreenHouseRecipe(event, null, '8x tfc:food/fresh_seaweed', ['24x tfc:food/fresh_seaweed', '8x tfc:food/fresh_seaweed'], 1, 1); + + generateGreenHouseRecipe(event, 'minecraft:the_nether', '4x minecraft:glow_berries', ['20x minecraft:glow_berries', '4x minecraft:glow_berries'], 1, 1); // Mars Wood - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/strophar', [ - '64x ad_astra:strophar_stem', '4x tfg:saplings/strophar', '32x ad_astra:strophar_stem', '16x ad_astra:strophar_cap' - ], 1); - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/aeronos', [ - '64x ad_astra:aeronos_stem', '4x tfg:saplings/aeronos', '32x ad_astra:aeronos_stem', '16x ad_astra:aeronos_cap' - ], 1); - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/glacian', [ - '64x ad_astra:glacian_log', '4x tfg:saplings/glacian', '32x ad_astra:glacian_log', '16x species:alphacene_moss_block' - ], 1); - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/alphacene', [ - '64x species:alphacene_mushroom_block', '4x tfg:saplings/alphacene', '16x minecraft:mushroom_stem', '16x minecraft:mushroom_stem' - ], 1); - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/warped', [ - '64x beneath:wood/log/warped', '4x tfg:saplings/warped', '32x beneath:wood/log/warped', '16x minecraft:warped_wart_block' - ], 1); - generateGreenHouseRecipe(event, 'ad_astra:mars', '8x tfg:saplings/crimson', [ - '64x beneath:wood/log/crimson', '4x tfg:saplings/crimson', '32x beneath:wood/log/crimson', '16x minecraft:nether_wart_block' - ], 1); + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/strophar`, `ad_astra:strophar_stem`, `ad_astra:strophar_cap`, 1); + + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/aeronos`, `ad_astra:aeronos_stem`, `ad_astra:aeronos_cap`, 1); + + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/glacian`, `ad_astra:glacian_log`, `species:alphacene_moss_block`, 1); + + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/alphacene`, `species:alphacene_mushroom_block`, `minecraft:mushroom_stem`, 1); + + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/warped`, `beneath:wood/log/warped`, `minecraft:warped_wart_block`, 1); + + generateTreeGreenHouseRecipe(event, 'ad_astra:mars', `tfg:saplings/crimson`, `beneath:wood/log/crimson`, `minecraft:nether_wart_block`, 1); // Mars Plants Ingredient.of('#tfg:mars_plants').stacks.forEach(element => { - generateGreenHouseRecipe(event, 'ad_astra:mars', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1); + generateGreenHouseRecipe(event, 'ad_astra:mars', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1, 1); }); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:amber_root_seeds', 'betterend:amber_root_product', 1); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:blossom_berry_seeds', 'betterend:blossom_berry_product', 1); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:bolux_mushroom_seeds', 'betterend:bolux_mushroom_product', 1); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:cave_pumpkin_plant_seeds', 'betterend:cave_pumpkin', 1); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:chorus_mushroom_seeds', 'betterend:chorus_mushroom_product', 1); - generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:shadow_berry_seeds', 'betterend:shadow_berry_product', 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:amber_root_seeds', 'betterend:amber_root_product', null, 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:blossom_berry_seeds', 'betterend:blossom_berry_product', null, 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:bolux_mushroom_seeds', 'betterend:bolux_mushroom_product', null, 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:cave_pumpkin_plant_seeds', 'betterend:cave_pumpkin', null, 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:chorus_mushroom_seeds', 'betterend:chorus_mushroom_product', null, 1); + generateCropGreenHouseRecipe(event, 'ad_astra:mars', 'betterend:shadow_berry_seeds', 'betterend:shadow_berry_product', null, 1); // Moon Plants generateGreenHouseRecipe(event, 'ad_astra:moon', '8x tfg:lunar_chorus_flower', [ '64x minecraft:chorus_fruit', '8x minecraft:chorus_fruit', '8x tfg:lunar_chorus_flower', '8x tfg:lunar_chorus_flower' - ], 1); + ], 1, 1); generateGreenHouseRecipe(event, 'ad_astra:moon', '8x minecraft:twisting_vines', [ '16x minecraft:twisting_vines', '8x minecraft:pearlescent_froglight', '8x minecraft:verdant_froglight', '8x minecraft:ochre_froglight' - ], 1); + ], 1, 1); Ingredient.of('#tfg:moon_plants').stacks.forEach(element => { - generateGreenHouseRecipe(event, 'ad_astra:moon', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1); + generateGreenHouseRecipe(event, 'ad_astra:moon', `8x ${element.id}`, [element.withCount(24), element.withCount(8)], 1, 1); }); //#endregion diff --git a/kubejs/server_scripts/tfg/aquaponics/recipes.pisciculture.js b/kubejs/server_scripts/tfg/aquaponics/recipes.pisciculture.js index 71b258c93..667fb3953 100644 --- a/kubejs/server_scripts/tfg/aquaponics/recipes.pisciculture.js +++ b/kubejs/server_scripts/tfg/aquaponics/recipes.pisciculture.js @@ -25,10 +25,10 @@ const pisciculture_base_duration = Math.max(1, greenhouse_base_duration * greenh /** @type {DimensionIndex[]} - Dimension settings array */ const pisciculture_dimension_index = [ // Overworld settings are also used as the default when no dimension is specified. - {id: 'minecraft:overworld', fluid: '#tfg:clean_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_water', eut: GTValues.VA[GTValues.LV], oxygenated: true}, - {id: 'minecraft:the_nether', fluid: '#tfg:clean_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_water', eut: GTValues.VA[GTValues.LV], oxygenated: true}, + {id: 'minecraft:overworld', fluid: '#tfg:clean_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_water', eut: GTValues.VHA[GTValues.LV], oxygenated: true}, + {id: 'minecraft:the_nether', fluid: '#tfg:clean_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_water', eut: GTValues.VHA[GTValues.LV], oxygenated: true}, // The moon has no fish yet :( - {id: 'ad_astra:mars', fluid: 'tfg:semiheavy_ammoniacal_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_semiheavy_ammoniacal_water', eut: GTValues.VA[GTValues.HV], oxygenated: null} + {id: 'ad_astra:mars', fluid: 'tfg:semiheavy_ammoniacal_water', fluid_chance: 10, fluid_out: 'tfg:nitrate_rich_semiheavy_ammoniacal_water', eut: GTValues.VHA[GTValues.HV], oxygenated: null} ]; //#endregion diff --git a/kubejs/server_scripts/tfg/beneath/tags.beneath.js b/kubejs/server_scripts/tfg/beneath/tags.beneath.js index 768569bea..b5d3b554e 100644 --- a/kubejs/server_scripts/tfg/beneath/tags.beneath.js +++ b/kubejs/server_scripts/tfg/beneath/tags.beneath.js @@ -12,12 +12,24 @@ function registerTFGBeneathItemTags(event) { event.add("minecraft:piglin_loved", "tfc:ore/rich_native_gold"); event.add('minecraft:piglin_loved', 'tfg:piglin_disguise') - event.add('tfc:plants', 'minecraft:spore_blossom') event.remove('createaddition:plants', 'minecraft:moss_carpet') - event.add('tfg:plants/beneath', 'beneath:gleamflower') - event.add('tfg:plants/beneath', 'beneath:burpflower') - event.add('tfg:plants/beneath', '#beneath:mushrooms') + /** + * @property {string[]} beneath_plants - List of Beneath plants to be added to the `tfg:plants/beneath` tag. + */ + const beneath_plants = [ + 'beneath:gleamflower', + 'beneath:burpflower', + 'minecraft:big_dripleaf', + 'minecraft:small_dripleaf', + 'minecraft:glow_lichen', + 'minecraft:hanging_roots', + 'minecraft:spore_blossom', + '#beneath:mushrooms' + ]; + beneath_plants.forEach(plant => + event.add('tfg:plants/beneath', plant) + ); event.add('tfc:compost_greens', 'minecraft:red_mushroom_block') event.add('tfc:compost_greens', 'minecraft:brown_mushroom_block') diff --git a/kubejs/startup_scripts/firmalife/constants.js b/kubejs/startup_scripts/firmalife/constants.js index f6ae1a013..6708cf1c2 100644 --- a/kubejs/startup_scripts/firmalife/constants.js +++ b/kubejs/startup_scripts/firmalife/constants.js @@ -107,8 +107,8 @@ global.FIRMALIFE_JAMS = [ ] global.FIRMALIFE_GREENHOUSE_FRUIT_RECIPE_COMPONENTS = [ - { input: 'firmalife:plant/cocoa_sapling', output: 'firmalife:food/cocoa_beans'}, - { input: 'firmalife:plant/fig_sapling', output: 'firmalife:food/fig'}, + { input: 'firmalife:plant/cocoa_sapling', output: 'firmalife:food/cocoa_beans', leaves: 'firmalife:plant/cocoa_leaves' }, + { input: 'firmalife:plant/fig_sapling', output: 'firmalife:food/fig', leaves: 'firmalife:plant/fig_leaves' }, { input: 'firmalife:plant/pineapple_bush', output: 'firmalife:food/pineapple'}, { input: 'firmalife:plant/nightshade_bush', output: 'firmalife:food/nightshade_berry'}, { input: 'firmalife:seeds/red_grape', output: 'firmalife:food/red_grapes'}, diff --git a/kubejs/startup_scripts/tfc/constants.js b/kubejs/startup_scripts/tfc/constants.js index a6513b569..eb6d8dfa0 100644 --- a/kubejs/startup_scripts/tfc/constants.js +++ b/kubejs/startup_scripts/tfc/constants.js @@ -788,15 +788,15 @@ global.TFC_JAMS = /** @type {const} */ ([ ]); global.TFC_GREENHOUSE_FRUIT_RECIPE_COMPONENTS = /** @type {const} */ ([ - { input: "tfc:plant/cherry_sapling", output: "tfc:food/cherry"}, - { input: "tfc:plant/green_apple_sapling", output: "tfc:food/green_apple"}, - { input: "tfc:plant/lemon_sapling", output: "tfc:food/lemon"}, - { input: "tfc:plant/olive_sapling", output: "tfc:food/olive"}, - { input: "tfc:plant/orange_sapling", output: "tfc:food/orange"}, - { input: "tfc:plant/peach_sapling", output: "tfc:food/peach"}, - { input: "tfc:plant/plum_sapling", output: "tfc:food/plum"}, - { input: "tfc:plant/red_apple_sapling", output: "tfc:food/red_apple"}, - { input: "tfc:plant/banana_sapling", output: "tfc:food/banana"} + { input: "tfc:plant/cherry_sapling", output: "tfc:food/cherry", leaves: "tfc:plant/cherry_leaves" }, + { input: "tfc:plant/green_apple_sapling", output: "tfc:food/green_apple", leaves: "tfc:plant/green_apple_leaves" }, + { input: "tfc:plant/lemon_sapling", output: "tfc:food/lemon", leaves: "tfc:plant/lemon_leaves" }, + { input: "tfc:plant/olive_sapling", output: "tfc:food/olive", leaves: "tfc:plant/olive_leaves" }, + { input: "tfc:plant/orange_sapling", output: "tfc:food/orange", leaves: "tfc:plant/orange_leaves" }, + { input: "tfc:plant/peach_sapling", output: "tfc:food/peach", leaves: "tfc:plant/peach_leaves" }, + { input: "tfc:plant/plum_sapling", output: "tfc:food/plum", leaves: "tfc:plant/plum_leaves" }, + { input: "tfc:plant/red_apple_sapling", output: "tfc:food/red_apple", leaves: "tfc:plant/red_apple_leaves" }, + { input: "tfc:plant/banana_sapling", output: "tfc:food/banana" } ]); global.TFC_GREENHOUSE_VEGETABLE_RECIPE_COMPONENTS = /** @type {const} */ ([