Jump to content

Recommended Posts

Posted

I want to change a player's dimension but I also want to use a custom teleporter. So first I thought that I should use

 

mcServer.getPlayerList().changePlayerDimension(this, dimensionIn, teleporter);

 

but then I discovered that the class Entity has a method called "changeDimension(int)" which does a few more things, but does not allow for a custom teleporter (rather taking the dimension default).

 

I wonder, what is the best course of action?

 

1) Use PlayerList#changePlayerDimension(EntityPlayerMP, int, Teleporter) PRO: allows for custom teleporter, CON: skips logic in EntityPlayer#changeDimension

2) Use Entity#changeDimension(int) followed by Teleporter#placeInPortal(EntityPlayer, double) PRO: doesn't skip logic, CON: a portal from the default teleporter, which can't be changed and is always a normal Teleporter, will be created

3) ???

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.