package com.matt.forgehax.mods.services;

import com.matt.forgehax.events.LocalPlayerUpdateEvent;
import com.matt.forgehax.util.mod.ServiceMod;
import com.matt.forgehax.util.mod.loader.RegisterMod;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

/** Created on 6/14/2017 by fr1kin */
@RegisterMod
public class LocalPlayerUpdateEventService extends ServiceMod {
  public LocalPlayerUpdateEventService() {
    super("LocalPlayerUpdateEventService");
  }

  @SubscribeEvent
  public void onUpdate(LivingEvent.LivingUpdateEvent event) {
    if (MC.world != null && event.getEntityLiving().equals(MC.player)) {
      Event ev = new LocalPlayerUpdateEvent(event.getEntityLiving());
      MinecraftForge.EVENT_BUS.post(ev);
      event.setCanceled(ev.isCanceled());
    }
  }
}

@@ -35,16 +35,121 @@
 vices;%0A%0A
+import static com.matt.forgehax.Helper.getLocalPlayer;%0Aimport static com.matt.forgehax.Helper.getWorld;%0A%0A
 import c
@@ -827,24 +827,26 @@
 if (
-MC.w
+getW
 orld
+()
  != null
  && 
@@ -841,16 +841,56 @@
  != null
+%0A        && !getWorld().isRemote%0A       
  && even
@@ -920,17 +920,24 @@
 als(
-MC.p
+getLocalP
 layer
+()
 )) %7B

Check if world is remote so event isn't fired for single player entity tick