PaperMC/nms-patches/ChunkTaskScheduler.patch

25 lines
1.1 KiB
Diff
Raw Normal View History

2018-07-25 11:32:06 +02:00
--- a/net/minecraft/server/ChunkTaskScheduler.java
+++ b/net/minecraft/server/ChunkTaskScheduler.java
2018-08-26 04:00:00 +02:00
@@ -20,7 +20,7 @@
private final ChunkGenerator<?> d;
private final IChunkLoader e;
private final IAsyncTaskHandler f;
- private final Long2ObjectMap<Scheduler.a> progressCache = new ExpiringMap(8192, 5000) {
+ private final Long2ObjectMap<Scheduler.a> progressCache = new ExpiringMap<Scheduler.a>(8192, 5000) { // CraftBukkit - decompile error
protected boolean a(Scheduler.a scheduler_a) {
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
@@ -40,6 +40,12 @@
2018-07-25 11:32:06 +02:00
this.f = iasynctaskhandler;
}
+ // CraftBukkit start
+ public void forcePolluteCache(ChunkCoordIntPair chunkcoordintpair) {
2018-08-26 04:00:00 +02:00
+ this.progressCache.put(chunkcoordintpair.a(), new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a), ChunkStatus.EMPTY));
2018-07-25 11:32:06 +02:00
+ }
+ // CraftBukkit end
+
2018-08-26 04:00:00 +02:00
@Nullable
protected Scheduler.a a(ChunkCoordIntPair chunkcoordintpair, boolean flag) {
IChunkLoader ichunkloader = this.e;