Misc cleanup

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2022-01-12 22:15:50 +01:00
parent ab982d0214
commit 0366027c5d
9 changed files with 2 additions and 12 deletions

View File

@ -8,7 +8,6 @@ import net.minestom.server.permission.Permission;
import net.minestom.server.tag.Tag;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,12 +1,11 @@
package net.minestom.server.command;
import net.minestom.server.command.builder.CommandContext;
import net.kyori.adventure.audience.Audience;
import net.minestom.server.command.builder.CommandContext;
import net.minestom.server.permission.Permission;
import net.minestom.server.tag.Tag;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
import java.util.Collections;

View File

@ -9,7 +9,6 @@ import net.minestom.server.tag.Tag;
import net.minestom.server.tag.TagHandler;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
/**

View File

@ -1,7 +1,6 @@
package net.minestom.server.instance;
import com.extollit.gaming.ai.path.model.ColumnarOcclusionFieldList;
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import net.minestom.server.MinecraftServer;
import net.minestom.server.coordinate.Point;

View File

@ -127,7 +127,7 @@ final class EntityTrackerImpl implements EntityTracker {
public <T extends Entity> void visibleEntities(int chunkX, int chunkZ, @NotNull Target<T> target, @NotNull Query<T> query) {
for (List<T> entities : references(chunkX, chunkZ, target)) {
if (entities.isEmpty()) continue;
for (Entity entity : entities) query.consume((T) entity);
for (T entity : entities) query.consume(entity);
}
}

View File

@ -6,7 +6,6 @@ import net.minestom.server.network.packet.server.ServerPacketIdentifier;
import net.minestom.server.utils.binary.BinaryReader;
import net.minestom.server.utils.binary.BinaryWriter;
import org.jetbrains.annotations.NotNull;
import org.jglrxavpok.hephaistos.nbt.NBT;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import java.util.List;

View File

@ -1,7 +1,6 @@
package net.minestom.server.terminal;
import net.minestom.server.MinecraftServer;
import net.minestom.server.command.CommandManager;
import org.jetbrains.annotations.ApiStatus;
import org.jline.reader.EndOfFileException;
import org.jline.reader.LineReader;

View File

@ -26,7 +26,6 @@ public final class ViewEngine {
private final Set<Player> manualViewers = ConcurrentHashMap.newKeySet();
private EntityTracker tracker;
private Point lastTrackingPoint;
// Decide if this entity should be viewable to X players
public final Option<Player> viewableOption;
@ -55,7 +54,6 @@ public final class ViewEngine {
public void updateTracker(@NotNull Point point, @Nullable EntityTracker tracker) {
synchronized (mutex) {
this.tracker = tracker;
this.lastTrackingPoint = point;
if (tracker != null) {
this.viewableOption.references = tracker.references(point, EntityTracker.Target.PLAYERS);
this.viewerOption.references = tracker.references(point, EntityTracker.Target.ENTITIES);

View File

@ -5,13 +5,11 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBT;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.NBTList;
import org.jglrxavpok.hephaistos.nbt.NBTType;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
/**
* Allows servers to register custom dimensions. Also used during player login to send the list of all existing dimensions.