Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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,

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

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

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

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.