Dimension Candy

Started by bdzbasicbricks on

Topic category: Help with modding (Java Edition)

Last seen on 17:11, 9. Oct 2024
Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dimension Candy

I want to make an item called "nether candy" that, when eaten, takes you to the nether as if you had gone through a nether portal. I also want it to bring you back to the overworld 10 minutes after you ate it. Is this possible?

Last seen on 17:18, 9. Oct 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Depends on how you want it…
Wed, 10/09/2024 - 17:16

Depends on how you want it to work.

If you dont care where the player ends up on either side then just use the switch dimension block. On player finished using item, if dimension player is in is not the nether, switch dimension to nether.

Then either use wait 12000 ticks and switch dimension to overworld if dimension player is in is not overworld.

Otherwise you could save the x y z of the player when they leave the overworld so they return to the same place they left. You can either do that through a string variable or 3 number variables. 

For the nether side if you dont want the player to spawn in a wall or in lava or fall to their death. Then you can make a small structure to spawn when the player enters. Like a 1x3x1 block of netherrack and air.

Theres also probably another longer way to make the player teleport to the nearest solid block when switching dimensions.