Moving entity to different dimension

Started by wimsly on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Moving entity to different dimension

I am currently creating a mod where I have a certain custom mob that is following the player and attacks the player if it comes into contact with the player

I am trying to make it so that when the player moves to a dimension, lets say the nether, I want to have the mob be moved to the nether as well.

My plan is to have it be moved to the location of the portal, but with a slight delay so that the player has a chance to move away before the mob has a chance to attack them. I don't want the mob to simply spawn on the player, because I don't want it to instantly attack the player.

I've tried a few different ways of doing this but I just can't seem to get the desired result.