From d068b91baea2f1974fbdd3a16471439511b3ca9b Mon Sep 17 00:00:00 2001 From: GameStar <56610486+BlueBoat29@users.noreply.github.com> Date: Sat, 19 Jul 2025 04:34:24 -0500 Subject: [PATCH] Changed firmalife greenhouse to prevent exploits (#1371) * Update tags.js Signed-off-by: GameStar <56610486+BlueBoat29@users.noreply.github.com> * Update tag_prefixes.js Signed-off-by: GameStar <56610486+BlueBoat29@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: GameStar <56610486+BlueBoat29@users.noreply.github.com> --------- Signed-off-by: GameStar <56610486+BlueBoat29@users.noreply.github.com> --- CHANGELOG.md | 1 + kubejs/server_scripts/firmalife/tags.js | 41 +++++++++++++++++++- kubejs/startup_scripts/gtceu/tag_prefixes.js | 9 +---- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f63cb6f..fe05bcf63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Added Tier 2 Insulation: Alkaline Earth Silicate @BlueBoat29 - Added tfc data to tacz guns and attachments (#1353) @Redeix - Allowed "window" blocks and panes to be broken and picked up @BlueBoat29 +- Changed Firmalife greenhouses to no longer allow any doors/trapdoors/pipes (#1363) @BlueBoat29 ### Bug fixes - Fixed yeast food processor conflict (#1310) @Redeix - Fixed seed oil voiding in barrels (#1310) @Redeix diff --git a/kubejs/server_scripts/firmalife/tags.js b/kubejs/server_scripts/firmalife/tags.js index 32c5be333..f23b0ad39 100644 --- a/kubejs/server_scripts/firmalife/tags.js +++ b/kubejs/server_scripts/firmalife/tags.js @@ -19,6 +19,8 @@ const registerFirmaLifeItemTags = (event) => { // Удаление тегов у руд event.removeAllTagsFrom("/tfc:ore/[^*]+/[^*]+/") + + } const registerFirmaLifeBlockTags = (event) => { @@ -31,6 +33,43 @@ const registerFirmaLifeBlockTags = (event) => { // Удаление тегов у руд event.removeAllTagsFrom("/tfc:ore/[^*]+/[^*]+/") + // Удаление тегов у отключенных предметов + global.FIRMALIFE_DISABLED_ITEMS.forEach(item => { + event.removeAllTagsFrom(item) + }) + + // Удаление тегов у руд + event.removeAllTagsFrom("/tfc:ore/[^*]+/[^*]+/") + + //greenhouse wall fixes + event.remove('firmalife:always_valid_greenhouse_wall', '#minecraft:doors') + event.remove('firmalife:always_valid_greenhouse_wall', '#minecraft:trapdoors') + + const greenhouse_tiers = [ + 'treated_wood', + 'weathered_treated_wood', + 'copper', + 'exposed_copper', + 'weathered_copper', + 'oxidized_copper', + 'iron', + 'rusted_iron', + 'stainless_steel' + ] + + greenhouse_tiers.forEach(tier => { + event.add('firmalife:always_valid_greenhouse_wall', 'firmalife:' + tier + '_greenhouse_door') + event.add('firmalife:always_valid_greenhouse_wall', 'firmalife:' + tier + '_greenhouse_trapdoor') + }) + + //Allows any block with the word "brick" in its id to be used as oven insulation. + //Add blacklisted words to the const with | between. + const brick_blacklist = ('drying|additionalplacements'); + event.add('firmalife:oven_insulation', `/^(?=.*brick)(?!.*(${brick_blacklist})).*/`); + + event.add('firmalife:oven_insulation', 'firmalife:stovetop_pot'); + event.add('firmalife:oven_insulation', 'firmalife:vat'); + //Allows any block with the word "brick" in its id to be used as oven insulation. //Add blacklisted words to the const with | between. const brick_blacklist = ('drying|additionalplacements'); @@ -52,4 +91,4 @@ const registerFirmaLifeFluidTags = (event) => { event.add('firmalife:mixable', 'tfcchannelcasting:dark_chocolate') event.add('firmalife:mixable', 'afc:maple_syrup') event.add('firmalife:mixable', 'afc:birch_syrup') -} \ No newline at end of file +} diff --git a/kubejs/startup_scripts/gtceu/tag_prefixes.js b/kubejs/startup_scripts/gtceu/tag_prefixes.js index 3e15958a2..4b5f973b2 100644 --- a/kubejs/startup_scripts/gtceu/tag_prefixes.js +++ b/kubejs/startup_scripts/gtceu/tag_prefixes.js @@ -52,13 +52,6 @@ const registerGTCEuTagPrefixes = (event) => { TagPrefix.pipeNonupleFluid.defaultTagPath("nonuple_fluid_pipes/%s") TagPrefix.pipeNonupleFluid.unformattedTagPath("nonuple_fluid_pipes") - // FirmaLife Shit - TagPrefix.pipeTinyFluid.customTagPath("", (prefix, mat) => createBlockTag("firmalife:always_valid_greenhouse_wall")) - TagPrefix.pipeSmallFluid.customTagPath("", (prefix, mat) => createBlockTag("firmalife:always_valid_greenhouse_wall")) - TagPrefix.pipeNormalFluid.customTagPath("", (prefix, mat) => createBlockTag("firmalife:always_valid_greenhouse_wall")) - TagPrefix.pipeLargeFluid.customTagPath("", (prefix, mat) => createBlockTag("firmalife:always_valid_greenhouse_wall")) - // FirmaLife Shit - TagPrefix.pipeSmallItem.defaultTagPath("small_item_pipes/%s") TagPrefix.pipeSmallItem.unformattedTagPath("small_item_pipes") TagPrefix.pipeNormalItem.defaultTagPath("normal_item_pipes/%s") @@ -99,4 +92,4 @@ const registerGTCEuTagPrefixes = (event) => { TagPrefix.rawOreBlock.unformattedTagPath("raw_ore_blocks") TagPrefix.rawOre.setIgnored(GTMaterials.Iron); -} \ No newline at end of file +}