Skip to content

Instantly share code, notes, and snippets.

:atom:
Powered by 5 Hour Energy

Daniel Ennis aikar

:atom:
Powered by 5 Hour Energy
View GitHub Profile
View Chunk.java
// Paper start
Chunk currentChunk = entity.currentChunk != null ? entity.currentChunk.get() : null;
if (currentChunk == this) entity.setCurrentChunk(null);
if (this.entitySlices[i].remove(entity)) {
if (entitySlices[i] == entity.entitySlice) {
entity.entitySlice = null;
} else if (entity.entitySlice != null && entity.entitySlice.contains(entity)) {
String thisChunkStr = world.getWorld().getName() + ":" + this.loc;
ChunkEntitySlice entitySlice = entity.entitySlice;
View noclone.diff
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index b9d5844520..9980e4c277 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -500,7 +500,7 @@ public final class MCUtil {
WorldServer world = ((org.bukkit.craftbukkit.CraftWorld)bukkitWorld).getHandle();
PlayerChunkMap chunkMap = world.getChunkProvider().playerChunkMap;
- Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks = chunkMap.visibleChunks;
+ Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks = chunkMap.getVisibleChunks();
View 0001-Improve-behavior-of-main-thread-blocking-chunk-load-.patch
From 414cb1c38d347adcf66a4b4bdfb1a150f647a6a8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 27 Mar 2020 20:57:32 -0400
Subject: [PATCH] Improve behavior of main thread blocking chunk load/gens
---
.../paper/io/PrioritizedTaskQueue.java | 13 ++--
.../paper/io/chunk/ChunkTaskManager.java | 59 +++++++++++---
.../minecraft/server/ChunkProviderServer.java | 14 ++++
.../net/minecraft/server/ChunkStatus.java | 3 +
View x.diff
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index b6239e5fa6..d5339cea9a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -46,14 +46,31 @@ public class PlayerChunk {
// Paper start
int chunkPriority = -1;
int lastChunkPriority = -1;
+ boolean isUrgent = false;
+ java.util.List<PlayerChunk> urgentNeighbors = new java.util.ArrayList<>();
View emclag.js
#!/usr/bin/env _node
var Rcon = require('rcon');
var exec = require('child_process').exec;
var rconPass = require('fs').readFileSync(__dirname + '/rconpass').toString();
var servers = {};
[
"smp1", "smp2", "smp3",
"smp4", "smp5", "smp6",
"smp7", "smp8", "smp9",
View mainload.diff
commit 26d9deef41eb09dd70394e15124c26f2c546252f
Author: Aikar <aikar@aikar.co>
Date: Fri Mar 27 20:57:32 2020 -0400
Improve behavior of main thread blocking chunk load/gens
diff --git a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
index 78bd238f4c..f28e563a43 100644
--- a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
+++ b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
View asyncfix.patch
diff --git a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
index 78bd238f4c..24d4902929 100644
--- a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
+++ b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
@@ -72,7 +72,10 @@ public class PrioritizedTaskQueue<T extends PrioritizedTaskQueue.PrioritizedTask
* This can also be thrown if the queue has shutdown.
*/
public void add(final T task) throws IllegalStateException {
- task.onQueue(this);
+ add(task, false);
View GCMonitorTask.java
/*
* Copyright (c) 2017. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.systems.tasks;
import com.empireminecraft.util.Log;
View GCMonitorTask.java
/*
* Copyright (c) 2017. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.systems.tasks;
import com.empireminecraft.util.Log;
View emclag.js
#!/usr/bin/env _node
var Rcon = require('rcon');
var exec = require('child_process').exec;
var rconPass = require('fs').readFileSync(__dirname + '/rconpass').toString();
var servers = {};
[
"smp1", "smp2", "smp3",
"smp4", "smp5", "smp6",
"smp7", "smp8", "smp9",
You can’t perform that action at this time.