How to make entities switch dimension ?

Started by rescue0978 on Sun, 06/06/2021 - 19:19

Topic category: Help with modding (Java Edition)

Last seen on 14:30, 15. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make entities switch dimension ?
Sun, 06/06/2021 - 19:19

I would like to teleport the player (who is in a vehicle, riding an entity such as a Flan's mod plane), into the End when he reaches an altitude of 255 blocks in the overworld, then the reverse when he reaches the altitude 0 in the End.

https://i.imgur.com/SMoWox5.png

The player teleports fine as expected, when he reaches Y = 255 in the overworld or Y = 0 in the End, but when the player rides an entity, it doesn't work, the player does not switch dimensions.

What should I do to fix this ?