Minecraft Data Packs / Game Mechanic

LifeBound: Max health lowers the further you are from friends

  • check_circle Functions
  • 1,842 views, 1 today
  • 92 downloads, 0 today
  • 13
  • 5
  • 9
kaimedina's Avatar kaimedina
Level 36 : Artisan Engineer
18
Max health lowers the further you are from friends
This datapack changes the maximum health of individual players the further they are from the group's average location. It does not account for dimensions, only coordinates. By Default, the location updates every minute and you lower a heart every 20 blocks away from this location. However, with the below commands you can increase the update speed all the way to every 1s, and change how much distance t takes to lose health (from every 10 blocks to every 100 blocks). If any bugs occur, try /reload, and if they still occur please let me know. This gamemode can be used for a one time gimmick, or to encourage players on a small server to work together and not all go off and cause lots of exploration-based-lag.

Note: Due to the way minecraft works, the visual of your max health changing might not always update immediately. Sometimes it does, sometimes it does not. It definitely will once you heal/take damage.

When close together, speed, dolphins grace, and regeneration are given.

Commands / Settings


Lower Power = Less Lag
Commands will take a moment to update (based on however often the power updates)

/function avghealth:veryhighpower - updates location every 1s
/function avghealth:highpower - updates location every 10s
/function avghealth:mediumpower - updates location every 30s
/function avghealth:lowpower - updates location every 60s (default)

/function avghealth:veryhighdistance - Health Changes Every 100 blocks
/function avghealth:highdistance - Health Changes Every 50 blocks
/function avghealth:mediumdistance - Health Changes Every 20 blocks (default)
/function avghealth:lowdistance - Health Changes Every 10 blocks

Always back up your world before using a datapack

If you like this, you may also like a worldborder based on the same code:
https://www.planetminecraft.com/data-pack/center-a-worldborder-of-any-size-at-the-average-changing-multiplayer-location-in-the-game-low-energy-less-lag/



I recommend using the Simple Voice Chat Mod while using these datapacks.

You have permission to use this datapack for any means, as long as you give credit.
CompatibilityMinecraft 1.19
Tags

2 Update Logs

Update #2 : by kaimedina 05/24/2023 8:20:38 pmMay 24th, 2023

Bug fixes
LOAD MORE LOGS

Create an account or sign in to comment.

1
06/11/2023 12:18 am
Level 1 : New Miner
BambooFences
BambooFences's Avatar
This is great! How would I change distance from average group location into distance from 0,0 (spawn)? I'd like a player's health to lower the further they are from spawn.
2
06/13/2023 10:32 amhistory
Level 36 : Artisan Engineer
kaimedina
kaimedina's Avatar
Thank you! I'm not somewhere where I can access minecraft right now, but I can access the code. This - should - do it, I just cut out all the averaging and just teleport the armour stand to 0 62 0, which is spawn just below sea level.

https://drive.google.com/file/d/1kILp4Au4y3uBJSRihFfL7ZUnvPg1chMd/view?usp=sharing

If you test it out, let me know if it works! You can go into spectator to view the armor stand at this position.

Alternatively,

If you set a command:

/tp @e[​tag=HealthSusan] 0 62 0

on loop in a command block, then put it on the lowest power, that should be good enough to get that going.
2
06/15/2023 4:10 am
Level 1 : New Miner
BambooFences
BambooFences's Avatar
Tysm! It worked. I did have to summon an armour stand with the healthsusan tag but that's all good.
2
06/15/2023 9:44 am
Level 36 : Artisan Engineer
kaimedina
kaimedina's Avatar
Awesome! Glad to hear!
3
05/26/2023 5:13 am
Level 40 : Master Procrastinator
Zigdust09
Zigdust09's Avatar
use /effect give @a health_boost 0 34 true to update the visual of there hearts without damaging or healing them
1
05/26/2023 11:07 am
Level 36 : Artisan Engineer
kaimedina
kaimedina's Avatar
Oh shoot good idea! Will implement that this weekend when I get a chance.
2
05/17/2023 5:14 pm
Level 43 : Master Lemon
CrownDeluxe
CrownDeluxe's Avatar
lol imagine what happens when you go through the end gateways at not the exact same tick
2
05/17/2023 5:20 pmhistory
Level 36 : Artisan Engineer
kaimedina
kaimedina's Avatar
Thankfully the max health can only go down to half a heart! Though enderpearling can definitely become messy business.
2
05/17/2023 5:45 pm
Level 43 : Master Lemon
CrownDeluxe
CrownDeluxe's Avatar
and imagine you get shot or smth during the 2 seconds that y'all a separate :skull:
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome