Jump to content

[1.8] GUI button teleport player to dimension & general dimension support


Recommended Posts

Posted

Hi,

I want to make it so a button on a GUI will teleport the player that is pressing it to another dimension.

Is this possible? If so - how do I do that? I tried to figure it out myself but it's a bit tricky, as I understood that GUIs are client-side only.

Any help is appreciated!

Why are you reading this?

Posted

1st, have you already worked out how to teleport?  If not, do that first with a command or something.

 

To do what you want, create the GUI with your button.  Plenty of tutorials on it.

 

When you hit the button, you send a packet to the server to initiate the teleport you worked out above.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

send a packet from client to server side that u want the teleport.

on server side this code is what u want

Teleporter is the EntityPlayerMP

 

 teleporter.mcServer.getConfigurationManager().transferPlayerToDimension(teleporter, dimensionToGo); 
teleporter.playerNetServerHandler.setPlayerLocation
			(posX, posY, posZ, teleporter.rotationYaw, teleporter.rotationPitch);

 

Posted

1st, have you already worked out how to teleport?  If not, do that first with a command or something.

 

To do what you want, create the GUI with your button.  Plenty of tutorials on it.

 

When you hit the button, you send a packet to the server to initiate the teleport you worked out above.

send a packet from client to server side that u want the teleport.

on server side this code is what u want

Teleporter is the EntityPlayerMP

 

 teleporter.mcServer.getConfigurationManager().transferPlayerToDimension(teleporter, dimensionToGo); 
teleporter.playerNetServerHandler.setPlayerLocation
			(posX, posY, posZ, teleporter.rotationYaw, teleporter.rotationPitch);

Pretty sure I understood that!

Yet I'm having some problems creating the custom dimension.

What are the core things I to set up for a custom dimension - Where can I find a good tutorial for Minecraft 1.8?

Thanks guys :)

Why are you reading this?

Posted

There is a number of things that changed depending on how much you are changing with your custom dimension.

 

I honestly don't remember the specifics.  None of them were too hard to figure out.

 

 

I suggest when you create your WorldProvider and ChunkProviders, just extend the vanilla classes and do not do anything specific to it until you can get the dimension to load and you can teleport in and out of it.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

There is a number of things that changed depending on how much you are changing with your custom dimension.

 

I honestly don't remember the specifics.  None of them were too hard to figure out.

 

 

I suggest when you create your WorldProvider and ChunkProviders, just extend the vanilla classes and do not do anything specific to it until you can get the dimension to load and you can teleport in and out of it.

Okay, I'll try that. If I'd have some issues I'll just ask :)

Why are you reading this?

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.