mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Remove unused method
This commit is contained in:
parent
a0bb437c4c
commit
690c5b7614
@ -1,13 +1,12 @@
|
||||
package net.minestom.server.utils.entity;
|
||||
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.coordinate.Point;
|
||||
import net.minestom.server.coordinate.Pos;
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.instance.Chunk;
|
||||
import net.minestom.server.instance.Instance;
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.server.utils.chunk.ChunkUtils;
|
||||
import net.minestom.server.coordinate.Point;
|
||||
import net.minestom.server.coordinate.Pos;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
@ -32,23 +31,6 @@ public final class EntityUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean areVisible(@NotNull Entity ent1, @NotNull Entity ent2) {
|
||||
if (ent1.getInstance() == null || ent2.getInstance() == null)
|
||||
return false;
|
||||
if (!ent1.getInstance().equals(ent2.getInstance()))
|
||||
return false;
|
||||
|
||||
final Chunk chunk = ent1.getInstance().getChunkAt(ent1.getPosition());
|
||||
final long[] visibleChunksEntity = ChunkUtils.getChunksInRange(ent2.getPosition(), MinecraftServer.getEntityViewDistance());
|
||||
for (long visibleChunk : visibleChunksEntity) {
|
||||
final int chunkX = ChunkUtils.getChunkCoordX(visibleChunk);
|
||||
final int chunkZ = ChunkUtils.getChunkCoordZ(visibleChunk);
|
||||
if (chunk.getChunkX() == chunkX && chunk.getChunkZ() == chunkZ)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOnGround(@NotNull Entity entity) {
|
||||
final Chunk chunk = entity.getChunk();
|
||||
if (chunk == null)
|
||||
|
Loading…
Reference in New Issue
Block a user