• check_circle Functions
  • 5,813 views, 0 today
  • 439 downloads, 0 today
  • 7
  • 5
  • 4
Swisle's Avatar Swisle
Level 22 : Expert Explorer
1
How it works.
It provides each player with two locations they can teleport between: the retreat location and the resume location. The retreat location can be set with the /trigger set.retreat command. Afterwards, the player can teleport there as many times as they like by using the /trigger retreat command. The resume location is only set on usage of the /trigger retreat command. Then, the player can teleport back to the resume location with the /trigger resume command, but only once, as the /trigger resume command will fail to work until one uses the /trigger retreat command again.

When is this useful?
  • When you are far from your base and need to quickly go back to drop-off or pick-up something there, but don't want to travel all the way there and back.
  • When you want to have a deathless way to return to your home base.
Why limit the resume teleportation?
The limitation is so the player can't teleport back to where they were if they die. One could get around this by setting their retreat location to wherever they are exploring for example, but beds and respawn anchors can already do that (outside the end), so if they do this, they lose their quick deathless ticket home.


Subtleties on how it works.
  • Teleportation works between dimensions. For example you can teleport to and from the overworld and the end.
  • Coordinates and orientation (where you are and which way you were facing) are only accurate to an integer value.
  • You don't need to have cheats on or be in creative mode to have the commands work, as they are all activiated through the /trigger command.
  • On top of resetting your retreat location, the /trigger set.retreat command also wipes your saved resume location. This is intentionally done to prevent the otherwise work-around death mentioned in the section above.
  • There is a warning prompt on usage of the /trigger set.retreat command after the first use to prevent the player from accidentally resetting their retreat location and wiping their resume location.
  • I'm not sure if this works in a multiplayer server. I tried to write it so it does, but I haven't had the chance to test it and I'm completely new to datapacks. If you test it, please leave a comment and I'll update this line.
Uninstalling the datapack.
Before deleting the datapack from the datapacks folder, first run the /function retreat_resume:unload command so that all the introduced scoreboard variables are deleted.

Credits.
  • Youtube user emeraldfyr3. The ability to convert scoreboard values to teleportation coordinates is the linchpin of this datapack, and I would have had no idea on how to do that if it weren't for emeraldfyr3's example datapack.
  • Too many other tutorials and datapack disections which showed me how to use command blocks, datapacks, and showed me what was possible.
  • Me. I wrote it.
CreditYoutube user: emeraldfyr3
CompatibilityMinecraft 1.18
Tags

3 Update Logs

Version 1.3 for Minecraft 1.18 : by Swisle 12/06/2021 8:47:56 pmDec 6th, 2021

Updated to be compatible with Minecraft 1.18.
LOAD MORE LOGS

Create an account or sign in to comment.

gingerdoesmc69
03/04/2021 4:05 pm
Level 1 : New Miner
gingerdoesmc69's Avatar
this works but i cant re set my retreat it says unknown or incomplete whe i click yes
1
Swisle
03/04/2021 6:41 pm
Level 22 : Expert Explorer
Swisle's Avatar
Could I have some conditions of your usage of the datapack so I can try and recreate the situation? In all my testing the reset process has worked fine.

If possible, please provide
  • The version number of Minecraft.
  • The game mode (survival, creative, etc).
  • Whether Allow Cheats was on or off.
  • Anything else of note.
1
Swisle
03/04/2021 7:14 pm
Level 22 : Expert Explorer
Swisle's Avatar
Actually, I think I figured it out. It seems those sort of buttons don't allow non-cheating players to run functions directly. I changed it to change a trigger instead and it seems to work now.

I have uploaded an update which should solve the issue: version 1.1.
1
gingerdoesmc69
03/05/2021 5:55 am
Level 1 : New Miner
gingerdoesmc69's Avatar
thanks man!
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome