Sheep no longer spawn at world.GetHighestBlockAt

Preliminary support for cave parties!
This commit is contained in:
Gibstick 2013-11-09 06:42:54 -05:00
parent 30efceb3ca
commit 8cf1b4b98a

View File

@ -212,7 +212,6 @@ public class DiscoParty {
double y;
/* random point on circle with polar coordinates
* random number must be square rooted to obtain uniform distribution
* otherwise the sheep are biased toward the centre */
@ -220,7 +219,7 @@ public class DiscoParty {
double azimuth = r.nextDouble() * 2 * Math.PI; // radians
x += rand * Math.cos(azimuth);
z += rand * Math.sin(azimuth);
y = world.getHighestBlockYAt((int) x, (int) z);
y = this.player.getLocation().getY();
loc = new Location(world, x, y, z);
loc.setPitch(r.nextFloat() * 360 - 180);