Posted June 12, 201510 yr Hello everyone. I would like to make an teleportation system. When the player press J, an GUI appear and he have to choose the x, y, z coordinates. When he click on the button " Teleport " or whatever, he's teleport to the chosen destination. But I have no idea for make this kind of GUI and for the teleportation system. I have already this code for my KeyBind (into my ClientProxy) : private static KeyBinding keyBindTest; public ClientProxy() { FMLCommonHandler.instance().bus().register(this); keyBindTest = new KeyBinding("modtest.key", Keyboard.KEY_J, "key.categories.gameplay"); ClientRegistry.registerKeyBinding(keyBindTest); } @SubscribeEvent public void onEvent(KeyInputEvent event) { if(keyBindTest.isPressed()) { keyTestTyped(); } } private void keyTestTyped() { Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText("test")); } If you have any ideas... Best regards,
June 12, 201510 yr Author First of all, why are you working on 1.7.2? Update. Then, what exactly is your problem? I mean, nobody is going to just write the GUI for you and you have not even started on it... I'll update on 1.7.10 but I won't work on 1.8. Then, when I asked someone for a code? " If you have any ideas... " It seems to me that ideas an code are not the same.
June 12, 201510 yr I am pretty sure you will need to send a packet to the server when you click the teleport button. http://www.minecraftforge.net/forum/index.php/topic,20135.0.html
June 14, 201510 yr Author I am pretty sure you will need to send a packet to the server when you click the teleport button. http://www.minecraftforge.net/forum/index.php/topic,20135.0.html Yes, but how can I do this teleportation system (the coordinates input)
June 14, 201510 yr You could add three Textfields to unter coordinates and a confirm button. After pressing The confirm button send a package with The coordinates to The Server which will handle The teleport
June 14, 201510 yr Author You could add three Textfields to unter coordinates and a confirm button. After pressing The confirm button send a package with The coordinates to The Server which will handle The teleport Thanks I'll try your method.
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.