Skip to content

Instantly share code, notes, and snippets.

@EricZeiberg
Created January 13, 2014 21:02
Show Gist options
  • Save EricZeiberg/8408082 to your computer and use it in GitHub Desktop.
Save EricZeiberg/8408082 to your computer and use it in GitHub Desktop.
Spawn Algorithm
Location location = p.getLocation();
for(int i = 0 ; i < 20 ; i++) {
int max = 10;
double x = Math.random() * (max * 2) - max;
double y = 0;
double z = Math.random() * (max * 2) - max;
location.add(x,y,z);
p.teleport(location);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment