Ejemplo n.º 1
0
 public virtual PathEntity getPathToEntity(Entity entity, Entity entity1, float f)
 {
     int i = MathHelper.floor_double(entity.posX);
     int j = MathHelper.floor_double(entity.posY);
     int k = MathHelper.floor_double(entity.posZ);
     var l = (int) (f + 16F);
     int i1 = i - l;
     int j1 = j - l;
     int k1 = k - l;
     int l1 = i + l;
     int i2 = j + l;
     int j2 = k + l;
     var chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2);
     return (new Pathfinder(chunkcache)).createEntityPathTo(entity, entity1, f);
 }
Ejemplo n.º 2
0
 public virtual PathEntity getEntityPathToXYZ(Entity entity, int i, int j, int k, float f)
 {
     int l = MathHelper.floor_double(entity.posX);
     int i1 = MathHelper.floor_double(entity.posY);
     int j1 = MathHelper.floor_double(entity.posZ);
     var k1 = (int) (f + 8F);
     int l1 = l - k1;
     int i2 = i1 - k1;
     int j2 = j1 - k1;
     int k2 = l + k1;
     int l2 = i1 + k1;
     int i3 = j1 + k1;
     var chunkcache = new ChunkCache(this, l1, i2, j2, k2, l2, i3);
     return (new Pathfinder(chunkcache)).createEntityPathTo(entity, i, j, k, f);
 }