Everything posted by minecraftkeba
-
LivingHurtEvent does not get triggered
But then I couldn´t get the entity which attacks him, or is this possible?
-
LivingHurtEvent does not get triggered
I want to send a message to the player when he gets damaged.
-
LivingHurtEvent does not get triggered
Oh ok. And whats about the idea with the packets? Do you know how to do that?
-
LivingHurtEvent does not get triggered
But why is it working on Single and not on Multiplayer then?
-
LivingHurtEvent does not get triggered
Ok I justed tested some thing: Side side = FMLCommonHandler.instance().getSide(); On Single- and Multi-Player it allways returned "CLIENT", but why can I not recive the Event on Mutliplayer then?
-
LivingHurtEvent does not get triggered
Do you know the Name of the packet and how to execute code when the client recives the code?
-
LivingHurtEvent does not get triggered
@EventHandler public void preinit(FMLPreInitializationEvent e) throws AWTException, NativeHookException { FMLCommonHandler.instance().bus().register(new HurtEvent()); MinecraftForge.EVENT_BUS.register(new HurtEvent()); } And I need it to work on Client only.
-
LivingHurtEvent does not get triggered
Ok I changed some things around: 1. I made a new Class: public class HurtEvent { @SubscribeEvent public void OnKeyInputx(LivingHurtEvent e) { System.out.println("HurtEvent"); } } 2. And I registered this class by calling: FMLCommonHandler.instance().bus().register(new HurtEvent()); 3. I also registered the Code by calling: MinecraftForge.EVENT_BUS.register(new HurtEvent()); Does anyone know why it is still not working?
-
LivingHurtEvent does not get triggered
I used: MinecraftForge.EVENT_BUS.register(new Main()); But it dosn´t work.
-
LivingHurtEvent does not get triggered
coolAlias can you send some example code, because i only need the event if a player is hurt anyway so that would be ok. Thanks
-
LivingHurtEvent does not get triggered
I added clientSide=true No change.
-
LivingHurtEvent does not get triggered
diesieben07 you are right, that is exactly what I want to do.
-
LivingHurtEvent does not get triggered
No there is no mod on the server... A player has the mod installed and he joines a normal Bukkit or Spigot server. And now the Event doesnt get triggered. I even tried: @SubscribeEvent public void OnKeyInput(LivingHurtEvent e) { System.out.println("test"); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("HurtEvent")); } And I do not get "test" in the console.
-
LivingHurtEvent does not get triggered
The one who uses the mod should see the message nobody else.
-
LivingHurtEvent does not get triggered
Ok. I registered the Event with: FMLCommonHandler.instance().bus().register(new Main()); and my new Code is: @SubscribeEvent public void OnKeyInput(LivingHurtEvent e) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("HurtEvent")); } But I still do not get the message on a Server. In Singleplayer it works.
-
LivingHurtEvent does not get triggered
But is it possible to trigger this or a similar event on Multiplayer?
-
LivingHurtEvent does not get triggered
I realiesed that the "LivingHurtEvent" does not get triggered on a Multiplayer Server. I tested this by using this Code. @SubscribeEvent public void OnKeyInput(LivingHurtEvent e) { if(Minecraft.getMinecraft().thePlayer.worldObj.isRemote) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("HurtEvent")); } } On Singleplayer I got the message, on Multiplayer I didn´t.
IPS spam blocked by CleanTalk.