Program: 12769
Project: 12769
Buggy source:
@SubscribeEvent public void onEntityJoinWorld(EntityJoinWorldEvent event){
  if (!event.entity.worldObj.isRemote && event.entity instanceof IAdjustableLevel) {
    IAdjustableLevel e=(IAdjustableLevel)event.entity;
    if (e.getLevel() == 0) {
      Difficulty d=DifficultyCalculator.getLocalDifficulty(event.world,event.entity.posX,event.entity.posZ,10);
      if (d.isZero()) {
        d=DifficultyCalculator.getWorldDifficulty(event.entity.worldObj);
      }
      int l=e.suggestLevel(d);
      if (l > e.getMaxLevel()) {
        l=e.getMaxLevel();
      }
 else       if (l < 1) {
        if (event.entity.worldObj.rand.nextBoolean()) {
          event.setCanceled(true);
        }
        l=1;
      }
      e.setLevel(l);
    }
  }
  if (event.world.isRemote) {
    if (event.entity instanceof ISyncable || event.entity instanceof EntityCreature) {
      VampirismMod.modChannel.sendToServer(new RequestEntityUpdatePacket(event.entity));
    }
  }
  if (event.entity instanceof EntityVampireHunter) {
    EntityVampireHunter e=(EntityVampireHunter)event.entity;
    if (e.isLookingForHome() == false)     return;
    Village v=event.world.villageCollectionObj.findNearestVillage(MathHelper.floor_double(e.posX),MathHelper.floor_double(e.posY),MathHelper.floor_double(e.posZ),20);
    if (v != null) {
      int r=v.getVillageRadius();
      AxisAlignedBB box=AxisAlignedBB.getBoundingBox(v.getCenter().posX - r,0,v.getCenter().posZ - r,v.getCenter().posX + r,event.world.getActualHeight(),v.getCenter().posZ + r);
      ChunkCoordinates cc=v.getCenter();
      e.setHomeArea(cc.posX,cc.posY,cc.posZ,r);
    }
  }
 else   if (event.entity instanceof EntityIronGolem) {
    EntityIronGolem golem=(EntityIronGolem)event.entity;
    EntityAITasks targetTasks=golem.targetTasks;
    if (targetTasks == null) {
      Logger.w("String_Node_Str","String_Node_Str");
    }
 else {
      for (      Object o : targetTasks.taskEntries) {
        EntityAIBase t=((EntityAITasks.EntityAITaskEntry)o).action;
        if (t instanceof EntityAINearestAttackableTarget) {
          targetTasks.removeTask(t);
          targetTasks.addTask(3,new EntityAINearestAttackableTarget(golem,EntityLiving.class,0,false,true,new IEntitySelector(){
            @Override public boolean isEntityApplicable(            Entity entity){
              if (entity instanceof IMob && !(entity instanceof EntityVampireHunter)) {
                return true;
              }
              return false;
            }
          }
));
          break;
        }
      }
    }
  }
 else   if (event.entity instanceof EntityCreeper) {
    EntityCreeper creeper=(EntityCreeper)event.entity;
    EntityAITasks tasks=creeper.tasks;
    if (tasks == null) {
      Logger.w("String_Node_Str","String_Node_Str");
    }
 else {
      tasks.addTask(3,new EntityAIAvoidVampirePlayer(creeper,12.0F,1.0D,1.2D,BALANCE.VAMPIRE_PLAYER_CREEPER_AVOID_LEVEL));
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onEntityJoinWorld(EntityJoinWorldEvent event){
  if (!event.entity.worldObj.isRemote && event.entity instanceof IAdjustableLevel) {
    IAdjustableLevel e=(IAdjustableLevel)event.entity;
    if (e.getLevel() == 0) {
      Difficulty d=DifficultyCalculator.getLocalDifficulty(event.world,event.entity.posX,event.entity.posZ,10);
      if (d.isZero()) {
        d=DifficultyCalculator.getWorldDifficulty(event.entity.worldObj);
      }
      int l=e.suggestLevel(d);
      if (l > e.getMaxLevel()) {
        l=e.getMaxLevel();
      }
 else       if (l < 1) {
        if (event.entity.worldObj.rand.nextBoolean()) {
          event.setCanceled(true);
        }
        l=1;
      }
      e.setLevel(l);
    }
  }
  if (event.world.isRemote) {
    if (event.entity instanceof ISyncable || event.entity instanceof EntityCreature) {
      VampirismMod.modChannel.sendToServer(new RequestEntityUpdatePacket(event.entity));
    }
  }
  if (event.entity instanceof EntityVampireHunter) {
    EntityVampireHunter e=(EntityVampireHunter)event.entity;
    if (e.isLookingForHome() == false)     return;
    if (event.world.villageCollectionObj != null) {
      Village v=event.world.villageCollectionObj.findNearestVillage(MathHelper.floor_double(e.posX),MathHelper.floor_double(e.posY),MathHelper.floor_double(e.posZ),20);
      if (v != null) {
        int r=v.getVillageRadius();
        AxisAlignedBB box=AxisAlignedBB.getBoundingBox(v.getCenter().posX - r,0,v.getCenter().posZ - r,v.getCenter().posX + r,event.world.getActualHeight(),v.getCenter().posZ + r);
        ChunkCoordinates cc=v.getCenter();
        e.setHomeArea(cc.posX,cc.posY,cc.posZ,r);
      }
    }
  }
 else   if (event.entity instanceof EntityIronGolem) {
    EntityIronGolem golem=(EntityIronGolem)event.entity;
    EntityAITasks targetTasks=golem.targetTasks;
    if (targetTasks == null) {
      Logger.w("String_Node_Str","String_Node_Str");
    }
 else {
      for (      Object o : targetTasks.taskEntries) {
        EntityAIBase t=((EntityAITasks.EntityAITaskEntry)o).action;
        if (t instanceof EntityAINearestAttackableTarget) {
          targetTasks.removeTask(t);
          targetTasks.addTask(3,new EntityAINearestAttackableTarget(golem,EntityLiving.class,0,false,true,new IEntitySelector(){
            @Override public boolean isEntityApplicable(            Entity entity){
              if (entity instanceof IMob && !(entity instanceof EntityVampireHunter)) {
                return true;
              }
              return false;
            }
          }
));
          break;
        }
      }
    }
  }
 else   if (event.entity instanceof EntityCreeper) {
    EntityCreeper creeper=(EntityCreeper)event.entity;
    EntityAITasks tasks=creeper.tasks;
    if (tasks == null) {
      Logger.w("String_Node_Str","String_Node_Str");
    }
 else {
      tasks.addTask(3,new EntityAIAvoidVampirePlayer(creeper,12.0F,1.0D,1.2D,BALANCE.VAMPIRE_PLAYER_CREEPER_AVOID_LEVEL));
    }
  }
}