• check_circle Advancements
  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 3,732 views, 5 today
  • 306 downloads, 0 today
  • 14
  • 10
  • 4
Required Resource Pack
Ethastum's Avatar Ethastum
Level 28 : Expert Professor
8
Save your items upon death by using a Death Statue.

This datapack adds the Sword of Recovery, which can be found in dungeon-chests (33% chance of spawning).
The sword has a unique property, that if you are to perish with it in your inventory it will summon a Death Statue to hold your items, (its basically a gravestone if you're familiar with modded). This saves your items from lava, despawning and even the Void!

When trying to retrieve your items, just take the Sword of Recovery from your Death Statues hands.


This features an optional resourcepack, that only adds a texture for the Sword of Recovery.


This also adds an advancement, found past the 'Postmortal' advancement in the adventure tab.


settingsConfiguration:

The Sword of Recovery has a CustomModelData of 37442, it can be changed manually inside the "ds:loot_tables/recovery_sword.json" file.


You can configure two different aspects of the datapack:


Other's permissions with Death Statues:
  • /scoreboard players set #DS ds_owner.config 0
    (Only the player who 'owns' the Death Statue can get the items within it) (default)

  • /scoreboard players set #DS ds_owner.config 1
    (Everyone can open all Death Statues)




Coordinate Feedback upon creation of a Death Statue:
  • /scoreboard players set #DS ds_coords.config 0
    (You will not get any info upon creation of a Death Statue, other than that you've indeed created one)

  • /scoreboard players set #DS ds_coords.config 1
    (You will get the coordinates and the dimension of a Death Statue upon its creation) (default)


Sword of Recovery usage upon creation of a Death Statue:
  • You will get your Sword of Recovery back upon claiming your Death Statue.
    "/scoreboard players set #DS ds_usesword.config 0" (default)

  • The Sword of Recovery breaks upon usage, and you will not get it back.
    "/scoreboard players set #DS ds_usesword.config 1"


Notes:
This Datapack uses 'KeepInventory' to get the player's inventory at their death, and therefore needs the gamerule to be set to 'true' to work consistently. (Same with 'doImmediateRespawn' but just 'false') The Datapack will toggle this by itself upon load.

The Datapack should work for any versions 1.16-1.20.5, but I'm not sure, as it was created on 1.20.2. Feel free to test it and report your findings back to me.


border_color Terms of Use:

- Under no circumstance may you reupload original nor edited versions of my work, nor take credit for my content.

- If you create a collection of datapacks (alike to a modpack), you may include my creations as long as I'm credited.

- All uploads of my content will be on PlanetMinecraft, I can therefore take no responsibility for any other uploads on any other platforms.
CompatibilityMinecraft 1.19
toMinecraft 1.20
Tags

1 Update Logs

Updated to v.1.1 : by Ethastum 01/28/2024 4:29:50 pmJan 28th

Changelog:
  • Added a loop that changes the gamerule 'keepInventory' and 'doImmediateRespawn' to what they need to be, due to problems with server hosting. (Delay 1 minute, 3 commands).
  • Added configuration. A new config command that changes if the Sword of Recovery should be consumed or not upon creation of a Death Statue. (By default this is off)
  • When a Death Statue is created inside lava it will now be encased in cobblestone

Bug fixes:
  • The Death Statue can no longer break unbreakable nor annoying blocks upon its creation. (Beforehand you could break bedrock by dying inside it, yikes, the list includes operator blocks and chests, barrels, spawners, reinforced deepslate and obsidian)
  • Fixed a rather nasty bug where everything would break if you were to have multiple Swords of Recovery in your inventory upon death.

Create an account or sign in to comment.

2
11/27/2023 12:43 pm
Level 2 : Apprentice System
Red_Master010101010101
Red_Master010101010101's Avatar
Spróbóję, ciekawe.
1
08/04/2023 1:24 pm
Level 1 : New Miner
HelloNewWold
HelloNewWold's Avatar
Can you write the command? I will get this in a creative world without chests? LG
1
08/06/2023 4:09 pm
Level 28 : Expert Professor
Ethastum
Ethastum's Avatar
The command for getting the Sword of Recovery is as follows:

"/loot give @p loot ds:recovery_sword"
1
08/03/2023 3:11 am
Level 28 : Expert Professor
Ethastum
Ethastum's Avatar
If you find any glitches or bugs please tell me here.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome