mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-13 11:41:52 +01:00
Misc cleanup
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
ab982d0214
commit
0366027c5d
@ -8,7 +8,6 @@ import net.minestom.server.permission.Permission;
|
|||||||
import net.minestom.server.tag.Tag;
|
import net.minestom.server.tag.Tag;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
|
||||||
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package net.minestom.server.command;
|
package net.minestom.server.command;
|
||||||
|
|
||||||
import net.minestom.server.command.builder.CommandContext;
|
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
|
import net.minestom.server.command.builder.CommandContext;
|
||||||
import net.minestom.server.permission.Permission;
|
import net.minestom.server.permission.Permission;
|
||||||
import net.minestom.server.tag.Tag;
|
import net.minestom.server.tag.Tag;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
|
||||||
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -9,7 +9,6 @@ import net.minestom.server.tag.Tag;
|
|||||||
import net.minestom.server.tag.TagHandler;
|
import net.minestom.server.tag.TagHandler;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
|
||||||
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
import org.jglrxavpok.hephaistos.nbt.mutable.MutableNBTCompound;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package net.minestom.server.instance;
|
package net.minestom.server.instance;
|
||||||
|
|
||||||
import com.extollit.gaming.ai.path.model.ColumnarOcclusionFieldList;
|
import com.extollit.gaming.ai.path.model.ColumnarOcclusionFieldList;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import net.minestom.server.MinecraftServer;
|
import net.minestom.server.MinecraftServer;
|
||||||
import net.minestom.server.coordinate.Point;
|
import net.minestom.server.coordinate.Point;
|
||||||
|
@ -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) {
|
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)) {
|
for (List<T> entities : references(chunkX, chunkZ, target)) {
|
||||||
if (entities.isEmpty()) continue;
|
if (entities.isEmpty()) continue;
|
||||||
for (Entity entity : entities) query.consume((T) entity);
|
for (T entity : entities) query.consume(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.BinaryReader;
|
||||||
import net.minestom.server.utils.binary.BinaryWriter;
|
import net.minestom.server.utils.binary.BinaryWriter;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBT;
|
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package net.minestom.server.terminal;
|
package net.minestom.server.terminal;
|
||||||
|
|
||||||
import net.minestom.server.MinecraftServer;
|
import net.minestom.server.MinecraftServer;
|
||||||
import net.minestom.server.command.CommandManager;
|
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jline.reader.EndOfFileException;
|
import org.jline.reader.EndOfFileException;
|
||||||
import org.jline.reader.LineReader;
|
import org.jline.reader.LineReader;
|
||||||
|
@ -26,7 +26,6 @@ public final class ViewEngine {
|
|||||||
private final Set<Player> manualViewers = ConcurrentHashMap.newKeySet();
|
private final Set<Player> manualViewers = ConcurrentHashMap.newKeySet();
|
||||||
|
|
||||||
private EntityTracker tracker;
|
private EntityTracker tracker;
|
||||||
private Point lastTrackingPoint;
|
|
||||||
|
|
||||||
// Decide if this entity should be viewable to X players
|
// Decide if this entity should be viewable to X players
|
||||||
public final Option<Player> viewableOption;
|
public final Option<Player> viewableOption;
|
||||||
@ -55,7 +54,6 @@ public final class ViewEngine {
|
|||||||
public void updateTracker(@NotNull Point point, @Nullable EntityTracker tracker) {
|
public void updateTracker(@NotNull Point point, @Nullable EntityTracker tracker) {
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
this.tracker = tracker;
|
this.tracker = tracker;
|
||||||
this.lastTrackingPoint = point;
|
|
||||||
if (tracker != null) {
|
if (tracker != null) {
|
||||||
this.viewableOption.references = tracker.references(point, EntityTracker.Target.PLAYERS);
|
this.viewableOption.references = tracker.references(point, EntityTracker.Target.PLAYERS);
|
||||||
this.viewerOption.references = tracker.references(point, EntityTracker.Target.ENTITIES);
|
this.viewerOption.references = tracker.references(point, EntityTracker.Target.ENTITIES);
|
||||||
|
@ -5,13 +5,11 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBT;
|
import org.jglrxavpok.hephaistos.nbt.NBT;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTList;
|
|
||||||
import org.jglrxavpok.hephaistos.nbt.NBTType;
|
import org.jglrxavpok.hephaistos.nbt.NBTType;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
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.
|
* Allows servers to register custom dimensions. Also used during player login to send the list of all existing dimensions.
|
||||||
|
Loading…
Reference in New Issue
Block a user