File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
sources/src/main/java/io/akarin/server/mixin Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ protected void l() throws InterruptedException {
119
119
}
120
120
121
121
for (WorldServer world : this .worlds ) {
122
- executor .take ();
122
+ if ( world . getWorld (). getKeepSpawnInMemory ()) executor .take ();
123
123
this .server .getPluginManager ().callEvent (new WorldLoadEvent (world .getWorld ()));
124
124
}
125
125
Original file line number Diff line number Diff line change 1
1
package io .akarin .server .mixin .cps ;
2
2
3
- import java .util .Iterator ;
4
-
5
3
import org .spigotmc .SlackActivityAccountant ;
6
4
import org .spongepowered .asm .mixin .Final ;
7
5
import org .spongepowered .asm .mixin .Mixin ;
@@ -64,7 +62,7 @@ public boolean unloadChunks() {
64
62
continue ;
65
63
}
66
64
67
- it .remove (); // Life is strange
65
+ it .remove ();
68
66
if (--remainingChunks <= targetSize || activityAccountant .activityTimeIsExhausted ()) break ; // more slack since the target size not work as intended
69
67
}
70
68
}
@@ -74,6 +72,14 @@ public boolean unloadChunks() {
74
72
return false ;
75
73
}
76
74
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
+
77
83
@ Overwrite
78
84
public String getName () {
79
85
return "ServerChunkCache: " + chunks .size ();
You can’t perform that action at this time.
0 commit comments