- check_circle Functions
- 30,977 views, 4 today
- 2,981 downloads, 1 today
19
Datapack inspired by the youtube series X-Life.
Basic info:
You start with 1 heart and 10 lives, each time you die you lose a life (obviously) but gain 1 extra heart.
It is a 1.16+ datapack since it is only possible with the newly added attribute command.
Administrative commands:
Note: make sure the player you execute the command for is online.
1. Have you accidentally killed a player on your server? (e.g.: maybe you've tp-ed him to you, he fell and died)
you can now give his life back by simply runing the command:
Note: if that was his last live you'll have to set him manually back to survival
2. Did one of the players on the server lost all his/her lives and wants to start over?
You can now use the command below to set him/her back to 1 heart and 10 lives.
Note: you will have to set him manually back to survival
3. Did you run by accident one of the commands above for the wrong player?
You can fix it by removing his lives using this command:
4. Not sure why anyone would want this... but just in case you want some of your players to use xlife, and some to play normally, you can selectively disable the pack functionality just for some players:
Disclaimer: I do not claim any author rights over this since it wasn't my idea, but rather inspired by the youtube series, I just made it possible in vanilla with datapacks instead of using mods or plugins.
Feel free to use and incorporate it in your projects.
Basic info:
You start with 1 heart and 10 lives, each time you die you lose a life (obviously) but gain 1 extra heart.
It is a 1.16+ datapack since it is only possible with the newly added attribute command.
Administrative commands:
Note: make sure the player you execute the command for is online.
1. Have you accidentally killed a player on your server? (e.g.: maybe you've tp-ed him to you, he fell and died)
you can now give his life back by simply runing the command:
/execute as <player_name> run function xlife:add_life
This will also recalculate the number of hears he/she should have and pop a message letting him/her know the mistake was corrected.Note: if that was his last live you'll have to set him manually back to survival
2. Did one of the players on the server lost all his/her lives and wants to start over?
You can now use the command below to set him/her back to 1 heart and 10 lives.
/execute as <player_name> run function xlife:reset_hearts
Note: you will have to set him manually back to survival
3. Did you run by accident one of the commands above for the wrong player?
You can fix it by removing his lives using this command:
/execute as <player_name> run function xlife:remove_life
4. Not sure why anyone would want this... but just in case you want some of your players to use xlife, and some to play normally, you can selectively disable the pack functionality just for some players:
/execute as <player_name> run function xlife:disable
Disclaimer: I do not claim any author rights over this since it wasn't my idea, but rather inspired by the youtube series, I just made it possible in vanilla with datapacks instead of using mods or plugins.
Feel free to use and incorporate it in your projects.
Compatibility | Minecraft 1.16 |
to | Minecraft 1.17 |
Tags |
1 Update Logs
Update #1 : by Ferr 10/04/2020 10:35:50 amOct 4th, 2020
- Added a title that shows after you respawn letting you know how many lives left you have and how much you've survived
- You will now also receive a book recording the time you've survived
- Added a couple of administrative commands:
-> execute as <player_name> run function xlife:add_life
-> execute as <player_name> run function xlife:remove_life
-> execute as <player_name> run function xlife:reset_hearts
-> execute as <player_name> run function xlife:disable
- You will now also receive a book recording the time you've survived
- Added a couple of administrative commands:
-> execute as <player_name> run function xlife:add_life
-> execute as <player_name> run function xlife:remove_life
-> execute as <player_name> run function xlife:reset_hearts
-> execute as <player_name> run function xlife:disable
4619052
119
Create an account or sign in to comment.
And lastly from what i've noticed if you're in a single player world you will need to run the /reload command every time you start up the world otherwise none of the datapacks work which is strange, but i guess it's just the way it is
www.curseforge.com/minecraft/modpacks/boodlynecks-modded-oneblock-forge
how do i reset lives ???
and
if I go to survival when I am a spectator I am born with 1 heart or with all
1. /scoreboard players set <player-name> deaths 0
this keeps track of how many times a player has died (0 deaths = 1 heart, 1 deaths = 2 hearts, and so on)
2. /scoreboard players set <player-name> newdeath 1
this will just trigger the calculation and update process for the number of hearts.