Remove unused method

This commit is contained in:
TheMode 2021-07-13 18:12:46 +02:00
parent 2ad0263101
commit 86376d431e
3 changed files with 2 additions and 7 deletions

View File

@ -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());
}

View File

@ -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

View File

@ -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);