mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 2609a118 Updated Upstream (Bukkit/CraftBukkit) Tuinity Changes: 0850468 Properly ignite entities that stand in fire
This commit is contained in:
@@ -1271,7 +1271,7 @@ index 0000000000..4cb10fe69c
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000..285534d2c9
|
||||
index 0000000000..048139d134
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -0,0 +1,375 @@
|
||||
@@ -1405,7 +1405,7 @@ index 0000000000..285534d2c9
|
||||
+ public static int delayChunkUnloadsBy;
|
||||
+
|
||||
+ private static void delayChunkUnloadsBy() {
|
||||
+ delayChunkUnloadsBy = TuinityConfig.getInt("delay-chunkunloads-by", 3) * 20;
|
||||
+ delayChunkUnloadsBy = TuinityConfig.getInt("delay-chunkunloads-by", 5) * 20;
|
||||
+ if (delayChunkUnloadsBy >= 0) {
|
||||
+ TicketType.DELAYED_UNLOAD.loadPeriod = delayChunkUnloadsBy;
|
||||
+ }
|
||||
@@ -3572,7 +3572,7 @@ index 8eecdcde51..53c977513d 100644
|
||||
this.e = world;
|
||||
this.a = blockposition.getX() >> 4;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
index 3c7b225edb..da26f56b39 100644
|
||||
index 3c7b225edb..f1c686810f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
@@ -31,7 +31,7 @@ public abstract class ChunkMapDistance {
|
||||
@@ -3652,7 +3652,7 @@ index 3c7b225edb..da26f56b39 100644
|
||||
+ if (ret && ticket.getTicketType().delayUnloadViable && ticket.getTicketLevel() < tempLevel[0]) {
|
||||
+ tempLevel[0] = ticket.getTicketLevel();
|
||||
+ }
|
||||
+ if (ticket.getTicketType() == TicketType.DELAYED_UNLOAD && ticket.isCached) {
|
||||
+ if (ret && ticket.getTicketType() == TicketType.DELAYED_UNLOAD && ticket.isCached) {
|
||||
+ this.delayedChunks.remove(entryPass[0].getLongKey(), ticket); // clean up ticket...
|
||||
+ }
|
||||
+ return ret;
|
||||
@@ -4303,7 +4303,7 @@ index 550232cb38..229c3b0f0c 100644
|
||||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0c952fea30..19b7d84675 100644
|
||||
index 0c952fea30..420557c270 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -136,7 +136,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -4457,7 +4457,7 @@ index 0c952fea30..19b7d84675 100644
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (inFire & inFireLoaded) {
|
||||
+ if (!inFire & inFireLoaded) {
|
||||
+ this.setFireTicks(-this.getMaxFireTicks());
|
||||
+ }
|
||||
}
|
||||
@@ -4995,7 +4995,7 @@ index ff74be1451..653ba0f1d8 100644
|
||||
0, 2, 60L, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<Runnable>(),
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9c4ea5265e..b48c3a1c04 100644
|
||||
index d0ffe5790e..08518ff57b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -155,6 +155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -5006,7 +5006,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public boolean serverAutoSave = false; // Paper
|
||||
@@ -954,6 +955,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -955,6 +956,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
LOGGER.info("Done ({})! For help, type \"help\"", doneTime);
|
||||
// Paper end
|
||||
|
||||
@@ -5014,7 +5014,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
org.spigotmc.WatchdogThread.tick(); // Paper
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
@@ -971,6 +973,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -972,6 +974,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.lastOverloadTime = this.nextTick;
|
||||
}
|
||||
|
||||
@@ -5022,7 +5022,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
final long diff = curTime - tickSection;
|
||||
@@ -985,7 +988,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -986,7 +989,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
tickSection = curTime;
|
||||
}
|
||||
@@ -5031,7 +5031,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
// Spigot end
|
||||
|
||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
@@ -1078,6 +1081,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1079,6 +1082,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -5108,7 +5108,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
private void executeModerately() {
|
||||
this.executeAll();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1091,22 +1164,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1092,22 +1165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5132,7 +5132,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
|
||||
@Override
|
||||
protected TickTask postToMainThread(Runnable runnable) {
|
||||
@@ -1133,6 +1191,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1134,6 +1192,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
private boolean bb() {
|
||||
if (super.executeNext()) {
|
||||
@@ -5140,7 +5140,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
return true;
|
||||
} else {
|
||||
if (this.canSleepForTick()) {
|
||||
@@ -1200,7 +1259,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1201,7 +1260,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper start - move oversleep into full server tick
|
||||
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
||||
this.awaitTasks(() -> {
|
||||
@@ -5149,7 +5149,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
return !this.canOversleep();
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
@@ -1265,6 +1324,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1266,6 +1325,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -5158,7 +5158,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
// Paper start
|
||||
long endTime = System.nanoTime();
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
@@ -1291,16 +1352,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1292,16 +1353,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
protected void b(BooleanSupplier booleansupplier) {
|
||||
@@ -5178,7 +5178,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
this.methodProfiler.exitEnter("levels");
|
||||
Iterator iterator = this.getWorlds().iterator();
|
||||
|
||||
@@ -1311,7 +1372,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1312,7 +1373,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
processQueue.remove().run();
|
||||
}
|
||||
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
||||
@@ -5187,7 +5187,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - optimize time updates
|
||||
@@ -1353,11 +1414,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1354,11 +1415,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.methodProfiler.enter("tick");
|
||||
|
||||
try {
|
||||
@@ -5202,7 +5202,7 @@ index 9c4ea5265e..b48c3a1c04 100644
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
CrashReport crashreport;
|
||||
@@ -1451,7 +1513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1452,7 +1514,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
||||
Reference in New Issue
Block a user