Posted August 23, 201510 yr 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?
August 23, 201510 yr 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
August 23, 201510 yr 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);
August 23, 201510 yr Author 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?
August 23, 201510 yr For creating custom dimensions, I THINK but I really have no idea, that dimensions didnt change that much so a 1.64 tutorial could help u if u know some basics that changed (like BlockPos) http://www.minecraftforge.net/forum/index.php?topic=19799.0
August 24, 201510 yr 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
August 24, 201510 yr Author 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.