How to set global variable to dimension ID of player?

Started by akisephila on

Topic category: Help with MCreator software

Active 2 months ago
Joined Apr 2021
Points:
613

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 66
How to set global variable to dimension ID of player?

So, I finally decided to update my MCreator from 2020.5 to the latest version, hoping this would make it easier to develop my 1.15.2 mod. And in some ways, yeah, it has.

However, I cannot figure out how to set a global variable to the id of the dimension that the player is currently in. Using 2020.5, I was able to do this by having the variable be a number type, but since that has changed I cannot set a variable to the dimension id the player is in. I have tried changing the variable to different types, to no avail.

Additionally (though this was a problem even in 2020.5), I have no way to teleport the player to the specific ID stored, as the "Switch Dimension" block is limited to what's in MCreator. 
It has to be specific, because I am creating an addon mod and want to be able to teleport the player back and forth between the base mod's dimensions (Since they do not register in MCreator, this is seemingly impossible.)

Please help, thanks.

There is now a plugin for…
Mon, 05/10/2021 - 08:03

There is now a plugin for numeric dimension IDs, but 1.16.5 no longer supports IDs for dimensions so in 1.16.5, you may need to do if statements to check dimension types and assign some selected numbers to them instead

Active 2 months ago
Joined Apr 2021
Points:
613

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 66
Yes, but even then isn't the…
Mon, 05/10/2021 - 22:39

Yes, but even then isn't the Switch Dimension block still only limited to what's in MCreator..?