Organise imports

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-03-09 08:47:33 +11:00
parent 1ae7bcc4d0
commit b2efd58164
188 changed files with 879 additions and 825 deletions

View File

@@ -1,14 +1,15 @@
--- a/net/minecraft/server/PlayerChunkMap.java
+++ b/net/minecraft/server/PlayerChunkMap.java
@@ -44,6 +44,7 @@
import org.apache.commons.lang3.mutable.MutableBoolean;
@@ -45,6 +45,8 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.bukkit.entity.Player; // CraftBukkit
+import org.bukkit.entity.Player; // CraftBukkit
+
public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -75,6 +76,31 @@
private static final Logger LOGGER = LogManager.getLogger();
@@ -75,6 +77,31 @@
private final Queue<Runnable> A;
private int viewDistance;
@@ -40,7 +41,7 @@
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag);
this.visibleChunks = this.updatingChunks.clone();
@@ -195,9 +221,12 @@
@@ -195,9 +222,12 @@
return completablefuture1.thenApply((list1) -> {
List<IChunkAccess> list2 = Lists.newArrayList();
@@ -55,7 +56,7 @@
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
Optional<IChunkAccess> optional = either.left();
@@ -300,7 +329,7 @@
@@ -300,7 +330,7 @@
PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName());
} else {
this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> {
@@ -64,7 +65,7 @@
if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) {
this.saveChunk(ichunkaccess);
@@ -311,7 +340,6 @@
@@ -311,7 +341,6 @@
}
}
@@ -72,7 +73,7 @@
protected void unloadChunks(BooleanSupplier booleansupplier) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
@@ -350,7 +378,7 @@
@@ -350,7 +379,7 @@
private void a(long i, PlayerChunk playerchunk) {
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkSave();
@@ -81,7 +82,7 @@
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkSave();
if (completablefuture1 != completablefuture) {
@@ -572,8 +600,15 @@
@@ -572,8 +601,15 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -98,7 +99,7 @@
if (list == null) {
list = Lists.newArrayList(new Entity[]{entity});
} else {
@@ -784,7 +819,8 @@
@@ -784,7 +820,8 @@
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
});
@@ -108,7 +109,7 @@
return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum();
}).orElse(0), optional1.map((chunk) -> {
return chunk.getTileEntities().size();
@@ -795,7 +831,7 @@
@@ -795,7 +832,7 @@
private static String a(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
try {
@@ -117,7 +118,7 @@
return either != null ? (String) either.map((chunk) -> {
return "done";
@@ -813,7 +849,7 @@
@@ -813,7 +850,7 @@
private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException {
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
@@ -126,7 +127,7 @@
}
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
@@ -1145,7 +1181,7 @@
@@ -1145,7 +1182,7 @@
public final Set<EntityPlayer> trackedPlayers = Sets.newHashSet();
public EntityTracker(Entity entity, int i, int j, boolean flag) {
@@ -135,7 +136,7 @@
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1198,7 +1234,7 @@
@@ -1198,7 +1235,7 @@
public void updatePlayer(EntityPlayer entityplayer) {
if (entityplayer != this.tracker) {
@@ -144,7 +145,7 @@
int i = Math.min(this.b(), (PlayerChunkMap.this.viewDistance - 1) * 16);
boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer);
@@ -1214,6 +1250,17 @@
@@ -1214,6 +1251,17 @@
}
}