minecraftkeba
Members-
Posts
17 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
minecraftkeba's Achievements
Tree Puncher (2/8)
0
Reputation
-
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
But then I couldn´t get the entity which attacks him, or is this possible? -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
I want to send a message to the player when he gets damaged. -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
Oh ok. And whats about the idea with the packets? Do you know how to do that? -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
But why is it working on Single and not on Multiplayer then? -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
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
minecraftkeba replied to minecraftkeba's topic in Modder Support
Do you know the Name of the packet and how to execute code when the client recives the code? -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
@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
minecraftkeba replied to minecraftkeba's topic in Modder Support
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
minecraftkeba replied to minecraftkeba's topic in Modder Support
I used: MinecraftForge.EVENT_BUS.register(new Main()); But it dosn´t work. -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
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
minecraftkeba replied to minecraftkeba's topic in Modder Support
I added clientSide=true No change. -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
diesieben07 you are right, that is exactly what I want to do. -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
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
minecraftkeba replied to minecraftkeba's topic in Modder Support
The one who uses the mod should see the message nobody else. -
LivingHurtEvent does not get triggered
minecraftkeba replied to minecraftkeba's topic in Modder Support
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.