Corrects shadow type
This commit is contained in:
@@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||
import net.minecraft.server.Chunk;
|
||||
@@ -20,7 +21,7 @@ import net.minecraft.server.WorldServer;
|
||||
@Mixin(value = ChunkProviderServer.class, remap = false)
|
||||
public abstract class MixinChunkProviderServer {
|
||||
@Shadow @Final public WorldServer world;
|
||||
@Shadow public Long2ObjectOpenHashMap<Chunk> chunks;
|
||||
@Shadow public Long2ObjectMap<Chunk> chunks;
|
||||
@Shadow(aliases = "f") @Final private ChunkTaskScheduler scheduler;
|
||||
|
||||
public void unload(Chunk chunk) {
|
||||
@@ -43,7 +44,7 @@ public abstract class MixinChunkProviderServer {
|
||||
SlackActivityAccountant activityAccountant = world.getMinecraftServer().slackActivityAccountant;
|
||||
activityAccountant.startActivity(0.5);
|
||||
|
||||
ObjectIterator<Entry<Chunk>> it = chunks.long2ObjectEntrySet().fastIterator();
|
||||
ObjectIterator<Entry<Chunk>> it = chunks.long2ObjectEntrySet().iterator();
|
||||
int remainingChunks = chunks.size();
|
||||
int targetSize = Math.min(remainingChunks - 100, (int) (remainingChunks * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.mojang.authlib.GameProfileRepository;
|
||||
import com.mojang.authlib.minecraft.MinecraftSessionService;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
|
||||
import io.akarin.api.internal.Akari;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -820,21 +822,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
// Spigot End
|
||||
CrashReport crashreport;
|
||||
|
||||
|
||||
if (throwable instanceof ReportedException) {
|
||||
crashreport = this.b(((ReportedException) throwable).a());
|
||||
} else {
|
||||
crashreport = this.b(new CrashReport("Exception in server tick loop", throwable));
|
||||
}
|
||||
|
||||
|
||||
File file = new File(new File(this.t(), "crash-reports"), "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-server.txt");
|
||||
|
||||
|
||||
if (crashreport.a(file)) {
|
||||
MinecraftServer.LOGGER.error("This crash report has been saved to: {}", file.getAbsolutePath());
|
||||
} else {
|
||||
MinecraftServer.LOGGER.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
|
||||
this.a(crashreport);
|
||||
} finally {
|
||||
try {
|
||||
|
||||
Submodule work/Paper updated: 1f3ad09e15...98b996cf40
Reference in New Issue
Block a user