Akarin 1.12.2 0.3.2 LTS Release

This commit is contained in:
Sotr
2018-07-07 15:58:26 +08:00
parent 45d6b0c072
commit 5e912befc0
2 changed files with 10 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ public abstract class MixinMinecraftServer {
}
for (WorldServer world : this.worlds) {
executor.take();
if (world.getWorld().getKeepSpawnInMemory()) executor.take();
this.server.getPluginManager().callEvent(new WorldLoadEvent(world.getWorld()));
}

View File

@@ -1,7 +1,5 @@
package io.akarin.server.mixin.cps;
import java.util.Iterator;
import org.spigotmc.SlackActivityAccountant;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
@@ -64,7 +62,7 @@ public abstract class MixinChunkProviderServer {
continue;
}
it.remove(); // Life is strange
it.remove();
if (--remainingChunks <= targetSize || activityAccountant.activityTimeIsExhausted()) break; // more slack since the target size not work as intended
}
}
@@ -74,6 +72,14 @@ public abstract class MixinChunkProviderServer {
return false;
}
@Redirect(method = "unloadChunk", at = @At(
value = "INVOKE",
target = "it/unimi/dsi/fastutil/longs/Long2ObjectOpenHashMap.remove(J)Ljava/lang/Object;"
))
private Object remove(Long2ObjectOpenHashMap<Chunk> chunks, long chunkHash) {
return null;
}
@Overwrite
public String getName() {
return "ServerChunkCache: " + chunks.size();