Jump to content

Change Dimension using code 1.16.5


Noxxous

Recommended Posts

Hi,

Currently I am trying to change the player's dimension on right click by doing: "context.getPlayer().changeDimension([Nether Server World goes here])" which I know this is based upon PlayerEntity and context.getPlayer() just calls the PlayerEntity... It's just that the problem is, this is as far I've got and I've tried to use RegistryKeys but I've given up on that and I am thinking of using the ITeleporter after using the context: level and I've using that but my game just crashes. Please help. What do I do?

Edited by Noxxous
Link to comment
Share on other sites

3 hours ago, Ugdhar said:

Where is this method?

I cannot find a class called player anywhere, and PlayerEntity only seems to have teleportTo, teleportWithTicket, and randomTeleport methods.

if you are using the latest version, the most methods have new names because minecraft has switched to the official mojang mappings
you can use the bot on the forge discord server to get the names for the methods

Link to comment
Share on other sites

14 hours ago, DietmarKracht said:

It is teleportTo iirc. Check the parameters. Though you need a serverworld as the targetworld

Ok, but how do you find the ServerWorld of the target dimension? I'm having the same problem with Change Dimension except I can't find any class that is associated with any Dimension, and I want to use a custom dimension (using datapack) so I would probably need to the codec but then that's just a RegistryKey so a completely different instance and probably a method from what I remember and I can't think of any terms to find the Dimension class

Edited by Noxxous
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.