Skip to content

Commit

Permalink
Akarin 1.12.2 0.3.2 LTS Release
Browse files Browse the repository at this point in the history
  • Loading branch information
cakoyo committed Jul 7, 2018
1 parent 45d6b0c commit 5e912be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected void l() throws InterruptedException {
}

for (WorldServer world : this.worlds) {
executor.take();
if (world.getWorld().getKeepSpawnInMemory()) executor.take();
this.server.getPluginManager().callEvent(new WorldLoadEvent(world.getWorld()));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -64,7 +62,7 @@ public boolean unloadChunks() {
continue;
}

it.remove(); // Life is strange
it.remove();
if (--remainingChunks <= targetSize || activityAccountant.activityTimeIsExhausted()) break; // more slack since the target size not work as intended
}
}
Expand All @@ -74,6 +72,14 @@ public boolean unloadChunks() {
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();
Expand Down

0 comments on commit 5e912be

Please sign in to comment.