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
2ad0263101
commit
86376d431e
@ -240,7 +240,7 @@ public interface Point {
|
||||
* @param point the point to compare two
|
||||
* @return true if 'this' is in the same chunk as {@code point}
|
||||
*/
|
||||
default boolean inSameChunk(@NotNull Point point) {
|
||||
default boolean sameChunk(@NotNull Point point) {
|
||||
return ChunkUtils.getChunkCoordinate(x()) == ChunkUtils.getChunkCoordinate(point.x()) &&
|
||||
ChunkUtils.getChunkCoordinate(z()) == ChunkUtils.getChunkCoordinate(point.z());
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
Check.argCondition(this.instance == instance, "Instance should be different than the current one");
|
||||
// true if the chunks need to be sent to the client, can be false if the instances share the same chunks (eg SharedInstance)
|
||||
final boolean needWorldRefresh = !InstanceUtils.areLinked(this.instance, instance) ||
|
||||
!spawnPosition.inSameChunk(this.position);
|
||||
!spawnPosition.sameChunk(this.position);
|
||||
|
||||
if (needWorldRefresh) {
|
||||
// TODO: Handle player reconnections, must be false in that case too
|
||||
|
@ -84,11 +84,6 @@ public final class ChunkUtils {
|
||||
return isLoaded(chunk);
|
||||
}
|
||||
|
||||
public static boolean same(@NotNull Chunk chunk, double x, double z) {
|
||||
return chunk.getChunkX() == getChunkCoordinate(x) &&
|
||||
chunk.getChunkZ() == getChunkCoordinate(z);
|
||||
}
|
||||
|
||||
public static Chunk retrieve(Instance instance, Chunk originChunk, double x, double z) {
|
||||
final int chunkX = getChunkCoordinate(x);
|
||||
final int chunkZ = getChunkCoordinate(z);
|
||||
|
Loading…
Reference in New Issue
Block a user