From e57bc2aca80e364e54183c1fb3c18303b1aadedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Fri, 14 Jun 2024 22:11:11 +0200 Subject: [PATCH] feat(1.20.1): improve ad astra gtc compatibility --- .../ad_astra_gtc_integration_client.js | 19 ++++++++++++ .../thermal_gtc_integration_client.js | 6 ++-- .../ad_astra_gtc_integration.js | 31 +++++++++++++++++++ .../server_scripts/thermal_gtc_integration.js | 12 +++---- 4 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 packwiz/1.20.1/kubejs/client_scripts/ad_astra_gtc_integration_client.js create mode 100644 packwiz/1.20.1/kubejs/server_scripts/ad_astra_gtc_integration.js diff --git a/packwiz/1.20.1/kubejs/client_scripts/ad_astra_gtc_integration_client.js b/packwiz/1.20.1/kubejs/client_scripts/ad_astra_gtc_integration_client.js new file mode 100644 index 0000000..83c7837 --- /dev/null +++ b/packwiz/1.20.1/kubejs/client_scripts/ad_astra_gtc_integration_client.js @@ -0,0 +1,19 @@ +const AD_ASTRA_REMOVED_PLATES = ["steel"]; + +const AD_ASTRA_REMOVED_RODS = ["steel"]; + +const AD_ASTRA_REMOVED_NUGGETS = ["steel"]; + +JEIEvents.hideItems((event) => { + AD_ASTRA_REMOVED_PLATES.forEach((metal) => { + event.hide(`ad_astra:${metal}_plate`); + }); + + AD_ASTRA_REMOVED_RODS.forEach((metal) => { + event.hide(`ad_astra:${metal}_rod`); + }); + + AD_ASTRA_REMOVED_NUGGETS.forEach((metal) => { + event.hide(`ad_astra:${metal}_nugget`); + }); +}); diff --git a/packwiz/1.20.1/kubejs/client_scripts/thermal_gtc_integration_client.js b/packwiz/1.20.1/kubejs/client_scripts/thermal_gtc_integration_client.js index 228cd9f..b54844a 100755 --- a/packwiz/1.20.1/kubejs/client_scripts/thermal_gtc_integration_client.js +++ b/packwiz/1.20.1/kubejs/client_scripts/thermal_gtc_integration_client.js @@ -1,4 +1,4 @@ -const REMOVED_PLATES = [ +const THERMAL_REMOVED_PLATES = [ "tin", "lead", "silver", @@ -11,7 +11,7 @@ const REMOVED_PLATES = [ "electrum", ]; -const REMOVED_GEARS = [ +const THERMAL_REMOVED_GEARS = [ "tin", "lead", "silver", @@ -27,7 +27,7 @@ const REMOVED_GEARS = [ //"quartz" ]; -const REMOVED_NUGGETS = [ +const THERMAL_REMOVED_NUGGETS = [ "tin", "lead", "silver", diff --git a/packwiz/1.20.1/kubejs/server_scripts/ad_astra_gtc_integration.js b/packwiz/1.20.1/kubejs/server_scripts/ad_astra_gtc_integration.js new file mode 100644 index 0000000..9b312e6 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/ad_astra_gtc_integration.js @@ -0,0 +1,31 @@ +const AD_ASTRA_REMOVED_PLATE_RECIPES = ["steel"]; + +const AD_ASTRA_REMOVED_ROD_RECIPES = ["steel"]; + +const AD_ASTRA_REMOVED_NUGGET_RECIPES = ["steel"]; + +ServerEvents.recipes((event) => { + // Remove Ad Astra recipes for plates + AD_ASTRA_REMOVED_PLATE_RECIPES.forEach((metal) => { + event.remove({ + id: `ad_astra:compressing/${metal}_plate_from_compressing_${metal}_ingots`, + }); + event.remove({ + id: `ad_astra:compressing/${metal}_plate_from_compressing_${metal}_blocks`, + }); + }); + + // Remove Ad Astra recipes for gears + AD_ASTRA_REMOVED_ROD_RECIPES.forEach((metal) => { + event.remove({ + id: `ad_astra:${metal}_rod`, + }); + }); + + // Remove Ad Astra recipes for nuggets + AD_ASTRA_REMOVED_NUGGET_RECIPES.forEach((metal) => { + event.remove({ + id: `ad_astra:${metal}_nugget`, + }); + }); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/thermal_gtc_integration.js b/packwiz/1.20.1/kubejs/server_scripts/thermal_gtc_integration.js index 8a0f543..5d1272b 100755 --- a/packwiz/1.20.1/kubejs/server_scripts/thermal_gtc_integration.js +++ b/packwiz/1.20.1/kubejs/server_scripts/thermal_gtc_integration.js @@ -1,4 +1,4 @@ -const REMOVED_PLATE_RECIPES = [ +const THERMAL_REMOVED_PLATE_RECIPES = [ "tin", "lead", "silver", @@ -11,7 +11,7 @@ const REMOVED_PLATE_RECIPES = [ "electrum", ]; -const REMOVED_GEAR_RECIPES = [ +const THERMAL_REMOVED_GEAR_RECIPES = [ "tin", "lead", "silver", @@ -27,7 +27,7 @@ const REMOVED_GEAR_RECIPES = [ //"quartz" ]; -const REMOVED_NUGGET_RECIPES = [ +const THERMAL_REMOVED_NUGGET_RECIPES = [ "tin", "lead", "silver", @@ -40,21 +40,21 @@ const REMOVED_NUGGET_RECIPES = [ ServerEvents.recipes((event) => { // Remove Thermal Foundation recipes for plates - REMOVED_PLATE_RECIPES.forEach((metal) => { + THERMAL_REMOVED_PLATE_RECIPES.forEach((metal) => { event.remove({ id: `thermal:machines/press/press_${metal}_ingot_to_plate`, }); }); // Remove Thermal Foundation recipes for gears - REMOVED_GEAR_RECIPES.forEach((metal) => { + THERMAL_REMOVED_GEAR_RECIPES.forEach((metal) => { event.remove({ id: `thermal:parts/${metal}_gear`, }); }); // Remove Thermal Foundation recipes for nuggets - REMOVED_NUGGET_RECIPES.forEach((metal) => { + THERMAL_REMOVED_NUGGET_RECIPES.forEach((metal) => { event.remove({ id: `thermal:storage/${metal}_nugget_from_ingot`, });