Jump to content

Tvde1

Members
  • Posts

    4
  • Joined

  • Last visited

Tvde1's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Do you know which event runs on the client where I can get notified whenever the logged in player gets hurt?
  2. This mod is running on the client. I want it to work when connected to a server.
  3. Sure, this is my `init` method: @EventHandler public void init(FMLInitializationEvent event) { // some example code logger.info("ShockMod loaded."); MinecraftForge.EVENT_BUS.register(new LivingDamageEventHandler(logger)); } The EventHandler is just @SubscribeEvent public void livingDamage(LivingDamageEvent event) { this.logger.info("Event entity id: " + event.getEntity().getEntityId() + " | My id: " + Minecraft.getMinecraft().player.getEntityId()); if (event.getEntity().getEntityId() != Minecraft.getMinecraft().player.getEntityId()) { return; } //Do stuff } And these are the flags(?) I supply to the @Mod flag. public static final String MODID = "shockmod"; public static final String NAME = "Shock Mod"; public static final String VERSION = "1.0"; public static final boolean CLIENTSIDEONLY = true; public static final boolean CANBEDEACTIVATED = true;
  4. Hiya, I made a small mod that listens for when the player gets damaged. It works perfectly in SP but when I join a server it doesn't work anymore. How do I allow it to run in multiplayer?
×
×
  • Create New...

Important Information

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