From 6ef371c99a01c7176a41955e2ffe70d74cd9178f Mon Sep 17 00:00:00 2001 From: Pyritie Date: Mon, 6 Oct 2025 16:07:12 +0100 Subject: [PATCH] adjustments for moon/mars mob HPs! --- CHANGELOG.md | 3 ++ defaultconfigs/wan_ancient_beasts-server.toml | 10 ++-- kubejs/server_scripts/main_server_script.js | 4 +- kubejs/server_scripts/tfg/entities.js | 46 +++++++++++++++++++ 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 kubejs/server_scripts/tfg/entities.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 17caa04ae..3749f04be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,12 @@ ## [Unreleased] ### Changes - Buffed how many stainless steel jar lids you can get per ingot from 16 to 48 @Pyritie +- Adjusted max HP of various moon and mars mobs @Pyritie ### Bug fixes - Fixed linux crash from recipe IDs (#1962) @Xaligal @Pyritie - Fixed missing texture for interplanetary wireless card (#1965, #1964) @Ko-lja +- Fixed glacian trees floating above ground @Pyritie +- Fixed tameable mars animals giving twice as much meat as they should @Pyritie ## [0.11.0] - 05-10-2025 - WARNING! If you're upgrading your world from 0.10 to 0.11, please read the upgrade guide [here](https://github.com/TerraFirmaGreg-Team/Modpack-Modern/wiki/%5BEN%5D-Upgrading-from-0.10-to-0.11). We do not recommend using Alpha versions for progression, but if you do, please make frequent backups! diff --git a/defaultconfigs/wan_ancient_beasts-server.toml b/defaultconfigs/wan_ancient_beasts-server.toml index 5c9109df5..6dfa60638 100644 --- a/defaultconfigs/wan_ancient_beasts-server.toml +++ b/defaultconfigs/wan_ancient_beasts-server.toml @@ -3,7 +3,7 @@ [sniffer] #Sniffer health [default: 75] #Range: 1.0 ~ 1024.0 - health = 150.0 + health = 90.0 #Sniffer armor [default: 3] #Range: 0.0 ~ 30.0 armor = 3.0 @@ -42,7 +42,7 @@ [crusher] #Crusher health [default: 50] #Range: 1.0 ~ 1024.0 - health = 150.0 + health = 120.0 #Crusher attack damage [default: 10] #Range: 0.0 ~ 1024.0 damage = 10.0 @@ -57,13 +57,13 @@ [glider] #Glider health [default: 25] #Range: 1.0 ~ 1024.0 - health = 150.0 + health = 100.0 #Soarer Attributes [soarer] #Soarer health [default: 40] #Range: 1.0 ~ 1024.0 - health = 200.0 + health = 150.0 #Soarer attack damage [default: 15] #Range: 0.0 ~ 1024.0 damage = 25.0 @@ -72,5 +72,5 @@ [surfer] #Surfer health [default: 30] #Range: 1.0 ~ 1024.0 - health = 150.0 + health = 100.0 diff --git a/kubejs/server_scripts/main_server_script.js b/kubejs/server_scripts/main_server_script.js index cb967d311..58776317d 100644 --- a/kubejs/server_scripts/main_server_script.js +++ b/kubejs/server_scripts/main_server_script.js @@ -291,6 +291,4 @@ TaCZServerEvents.gunDataLoad((event) => { TaCZServerEvents.attachmentDataLoad((event) => { attachmentDataLogic(event) -}) - - +}) \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/entities.js b/kubejs/server_scripts/tfg/entities.js new file mode 100644 index 000000000..3aefbec38 --- /dev/null +++ b/kubejs/server_scripts/tfg/entities.js @@ -0,0 +1,46 @@ +// priority: 0 +"use strict"; + +const NEW_MOB_MAX_HP = { + // moon mobs + "endermanoverhaul:end_enderman": 50 , + "endermanoverhaul:end_islands_enderman": 120, + "endermanoverhaul:windswept_hills_enderman": 70, + "endermanoverhaul:soulsand_valley_enderman": 80, + // mars mobs -- wan's ancient beasts has its own config for this + "endermanoverhaul:crimson_enderman": 60, + "endermanoverhaul:warped_enderman": 60, + "endermanoverhaul:badlands_enderman": 65, + "endermanoverhaul:cave_enderman": 60, + "ad_astra:martian_raptor": 50, + "tfg:glacian_ram": 50, + "tfg:wraptor": 60, + // sniffer uses the value in wan's ancient beasts config + "species:goober": 100, + "species:stackatick": 20, + "species:springling": 60, + "species:quake": 130, + "species:cruncher": 800 +} + +EntityEvents.spawned((event) => { + + // Easier to just keep all entities in here for balancing instead of spreading them around + + let { entity, entity: {type} } = event; + + console.log(`entity: ${entity}, type: ${type}`) + + let newHP = NEW_MOB_MAX_HP[type] ?? 0; + if (newHP === 0) + return; + + let baseHealth = entity.maxHealth; + let missingHealth = newHP - baseHealth; + + entity.modifyAttribute("minecraft:generic.max_health", "tfg_health_buff_id", missingHealth, "addition"); + + if (missingHealth > 0) { + entity.health += missingHealth; + } +}) \ No newline at end of file