Skip to content

Commit f0464ed

Browse files
committed
don't load chunk when getting random location
1 parent 6912777 commit f0464ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/me/hsgamer/gamesinthebox/game/feature/BoundingOffsetFeature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Location getRandomLocation(boolean normalize) {
9898
double z = ThreadLocalRandom.current().nextDouble(minZ, maxZ + 1);
9999
Location location = new Location(world, x, y, z);
100100

101-
return normalize ? location.getBlock().getLocation() : location;
101+
return normalize ? new Location(location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ()) : location;
102102
}
103103

104104
/**

0 commit comments

Comments
 (0)