Skip to content

Commit 5e912be

Browse files
committed
Akarin 1.12.2 0.3.2 LTS Release
1 parent 45d6b0c commit 5e912be

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

sources/src/main/java/io/akarin/server/mixin/core/MixinMinecraftServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected void l() throws InterruptedException {
119119
}
120120

121121
for (WorldServer world : this.worlds) {
122-
executor.take();
122+
if (world.getWorld().getKeepSpawnInMemory()) executor.take();
123123
this.server.getPluginManager().callEvent(new WorldLoadEvent(world.getWorld()));
124124
}
125125

sources/src/main/java/io/akarin/server/mixin/cps/MixinChunkProviderServer.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.akarin.server.mixin.cps;
22

3-
import java.util.Iterator;
4-
53
import org.spigotmc.SlackActivityAccountant;
64
import org.spongepowered.asm.mixin.Final;
75
import org.spongepowered.asm.mixin.Mixin;
@@ -64,7 +62,7 @@ public boolean unloadChunks() {
6462
continue;
6563
}
6664

67-
it.remove(); // Life is strange
65+
it.remove();
6866
if (--remainingChunks <= targetSize || activityAccountant.activityTimeIsExhausted()) break; // more slack since the target size not work as intended
6967
}
7068
}
@@ -74,6 +72,14 @@ public boolean unloadChunks() {
7472
return false;
7573
}
7674

75+
@Redirect(method = "unloadChunk", at = @At(
76+
value = "INVOKE",
77+
target = "it/unimi/dsi/fastutil/longs/Long2ObjectOpenHashMap.remove(J)Ljava/lang/Object;"
78+
))
79+
private Object remove(Long2ObjectOpenHashMap<Chunk> chunks, long chunkHash) {
80+
return null;
81+
}
82+
7783
@Overwrite
7884
public String getName() {
7985
return "ServerChunkCache: " + chunks.size();

0 commit comments

Comments
 (0)