mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Make #getNearbyBlocks
static
This commit is contained in:
parent
3f01d63913
commit
17f9eb45ca
@ -1,8 +1,8 @@
|
|||||||
package net.minestom.server.entity.ai.goal;
|
package net.minestom.server.entity.ai.goal;
|
||||||
|
|
||||||
|
import net.minestom.server.coordinate.Vec;
|
||||||
import net.minestom.server.entity.EntityCreature;
|
import net.minestom.server.entity.EntityCreature;
|
||||||
import net.minestom.server.entity.ai.GoalSelector;
|
import net.minestom.server.entity.ai.GoalSelector;
|
||||||
import net.minestom.server.coordinate.Vec;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -59,8 +59,7 @@ public class RandomStrollGoal extends GoalSelector {
|
|||||||
return radius;
|
return radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
private static @NotNull List<Vec> getNearbyBlocks(int radius) {
|
||||||
private List<Vec> getNearbyBlocks(int radius) {
|
|
||||||
List<Vec> blocks = new ArrayList<>();
|
List<Vec> blocks = new ArrayList<>();
|
||||||
for (int x = -radius; x <= radius; x++) {
|
for (int x = -radius; x <= radius; x++) {
|
||||||
for (int y = -radius; y <= radius; y++) {
|
for (int y = -radius; y <= radius; y++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user