MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / random

Method random

src/main/java/com/volmit/adapt/util/Area.java:246–253  ·  view source on GitHub ↗

Pick a random location in this radius

()

Source from the content-addressed store, hash-verified

244 * Pick a random location in this radius
245 */
246 public Location random() {
247 Random r = new Random();
248 double x = radius * ((r.nextDouble() - 0.5) * 2);
249 double y = radius * ((r.nextDouble() - 0.5) * 2);
250 double z = radius * ((r.nextDouble() - 0.5) * 2);
251
252 return location.clone().add(x, y, z);
253 }
254}

Callers 11

onMethod · 0.80
snatchMethod · 0.80
onMethod · 0.80
onTickMethod · 0.80
onMethod · 0.80
randomColorMethod · 0.80
rMethod · 0.80
irandMethod · 0.80
frandMethod · 0.80
drandMethod · 0.80
startSubmittingMethod · 0.80

Calls 2

addMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected