Minecraft Maps / Redstone Device

Recall Eggs! Teleport home with a Scroll of ...er, Egg of Recall!

  • 715 views, 2 today
  • 24 downloads, 0 today
  • 3
  • 1
  • 2
ManipulativeOrg's Avatar ManipulativeOrg
Level 4 : Apprentice Crafter
6
All of my favorite Role Playing Games growing up had a system in place for the player to "recall" or teleport home.

I have devised a potential method to do something similar with no mods in Vanilla Minecraft.
This is a system that could be used in RPG maps or anywhere else.

I have posted a picture to give an idea of how small this system can be, I made it more spread out than needed to aid in walking users through how it works. I have placed a sign on or near every command block to educate the user as to what the block does.

I will also post the commands that go into the blocks in this post.


Commands block commands posted below: you may also just look at them in game!

The block on the right gives 10 of the "Recall Eggs" when clicked, this could be hooked up to a dispenser/dropper that does a testfor of a certain level, kills or other stat to "purchase" them, or they could be found in a chest or given to the player.
These "Recall Eggs" are empty spawn eggs and you must click on a nearby block with them to use them.
I placed an empty enchant effect on the eggs to give them the enchanted item glow, the lore helps instruct the player on their use.

/give @p minecraft:spawn_egg 10 1 {display:{Name:"Recall Egg",Lore:[Use this item to return home!]},ench:[]}

Next is a simple hopper clock, great for running simple machines like this - google or PM me if you do not know how to make one! Looking at the example you will see it is two hoppers built so that they feed into eachother - they pass the item back and forth which can be sensed with a comperator, in this example the comperator activates the next command blocks.

These blocks set up a scoreboard and test for a score on that scoreboard.

The top block command is:

/scoreboard objectives add Recall stat.useItem.minecraft.spawn_egg

This adds an objective to the scoreboard called "Recall" one point is added each time the spawn_egg is used.

The bottom block:

/testfor @p[score_Recall_min=1]

This block tests to see if the player has a Recall score of at least 1 - which they get when the use the Recall Egg.

If this score = at least 1 it activates the next comperator which activates the following blocks.

The next block is the one that teleports the player back to the town, home, or location you supply.
In my example it is:

 /tp @p 0 69 17

You will want to change this to your desired location.

The command blocks touching this block are also activated and they are:

/playsound mob.endermen.portal @p

which plays the sound of an enderman teleporting - I thought that this sound suited the teleporting action of the player but one of my play-testers said it scared him every time! - you can use any sound, or no sound at all. Next:

/execute @p ~ ~ ~ particle spell ~ ~-1 ~ 1 1 1 1 500

This executes the particle command - take a look at the variables of this command to learn more! I used the spell particle effect with 500 particles, this makes a nice little white cloud of poofs at your feet when you land from teleporting. I learned that if you swap this block with the teleport block, making this block activate first then the poof of particles appears at the location you were at BEFORE teleporting which may be appealing in some situations. Use any particles you wish in any amount, or leave this block out for none, it is optional.

I next created a tellraw block that informs the player of what happened to them, I have seen similar behavior in RPGs and liked the look of it, it is also optional.

/tellraw @p {"text":"","extra":[{"text":"You have been teleported home!","color":"green"}]}

The player will see "You have been teleported home!" in their chat window, the text will be green. Read more on JSON formatting and the tellraw command, you can do a lot with these functions, this is a very basic example and as I said, optional.

After teleporting the player I decided to have the Recall objective removed from the scoreboard which, of course, erases the score as well - the system will not work without this command:

/scoreboard objectives remove Recall

The first block I described is constantly being activated by the hopper clock and will re-create the scoreboard objective, with a score of 0 making this system work.

The final block in this system removes 1 of the Recall Eggs from the players inventory:

 /clear @p minecraft:spawn_egg 1 1 {display:{Name:"Recall Egg"}}

This is somewhat optional depending on the way you are going to use this system. Without this you can just give the player 1 Recall Egg and it will last forever and have infinite uses. The way I have used it requires the player to somehow get more through gameplay.

I welcome any questions or comments - this is one of my first "complicated" (ha) contraptions so I imagine there are better ways some of these things can be done or some mistakes I have made - I love being educated so, feel free!

This system will not work in a multiplayer environment, not without modifications, as I make use of the @p command - this would cause all of these things to happen to whichever player happened to be nearest to these command blocks - which could be entertaining but would not achieve the desired effect.

I have tested this system from many many thousands of blocks away from the command blocks, however, unless this system is created in the chunk that contains the world spawn it stops working if you walk too far away. Some command block contraptions only need to be active when you are nearby, ones like this should remain constantly running - I do not believe this system causes much if any real lag, let me know if otherwise!

You can set your worldspawn to the location of this machine by typing /setworldspawn when standing nearby. This system can easily be hidden under the ground.

The lapis blocks seen in the screen shot and included in the schematic have no function, they were placed to keep you from seeing the other things I was working on in the background!

As I learn I may update this system - I would like to know how to make eggs unique so that I could use other spawn eggs for different recall locations, or different "spells" as far as I know there is no way to testfor the display name datatag - I wonder if there is another way to make them unique, perhaps placing different non-functional enchantments on the different eggs - if you are educated in this area please spread the love - I would happily credit you in any further work of mine.

This system could also be used with other items that share the stat.useItem objective - this includes placing records in a jukebox, potions, eggs, spawn eggs, bows, fishing poles, carrot on a stick, paintings, ender pearls, snowballs an empty map and possibly other items - I have not tested them all!

Please enjoy, if you have read all of this please comment and let me know what you think!
I welcome it all, good and bad, thank you for your time - also feel free to PM me to teach me or have me teach you! :)

Please enjoy this system, you make make any use of it any where in any way without my permission/this is permission.
If you WANT to let me know how/where you used it I would love to know!

The only thing you NEED/should modify is the block that sets the home teleport point. I placed it on top of the diamond blocks.
If you do not change this and go to test the system you may end up somewhere far from this creation depending on how/where you implement this! (I know, I did it to myself and had to find my location in MCEdit!)

This system is available as a schematic and as a world upload, you may post those and the screen shot anywhere you want too!
Progress100% complete
Tags

Create an account or sign in to comment.

1
11/26/2014 1:47 am
Level 4 : Apprentice Crafter
ManipulativeOrg
ManipulativeOrg's Avatar
Thanks dxl!

I'd really like to find a working way to make these eggs unique, so I could have one egg teleport you home, another to ...a cave, another to ... wherever... still learning how to do this... anyone have any advice?
1
11/17/2014 7:43 am
Level 37 : Artisan Ranger
Caporal Dxl
Caporal Dxl's Avatar
This is very cool and useful! Good job, man!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome