Magic Mirror

Started by 2Cool4u on

Topic category: Help with MCreator software

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Magic Mirror

How do I make an item that sends the player to their spawn point???

You need one procedure on…
Thu, 10/22/2020 - 07:26

You need one procedure on right click to tp to spawnpoint.

I highly suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ive watched all of them and…
Thu, 10/22/2020 - 18:35

ive watched all of them and none don't help me in this area. You kinda just answered my question with my question. What procedures do I use?

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's a procedure that…
Fri, 10/23/2020 - 20:20

Here's a procedure that should do what you want:

https://drive.google.com/file/d/1U2WZbfI9CQONhPylz40ukfxi48vtATVv/view?usp=sharing

I didn't know of a MCreator way of getting the spawn coordinates of a player, so I used some commands (the first three blocks of the procedure). They are in this form:

execute store result entity @s ForgeData.spawnX int 1 run data get entity @s SpawnX

where the X is either X, Y, or Z depending on which coordinate it's getting. Make sure you put X, Y, and Z into 3 separate commands so that you can get all three values you need. 

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Whats the override fall…
Sun, 10/25/2020 - 05:06

Whats the override fall distance for?

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works, but only for the…
Sun, 10/25/2020 - 05:12

It works, but only for the second time i teleport, the first time sends me to 0 0 0, then i right click again and i got home

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I put the override fall…
Sun, 10/25/2020 - 15:04

I put the override fall distance block there so that if the player was falling before they used the item they didn't splat into the ground and take damage when they respawned. Here is a new procedure that should work better:

https://drive.google.com/file/d/1IXZ_FC5fSl4OlubYX2raDwVI9Lnl8pc_/view?usp=sharing

This one also checks wether or not the player has set their spawn point yet, and if not, it sends them to the world spawnpoint. The new command that is in the first block is:

execute store success entity @s ForgeData.hasSpawn byte 1 run data get entity @s SpawnX

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is honestly amazing and…
Sun, 10/25/2020 - 23:10

This is honestly amazing and I couldn't be more grateful!!! It works perfectly.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What are all the commands…
Tue, 06/22/2021 - 22:56

What are all the commands used here, sorry? You can't see all the text in each of the boxes. Are the other commands the same as the first, just replacing 'success' with 'result'?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also how would you get the…
Tue, 06/22/2021 - 22:57

Also how would you get the spawnDimension data?

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The four commands used in…
Fri, 06/25/2021 - 21:42

The four commands used in the second version are:

  • execute store success entity @s ForgeData.hasSpawn byte 1 run data get entity @s SpawnX
  • execute store result entity @s ForgeData.spawnX int 1 run data get entity @s SpawnX
  • execute store result entity @s ForgeData.spawnY int 1 run data get entity @s SpawnY
  • execute store result entity @s ForgeData.spawnZ int 1 run data get entity @s SpawnZ

I don't know anyway to get the spawnDimension, since unlike the spawn position, it is not stored in the player's nbt data (as far as I can tell). This unfortunately means that the magic mirror does not work correctly if you are not in the spawn point's dimension, which you can't seem to check.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
from what i know, there is a…
Sat, 06/26/2021 - 09:50

from what i know, there is a SpawnDimension NBT tag stored in the player data. if you could get it the same way you do with the SpawnX SpawnY and SpawnZ the magic mirror could theoretically work in any dimension that the player's spawn is set in, making it mod compatible

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It seems as though the…
Sat, 06/26/2021 - 10:02

It seems as though the SpawnDimension nbt tag is only created after the player has set their spawn

meaning in all other cases the magic mirror should just send you to overworld spawn??

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for reference, i used the…
Sat, 06/26/2021 - 10:02

for reference, i used the following command:
/execute store success entity @s ForgeData.spawnDimension byte 1 run data get entity @s SpawnDimension