Jump to content

Scholler

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Scholler

  1. no I have never said I don't even know what a static method is I said you shouldn't think that I don't know what a static method is I see you quote the part where I said what you shouldn't think about me, no problem. I still haven't figured it out, nothing worked, so at this point I'm just kinda searching the internet, and I'm spending less time on coding this mod
  2. OK. Gonna test.
  3. lmao. I see you dont get it
  4. I'm trying to get this to work, been trying for more than one day now, and I'm not asking for any code. Probably you think I'm stupid, well, I'm not. Actually you still didn't answer my question, where I asked if this event should get called when I get hit in game, so I take knockback, because I don't see why wouldn't this work. If you want the code, there: https://pastebin.com/EuZkaUUe. AND if you really want to reply, you should help, not insult me or think that I'm so stupid I don't even know what's static method, or if you can't reply normally, then just don't, dear Forum Team member.
  5. Not working.
  6. Where am I supposed to put ,,static'' ?
  7. Can someone confirm this?
  8. Not working.
  9. OK I GET IT
  10. Didn't test it yet, but why wouldn't this event bus work? ._.
  11. So what should I use? Basically every other events work perfectly in that class, except for that one.
  12. https://pastebin.com/5VUf4rXC I hope you can see how it should be working, but its not. Also, idk debug.log, but it just doesn't do the System.out.println() at all. Nothing. And in this thread again: This event is supposed to call when I get knockback, right? So e.g a player punch me?
  13. Can't find a way to reopen thread. This problem still persists, using 1.15.2!
  14. So KeyBinding is like keyBindings[0] = new KeyBinding("Blabla..", KeyValue, "blabla"); It was working in 1.12 but there is no org.lwjgl.input.Keyboard to use in 1.15 forge
  15. Using 1.15.2 forge, how would I detect if a key (e.g R) was pressed? I tried GuiScreenEvent.KeyboardKeyPressedEvent and InputEvent.KeyInputEvent, they just fire twice and when I hold the key it fires lots of times.
  16. Actually just a simple System.out.println(). Lets make it clear, this should fire when e.g I get hit and I take knockback, right?
  17. public void init(FMLInitializationEvent event) is where I register with MinecraftForge.EVENT_BUS.register(new MyForgeEventHandler()); public class MyForgeEventHandler { BUNCH OF EVENTS WHICH ARE WORKING @SubscribeEvent public void onKb(LivingKnockBackEvent e) { this one not
  18. @SubscribeEvent public void onKb(LivingKnockBackEvent e) { System.out.println("event called atleast");
  19. Hi! Can someone tell me why is the LivingKnockBackEvent not calling? Everything else is working but that one is not. I checked with a simple System.out.println() to see if its working.
  20. Oh thanks, I found it, and it's working now! ?
  21. public class MyForgeEventHandler { @SubscribeEvent public void onChat(ServerChatEvent e) { mc.player.sendMessage(new TextComponentString("Hello there!")); System.out.println("MSG DETECTED"); if (e.getMessage().equals(".help")) { e.setCanceled(true); mc.player.sendMessage(new TextComponentString("Hello there!")); } } } Still not working. What am I doing wrong?
  22. This could be the thing I'm missing.. How do I register it?
  23. Hi! I created my first Forge mod, but it doesn't seem to be working. I don't really know what I was supposed to do, honestly this seems a bit easy, that's why I think I'm doing something completely wrong. So there's this ExampleMod.java file, which I edited, and first added a ClientChatEvent to detect a message and cancel it, also write something to the player, and then that didn't work so I tried ServerChatEvent, still doesn't work. These are the first 4 lines of the code: @EventHandler public void onChat(ServerChatEvent e) { mc.player.sendMessage(new TextComponentString("Hello there!")); System.out.println("MSG DETECTED"); It just doesn't do anything. Help is appreciated !
×
×
  • Create New...

Important Information

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