public void func_46081_b() { field_48403_a.func_46008_aG().func_46141_a(field_48401_b, 30F, 30F); if (field_48401_b.func_48117_D_() == field_48402_c) { field_48403_a.func_48084_aL().func_48667_a(field_48401_b, 0.15F); field_48400_d = true; } if (field_48400_d && field_48403_a.func_387_e(field_48401_b) < 4D) { field_48401_b.func_48116_a(false); field_48403_a.func_48084_aL().func_48672_f(); } }
/** Updates the task */ public void updateTask() { theVillager.getLookHelper().setLookPositionWithEntity(theGolem, 30F, 30F); if (theGolem.func_48382_m_() == field_48215_c) { theVillager.getNavigator().func_48652_a(theGolem, 0.15F); field_48213_d = true; } if (field_48213_d && theVillager.getDistanceSqToEntity(theGolem) < 4D) { theGolem.func_48383_a(false); theVillager.getNavigator().clearPathEntity(); } }
/** Execute a one shot task or start executing a continuous task */ public void startExecuting() { if (targetVillager != null) { villagerObj.setPlaying(true); } playTime = 1000; }
public boolean func_46082_a() { if (field_48403_a.func_48123_at() >= 0) { return false; } if (!field_48403_a.field_615_ag.func_624_b()) { return false; } List list = field_48403_a.field_615_ag.func_657_a( net.minecraft.src.EntityIronGolem.class, field_48403_a.field_601_au.func_1177_b(6D, 2D, 6D)); if (list.size() == 0) { return false; } Iterator iterator = list.iterator(); do { if (!iterator.hasNext()) { break; } Entity entity = (Entity) iterator.next(); EntityIronGolem entityirongolem = (EntityIronGolem) entity; if (entityirongolem.func_48117_D_() <= 0) { continue; } field_48401_b = entityirongolem; break; } while (true); return field_48401_b != null; }
/** Updates the task */ public void updateTask() { playTime--; if (targetVillager != null) { if (villagerObj.getDistanceSqToEntity(targetVillager) > 4D) { villagerObj.getNavigator().tryMoveToEntityLiving(targetVillager, field_75261_c); } } else if (villagerObj.getNavigator().noPath()) { Vec3 vec3 = RandomPositionGenerator.func_75463_a(villagerObj, 16, 3); if (vec3 == null) { return; } villagerObj.getNavigator().tryMoveToXYZ(vec3.xCoord, vec3.yCoord, vec3.zCoord, field_75261_c); } }
/** Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { if (theVillager.getGrowingAge() >= 0) { return false; } if (!theVillager.worldObj.isDaytime()) { return false; } List list = theVillager.worldObj.getEntitiesWithinAABB( net.minecraft.src.EntityIronGolem.class, theVillager.boundingBox.expand(6D, 2D, 6D)); if (list.size() == 0) { return false; } Iterator iterator = list.iterator(); do { if (!iterator.hasNext()) { break; } Entity entity = (Entity) iterator.next(); EntityIronGolem entityirongolem = (EntityIronGolem) entity; if (entityirongolem.func_48382_m_() <= 0) { continue; } theGolem = entityirongolem; break; } while (true); return theGolem != null; }
/** Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { if (villagerObj.getGrowingAge() >= 0) { return false; } if (villagerObj.getRNG().nextInt(400) != 0) { return false; } List list = villagerObj.worldObj.getEntitiesWithinAABB( net.minecraft.src.EntityVillager.class, villagerObj.boundingBox.expand(6D, 3D, 6D)); double d = Double.MAX_VALUE; Iterator iterator = list.iterator(); do { if (!iterator.hasNext()) { break; } EntityVillager entityvillager = (EntityVillager) iterator.next(); if (entityvillager != villagerObj && !entityvillager.isPlaying() && entityvillager.getGrowingAge() < 0) { double d1 = entityvillager.getDistanceSqToEntity(villagerObj); if (d1 <= d) { d = d1; targetVillager = entityvillager; } } } while (true); if (targetVillager == null) { Vec3 vec3 = RandomPositionGenerator.func_75463_a(villagerObj, 16, 3); if (vec3 == null) { return false; } } return true; }
public EntityVillager b(EntityAgeable entityageable) { EntityVillager entityvillager = new EntityVillager(world); entityvillager.a(((GroupDataEntity) (null))); return entityvillager; }
/** Resets the task */ public void resetTask() { villagerObj.setPlaying(false); targetVillager = null; }
/** Resets the task */ public void resetTask() { theGolem = null; theVillager.getNavigator().clearPathEntity(); }
/** Execute a one shot task or start executing a continuous task */ public void startExecuting() { field_48215_c = theVillager.getRNG().nextInt(320); field_48213_d = false; theGolem.getNavigator().clearPathEntity(); }
public void func_46077_d() { field_48401_b = null; field_48403_a.func_48084_aL().func_48672_f(); }
public void func_46080_e() { field_48402_c = field_48403_a.func_46004_aK().nextInt(320); field_48400_d = false; field_48401_b.func_48084_aL().func_48672_f(); }