Minecraft Data Packs / Challenge

Modified Hardcore

  • check_circle Functions
  • 2,333 views, 2 today
  • 136 downloads, 0 today
  • 9
  • 7
re1lrmbh's Avatar re1lrmbh
Level 14 : Journeyman Engineer
0
Modified Hardcore is an alternative way to add meaning and impact to death in Minecraft, without risking losing access to your world forever like normal hardcore.

When you die, your max health will be decreased by 1 whole heart (2 health points).
When you eat an enchanted golden apple, your max health will be increased by 1 whole heart (2 health points).

The range of max health is bounded, so you will never have more than 10 whole hearts (20 health points), and will never have less than 3 whole hearts (6 health points).

After the datapack is installed, players who wish to use it must trigger the mhc_enroll objective. When enrolled your max health will be set by default to 6 health points.
/trigger mhc_enroll

The minimum, maximum, step, and start amounts are customizable.
/scoreboard players set mhc_config mhc_config_max 20
/scoreboard players set mhc_config mhc_config_min 6
/scoreboard players set mhc_config mhc_config_step 2
/scoreboard players set mhc_config mhc_config_start 6

Players who do not enroll will not be affected by the data pack. If a player wishes to unenroll, simply trigger the mhc_unenroll objective. This will reset the player's max health to whatever it was was before they enrolled.
/trigger mhc_unenroll

To remove the data pack and reset players back to their original max health, run the unload function
/function mhc:unload

Note that due to limitations in how maximum health is set, enrolled players will appear to take damage immediately upon respawning (they will not actually take damage). There is no workaround with the tools mojang provides at the moment.

This pack was meant to be a challenge and thus the pack is hardcoded to max out at 20 health points (the minecraft default). Due to limitations in how the maximum health is set, if you would like to allow players to gain more than 20 health points you must edit data/mhc/functions/sync_health.mcfunction.
CompatibilityMinecraft 1.13
toMinecraft 1.20
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome