Everything posted by hrb1658
-
[1.7.10] How do I use key bindings in a GUI?
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!
-
[1.7.10] How do I use key bindings in a GUI?
That would be the second function you posted Thanks, I will check it out
-
[1.7.10] How do I use key bindings in a GUI?
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?
-
[1.7.10] How do I use key bindings in a GUI?
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?
-
[1.7.10] How do I use key bindings in a GUI?
But I need continuous key input, not just whether a key has been tapped.
-
[1.7.10] How do I use key bindings in a GUI?
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!
-
How to initialize an entity on spawn?
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.
-
How to open an inventory on entity interaction?
Yes. Ok thanks! I always thought there would be a special method for it but I guess not!
-
How to open an inventory on entity interaction?
Oh, should I do that? I mean is that the 'proper' way to do that? I guess that could work though, thanks!
-
How to open an inventory on entity interaction?
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?
IPS spam blocked by CleanTalk.