Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.2] Teleport the player to precise coordinates


laserflip
 Share

Recommended Posts

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,

Link to comment
Share on other sites

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.

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.