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.

hrb1658

Members
  • Joined

  • Last visited

  1. Oh hi jabelar Thanks again for helping me, I needed to know whether it was reasonable to use lwjgl directly for this. I guess it's the only way!
  2. That would be the second function you posted Thanks, I will check it out
  3. I think I may have found a solution to my problem. In the handleKeyboardInput method of guiscreen it does a test for when you press the fullscreen button (F11) in the gui. I assume that putting my key input in this method would be the 'proper' way?
  4. Yes! But key input seems to cease to work when a GUI is open. So, say I wanted to move a button while the up key is pressed. How would I do that?
  5. But I need continuous key input, not just whether a key has been tapped.
  6. I'm going to be making an interactive game in a gui, but I need to be able to use the vanilla keybindings (like 'right', 'left' etc). I've tried detecting when one of those keys is pressed, but it's always false. Here's what I've tried: public class GuiGame extends GuiScreen { public GuiGame() { } @Override public void updateScreen() { //Always false, doesn't print if (mc.gameSettings.keyBindForward.isPressed()) { System.out.println("Forward pressed"); } } @Override public boolean doesGuiPauseGame() { return false; } @Override public void drawScreen(int arg0, int arg1, float arg2) { drawDefaultBackground(); } } Is there something wrong with what I'm doing? Please help me if you know anything, I've been searching for 2 days!
  7. Simple question: How can I initialize a custom entity's variables when it is spawned in the world (by an egg)? I tried the constructor but it overwrites variables read from nbt for some reason. I need to set an integer to something random when it is spawned into the world.
  8. Yes. Ok thanks! I always thought there would be a special method for it but I guess not!
  9. Oh, should I do that? I mean is that the 'proper' way to do that? I guess that could work though, thanks!
  10. Ok, so my question is pretty general. I have used tile entities before and know that there is a method in EntityPlayer called openGui(mod, modGuiId, world, x, y, z) for opening a tile entity gui, but how could you open one by right clicking on an entity? I have checked EntityMinecartContainer but it just uses displayGUIChest(), which I don't want because its for a specific type of gui. So how do I open a gui 'on an entity' serverside, meaning I don't have to send any packets myself?

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.