mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Update incremental chunk saving
This commit is contained in:
parent
f87d5ab52b
commit
691cdf6f9e
@ -191,3 +191,6 @@ public net.minecraft.world.entity.monster.Vindicator isJohnny
|
||||
public net.minecraft.server.level.Ticket createdTick
|
||||
public net.minecraft.server.level.ServerChunkCache CHUNK_STATUSES
|
||||
public net.minecraft.server.level.ChunkHolder pos
|
||||
|
||||
# Incremental chunk saving
|
||||
public net.minecraft.world.level.entity.PersistentEntitySectionManager storeChunkSections(JLjava/util/function/Consumer;)Z
|
||||
|
@ -3,10 +3,9 @@ From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
||||
Subject: [PATCH] incremental chunk saving
|
||||
|
||||
1.17 Update note: Patch has been applied already, needs updating to properly save entities
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 2216fc05ef5f1c2f7e4dcab7bb20b9944838c5f4..66c8e729b1e01c0ecf7c7c58bda8e06f202a31fe 100644
|
||||
index 9e5810eb0085ad956f0bd1cd69fa88909d9d638a..77e90a6b7d29ad989fd961e00a6fd97c7e5ec4fe 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -44,6 +44,21 @@ public class PaperWorldConfig {
|
||||
@ -32,7 +31,7 @@ index 2216fc05ef5f1c2f7e4dcab7bb20b9944838c5f4..66c8e729b1e01c0ecf7c7c58bda8e06f
|
||||
config.addDefault("world-settings.default." + path, def);
|
||||
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 11dbe48c8a8c29cd28d725c43505e326a6e626ff..363dcebb3b2d5a2512776a191f6716ed3d0e8aff 100644
|
||||
index e3d6a4f64948d5b793fd82262b08753d8a60609e..04531db7c26b9defe76d2584d960132ad79dc0fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -300,6 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -73,7 +72,7 @@ index 11dbe48c8a8c29cd28d725c43505e326a6e626ff..363dcebb3b2d5a2512776a191f6716ed
|
||||
this.profiler.push("snooper");
|
||||
if (((DedicatedServer) this).getProperties().snooperEnabled && !this.snooper.isStarted() && this.tickCount > 100) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index c2401b2ff0547335ddbbeb05c07b74552c246fc9..c1db5cc45dbc7dd24a1ef4dbf88a8efb6c7f2d57 100644
|
||||
index 948a817a1d6f4435655931357aa094b889771e82..88c7ae09e29a32309bf2a63ac0593b42d3fe6a42 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -111,6 +111,8 @@ public class ChunkHolder {
|
||||
@ -140,7 +139,7 @@ index c2401b2ff0547335ddbbeb05c07b74552c246fc9..c1db5cc45dbc7dd24a1ef4dbf88a8efb
|
||||
for (int i = 0; i < this.futures.length(); ++i) {
|
||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = (CompletableFuture) this.futures.get(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b9049dd6e5f254289f20aefefaf68e2ef5adac1b..87ad15eaf8823021030e377078e18bbca4ac5e33 100644
|
||||
index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..07ecd8fd4d0806309c2ac3a465f1ddae3b164e60 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -97,6 +97,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana
|
||||
@ -184,7 +183,7 @@ index b9049dd6e5f254289f20aefefaf68e2ef5adac1b..87ad15eaf8823021030e377078e18bbc
|
||||
+ if (ichunkaccess instanceof LevelChunk) {
|
||||
+ boolean shouldSave = ((LevelChunk)ichunkaccess).lastSaveTime <= maxSaveTime;
|
||||
+
|
||||
+ if (shouldSave && this.save(ichunkaccess)) {
|
||||
+ if (shouldSave && this.save(ichunkaccess) && this.level.entityManager.storeChunkSections(playerchunk.pos.toLong(), entity -> {})) {
|
||||
+ ++savedThisTick;
|
||||
+
|
||||
+ if (!playerchunk.setHasBeenLoaded()) {
|
||||
@ -224,15 +223,15 @@ index b9049dd6e5f254289f20aefefaf68e2ef5adac1b..87ad15eaf8823021030e377078e18bbc
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -909,6 +969,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -918,6 +978,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
this.level.unload(chunk);
|
||||
}
|
||||
+ this.autoSaveQueue.remove(holder); // Paper
|
||||
|
||||
// Paper start - async chunk saving
|
||||
try {
|
||||
@@ -1273,6 +1334,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lightEngine.updateChunkStatus(ichunkaccess.getPos());
|
||||
this.lightEngine.tryScheduleUpdate();
|
||||
@@ -1271,6 +1332,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (!chunk.isUnsaved()) {
|
||||
return false;
|
||||
} else {
|
||||
@ -241,7 +240,7 @@ index b9049dd6e5f254289f20aefefaf68e2ef5adac1b..87ad15eaf8823021030e377078e18bbc
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index e46ccbca0cfa63dd5143080375193a95a9249d60..094c07c3208b0c05f918b7ee19f1d5b9ceeece47 100644
|
||||
index 135d162a926bd258d2aa001b7d0ef880fd3f2fb9..334f1ad2a5ce236b58a82b1ef2e143eaa3909f12 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -672,6 +672,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -261,10 +260,10 @@ index e46ccbca0cfa63dd5143080375193a95a9249d60..094c07c3208b0c05f918b7ee19f1d5b9
|
||||
public void close() throws IOException {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2188666675192cb02e0bccf845cf7863486a305b..225823ef8bb4171f770f90f083689850aa6a171e 100644
|
||||
index d724ce8cf79fe7194e79da2e8e369777bbe638d2..1ffb6c12a2eadc0fee0081f980594ac8b5bc4277 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1023,6 +1023,38 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -1003,6 +1003,37 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
||||
}
|
||||
|
||||
@ -285,7 +284,6 @@ index 2188666675192cb02e0bccf845cf7863486a305b..225823ef8bb4171f770f90f083689850
|
||||
+ if (!this.noSave()) chunkproviderserver.saveIncrementally();
|
||||
+ this.timings.worldSaveChunks.stopTiming(); // Paper
|
||||
+
|
||||
+
|
||||
+ // Copied from save()
|
||||
+ // CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
+ if (doFull) { // Paper
|
||||
@ -316,7 +314,7 @@ index a857953f3488e79fd601ac63881bc4d87708afa7..3cf3b0486f786d7d043cce75767753e1
|
||||
default boolean generateFlatBedrock() {
|
||||
if (this instanceof ProtoChunk) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index be5dfaa7259e5415e3ccbefdc2eae402fe2aebe0..6d7c90b3f41a2e5a1514fa32e1e088f5be9cb90d 100644
|
||||
index cc72c5c7e63794974080648abc94646819ea0924..199efaefef890d2695682cc695b02c6ca3f971e2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -108,6 +108,13 @@ public class LevelChunk implements ChunkAccess {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2cf6c22de0416fad843a901d2ffb97a55937290f..f4465c2352451400591691711281bbf8fdb9974e 100644
|
||||
index 51fae584a6ccb99a5423a415db433f5488465b1c..c1205f97775a8c0431a9fb200228f5677b9c52d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -560,7 +560,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optimize WorldBorder collision checks and air
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f4465c2352451400591691711281bbf8fdb9974e..5a8ea643e2a79af8b02a9ada6b9d9d159f6b637d 100644
|
||||
index c1205f97775a8c0431a9fb200228f5677b9c52d0..0013f6f793cf70992ec83a454089aa800cd76ef5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1044,7 +1044,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
|
||||
of restoring the server.properties every single load.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 11dbe48c8a8c29cd28d725c43505e326a6e626ff..f87409af9218e8003da370444ea97695023de439 100644
|
||||
index 04531db7c26b9defe76d2584d960132ad79dc0fa..ccca42f9a1cd72e7f4fe21bd626b61f06c51e2e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1711,11 +1711,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1721,11 +1721,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add entity liquid API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4965d6beb0486400f5d28220d6e132e2029cf86e..b410001403e4a984e1ea7f5fdb3adc866631e80f 100644
|
||||
index 0013f6f793cf70992ec83a454089aa800cd76ef5..6c4c82fb439a07f62668b625b6ba5d552949964d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1339,7 +1339,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -80,7 +80,7 @@ index 4d82abf234f67af124dff3f726a6a2e39313a780..e2e01012b4a40bb2a63d780c50d7567b
|
||||
chunkData.addProperty("queued-for-unload", chunkMap.toDrop.contains(playerChunk.pos.longKey));
|
||||
chunkData.addProperty("status", status == null ? "unloaded" : status.toString());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995afa4cb923 100644
|
||||
index 88c7ae09e29a32309bf2a63ac0593b42d3fe6a42..914678af675be57fecc92189c709da971b8b0ae8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -60,7 +60,7 @@ public class ChunkHolder {
|
||||
@ -235,7 +235,7 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
// Paper start - optimise isOutsideOfRange
|
||||
// cached here to avoid a map lookup
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> playersInMobSpawnRange;
|
||||
@@ -486,7 +615,7 @@ public class ChunkHolder {
|
||||
@@ -488,7 +617,7 @@ public class ChunkHolder {
|
||||
// CraftBukkit start
|
||||
// ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
|
||||
if (playerchunk_state.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && !playerchunk_state1.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
||||
@ -244,7 +244,7 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
LevelChunk chunk = (LevelChunk)either.left().orElse(null);
|
||||
if (chunk != null) {
|
||||
chunkStorage.callbackExecutor.execute(() -> {
|
||||
@@ -539,13 +668,14 @@ public class ChunkHolder {
|
||||
@@ -553,13 +682,14 @@ public class ChunkHolder {
|
||||
this.fullChunkFuture = chunkStorage.prepareAccessibleChunk(this);
|
||||
this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, ChunkHolder.FullChunkStatus.BORDER);
|
||||
// Paper start - cache ticking ready status
|
||||
@ -260,7 +260,7 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
}
|
||||
});
|
||||
this.updateChunkToSave(this.fullChunkFuture, "full");
|
||||
@@ -569,7 +699,7 @@ public class ChunkHolder {
|
||||
@@ -583,7 +713,7 @@ public class ChunkHolder {
|
||||
this.tickingChunkFuture = chunkStorage.prepareTickingChunk(this);
|
||||
this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, ChunkHolder.FullChunkStatus.TICKING);
|
||||
// Paper start - cache ticking ready status
|
||||
@ -269,7 +269,7 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
either.ifLeft(chunk -> {
|
||||
// note: Here is a very good place to add callbacks to logic waiting on this.
|
||||
ChunkHolder.this.isTickingReady = true;
|
||||
@@ -599,7 +729,7 @@ public class ChunkHolder {
|
||||
@@ -613,7 +743,7 @@ public class ChunkHolder {
|
||||
this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this.pos);
|
||||
this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
||||
// Paper start - cache ticking ready status
|
||||
@ -278,7 +278,7 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
either.ifLeft(chunk -> {
|
||||
ChunkHolder.this.isEntityTickingReady = true;
|
||||
});
|
||||
@@ -617,12 +747,30 @@ public class ChunkHolder {
|
||||
@@ -631,12 +761,30 @@ public class ChunkHolder {
|
||||
this.demoteFullChunk(chunkStorage, playerchunk_state1);
|
||||
}
|
||||
|
||||
@ -312,10 +312,10 @@ index 948a817a1d6f4435655931357aa094b889771e82..7dbf99df56562238ba02493e7c39995a
|
||||
if (chunk != null) {
|
||||
chunkStorage.callbackExecutor.execute(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89224d8608 100644
|
||||
index 07ecd8fd4d0806309c2ac3a465f1ddae3b164e60..f0ad0eef003067f3b582d6eda2b89964fdd556ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -148,6 +148,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public final ServerLevel level;
|
||||
private final ThreadedLevelLightEngine lightEngine;
|
||||
private final BlockableEventLoop<Runnable> mainThreadExecutor;
|
||||
@ -323,7 +323,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
public final ChunkGenerator generator;
|
||||
private final Supplier<DimensionDataStorage> overworldDataStorage; public final Supplier<DimensionDataStorage> getWorldPersistentDataSupplier() { return this.overworldDataStorage; } // Paper - OBFHELPER
|
||||
private final PoiManager poiManager;
|
||||
@@ -186,6 +187,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -187,6 +188,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
@Override
|
||||
public void execute(Runnable runnable) {
|
||||
@ -331,7 +331,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
if (this.queue == null) {
|
||||
this.queue = new java.util.ArrayDeque<>();
|
||||
}
|
||||
@@ -194,6 +196,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -195,6 +197,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
@ -339,7 +339,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
if (this.queue == null) {
|
||||
return;
|
||||
}
|
||||
@@ -350,6 +353,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -351,6 +354,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.level = world;
|
||||
this.generator = chunkGenerator;
|
||||
this.mainThreadExecutor = mainThreadExecutor;
|
||||
@ -355,7 +355,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
ProcessorMailbox<Runnable> threadedmailbox = ProcessorMailbox.create(executor, "worldgen");
|
||||
|
||||
Objects.requireNonNull(mainThreadExecutor);
|
||||
@@ -445,6 +457,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -446,6 +458,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
|
||||
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> newState) -> {
|
||||
@ -363,7 +363,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
if (newState.size() != 1) {
|
||||
return;
|
||||
}
|
||||
@@ -463,7 +476,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -464,7 +477,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
ChunkPos chunkPos = new ChunkPos(rangeX, rangeZ);
|
||||
ChunkMap.this.level.getChunkSource().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update
|
||||
@ -379,7 +379,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets);
|
||||
this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
|
||||
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
||||
@@ -481,6 +501,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -482,6 +502,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end - no-tick view distance
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
// Paper start
|
||||
public void updatePlayerMobTypeMap(Entity entity) {
|
||||
if (!this.level.paperConfig.perPlayerMobSpawns) {
|
||||
@@ -639,6 +769,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -640,6 +770,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
List<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> list = Lists.newArrayList();
|
||||
int j = centerChunk.x;
|
||||
int k = centerChunk.z;
|
||||
@ -504,7 +504,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
|
||||
for (int l = -margin; l <= margin; ++l) {
|
||||
for (int i1 = -margin; i1 <= margin; ++i1) {
|
||||
@@ -657,6 +788,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -658,6 +789,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(j1);
|
||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = playerchunk.getOrScheduleFuture(chunkstatus, this);
|
||||
@ -519,7 +519,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
|
||||
list.add(completablefuture);
|
||||
}
|
||||
@@ -1041,14 +1180,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1102,14 +1241,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
};
|
||||
|
||||
CompletableFuture<CompoundTag> chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z);
|
||||
@ -549,7 +549,7 @@ index 39c7ffe656b6e1217d1e7bcf45f68501ed7e015d..c5340b254c0d4ae2fbffe7253da12b89
|
||||
return ret;
|
||||
// Paper end
|
||||
}
|
||||
@@ -1180,7 +1329,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1241,7 +1390,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
long i = playerchunk.getPos().toLong();
|
||||
|
||||
Objects.requireNonNull(playerchunk);
|
||||
@ -941,7 +941,7 @@ index d94241bcca4f2fd5e464a860bd356af504dc68b7..e82dcc43ae03c31e9e3ec31dbcfecfde
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 135d162a926bd258d2aa001b7d0ef880fd3f2fb9..52f1e2c06cccfead14032cd83ed2dadd668d923c 100644
|
||||
index 334f1ad2a5ce236b58a82b1ef2e143eaa3909f12..c0bbb1acd7d83a70c9f2c34f7d19cea0039e0567 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -446,6 +446,26 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -1174,7 +1174,7 @@ index f72471ac82907a0d5112598b3289689495285944..6e1f8323d028790d1f55d51edb3214d0
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
|
||||
if (chunk != null) addTicket(x, z); // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 5bab49aa7f4a99dc6387fcf57bc39b16f912e6ab..443dcc97f8056df408b8abab6e71a6f5467c6aaf 100644
|
||||
index 4dae19fec0c4914d7b9cc3d41fb8ce36b08fbc81..160254615dac48af2af474c303b57dd293fb224b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -889,6 +889,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -36,13 +36,13 @@ scenario / path:
|
||||
Previously would have hopped to SERVER around 12+ times there extra.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 377993f325400a9bc77f5fbc77d9ec50f5d76638..c28f693bf7da42570d95ab97ccb0ec2bf06f53ee 100644
|
||||
index 914678af675be57fecc92189c709da971b8b0ae8..779b230c18316242f4322d55b8b28900ca793dac 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -240,6 +240,13 @@ public class ChunkHolder {
|
||||
this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key);
|
||||
}
|
||||
@@ -242,6 +242,13 @@ public class ChunkHolder {
|
||||
// Paper end - optimise isOutsideOfRange
|
||||
long lastAutoSaveTime; // Paper - incremental autosave
|
||||
long inactiveTimeStart; // Paper - incremental autosave
|
||||
+ // Paper start - optimize chunk status progression without jumping through thread pool
|
||||
+ public boolean canAdvanceStatus() {
|
||||
+ ChunkStatus status = getChunkHolderStatus();
|
||||
@ -54,10 +54,10 @@ index 377993f325400a9bc77f5fbc77d9ec50f5d76638..c28f693bf7da42570d95ab97ccb0ec2b
|
||||
public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) {
|
||||
this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index eced6724126f5c967df95c9c1febef9833b9de26..2921cc7226bba37af0b3c950038b909806c093a9 100644
|
||||
index f0ad0eef003067f3b582d6eda2b89964fdd556ea..67a6524adc6dec62649bd9aa52fca0f98bb57e52 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -838,7 +838,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -839,7 +839,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return either.mapLeft((list) -> {
|
||||
return (LevelChunk) list.get(list.size() / 2);
|
||||
});
|
||||
@ -66,7 +66,7 @@ index eced6724126f5c967df95c9c1febef9833b9de26..2921cc7226bba37af0b3c950038b9098
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1220,6 +1220,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1281,6 +1281,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return "chunkGenerate " + requiredStatus.getName();
|
||||
});
|
||||
Executor executor = (runnable) -> {
|
@ -3,7 +3,6 @@ From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 9 Aug 2020 08:59:25 +0300
|
||||
Subject: [PATCH] Incremental player saving
|
||||
|
||||
1.17 Update note: Patch has been updated already, re-removed temporarily as it depends on 'incremental chunk saving' patch
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index b67ba8f75e4a3358d7c2462918b85b0bf9b5a922..fdbd8b89bb8bf3b61f60b812b90483c98a3d5ccb 100644
|
||||
@ -26,7 +25,7 @@ index b67ba8f75e4a3358d7c2462918b85b0bf9b5a922..fdbd8b89bb8bf3b61f60b812b90483c9
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1feda8b44364c748497174944b26abc4f058f354..1889de77a5e3d9371005b6bd451e2c0e57e96a93 100644
|
||||
index ccca42f9a1cd72e7f4fe21bd626b61f06c51e2e7..7ee2099dd22eaab384a16ef6a4ab50791fa16aac 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -955,7 +955,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -56,7 +55,7 @@ index 1feda8b44364c748497174944b26abc4f058f354..1889de77a5e3d9371005b6bd451e2c0e
|
||||
} // Paper start
|
||||
for (ServerLevel level : this.getAllLevels()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d59e707f28a5f04545208ad33d122fc433b85933..b299b8da09a304cdc52ddb725873a53045835b4a 100644
|
||||
index 8f12232bfdf82c140fe83f88ef93b96092d586a8..4c658bb7d400e6a4ca1dbacb80e031f01cea2e21 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -169,6 +169,7 @@ public class ServerPlayer extends Player {
|
||||
@ -68,7 +67,7 @@ index d59e707f28a5f04545208ad33d122fc433b85933..b299b8da09a304cdc52ddb725873a530
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 9c594c0f142ca10b7c1df50faf45ccb3f7468ba9..8c62367888af566dd9be4bb5cd301c26e0248e46 100644
|
||||
index 371ecab3f90be690b66db3992239bf5625eb1f6e..ebadb6f59e5b9dcb2f80f837d3d67e0ba50cdad2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -561,6 +561,7 @@ public abstract class PlayerList {
|
||||
@ -79,7 +78,7 @@ index 9c594c0f142ca10b7c1df50faf45ccb3f7468ba9..8c62367888af566dd9be4bb5cd301c26
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -1198,10 +1199,21 @@ public abstract class PlayerList {
|
||||
@@ -1200,10 +1201,21 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add #setMaxPlayers API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 371ecab3f90be690b66db3992239bf5625eb1f6e..4b8f1a9e4d9654443e695ef0f18299ebb2507465 100644
|
||||
index ebadb6f59e5b9dcb2f80f837d3d67e0ba50cdad2..b45a9548a156d9d9de1c8a46a81a69226ea54d72 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -142,7 +142,7 @@ public abstract class PlayerList {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d724ce8cf79fe7194e79da2e8e369777bbe638d2..5d40d8eab8c12379fd32abc1b069ad95130a833f 100644
|
||||
index 1ffb6c12a2eadc0fee0081f980594ac8b5bc4277..ba34e6a8b210cd1549ad2a49d90d3891ee40511c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1629,12 +1629,14 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -1660,12 +1660,14 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
}
|
||||
// Paper end
|
||||
|
@ -6,20 +6,22 @@ Subject: [PATCH] Prevent headless pistons from being created
|
||||
Prevent headless pistons from being created by explosions or tree/mushroom growth.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index b67ba8f75e4a3358d7c2462918b85b0bf9b5a922..1ff9dbde24d6e15076c4e90a73ce5801c47ef3f2 100644
|
||||
index fdbd8b89bb8bf3b61f60b812b90483c98a3d5ccb..faa1b775e45563b93ac1d5b904938b1f5ad8d80c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -440,4 +440,10 @@ public class PaperConfig {
|
||||
allowPistonDuplication = getBoolean("settings.unsupported-settings.allow-piston-duplication", config.getBoolean("settings.unsupported-settings.allow-tnt-duplication", false));
|
||||
@@ -441,6 +441,12 @@ public class PaperConfig {
|
||||
set("settings.unsupported-settings.allow-tnt-duplication", null);
|
||||
}
|
||||
+
|
||||
|
||||
+ public static boolean allowHeadlessPistons;
|
||||
+ private static void allowHeadlessPistons() {
|
||||
+ config.set("settings.unsupported-settings.allow-headless-pistons-readme", "This setting controls if players should be able to create headless pistons.");
|
||||
+ allowHeadlessPistons = getBoolean("settings.unsupported-settings.allow-headless-pistons", false);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public static int playerAutoSaveRate = -1;
|
||||
public static int maxPlayerAutoSavePerTick = 10;
|
||||
private static void playerAutoSaveRate() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index a12af10e28f2d023ba6f916b5e7a53539416713f..822a8dbfaea0a312c4eb2849f2386ecd401b13e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add zombie targets turtle egg config
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 9e5810eb0085ad956f0bd1cd69fa88909d9d638a..fbd433f7d48282365c73e2a76f14c2755b49d930 100644
|
||||
index 77e90a6b7d29ad989fd961e00a6fd97c7e5ec4fe..2252b9f36ea22a655592c6f176d18b70b7440e4e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -38,6 +38,11 @@ public class PaperWorldConfig {
|
@ -8,12 +8,12 @@ the world per tick, this attempts to reduce the impact that join floods
|
||||
has on the server
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 1ff9dbde24d6e15076c4e90a73ce5801c47ef3f2..2675012b619705d7d55406aba10bdbd7c1ccf6cd 100644
|
||||
index faa1b775e45563b93ac1d5b904938b1f5ad8d80c..545948f20efd6c8dd42140b565af94cd6b52b661 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -446,4 +446,9 @@ public class PaperConfig {
|
||||
config.set("settings.unsupported-settings.allow-headless-pistons-readme", "This setting controls if players should be able to create headless pistons.");
|
||||
allowHeadlessPistons = getBoolean("settings.unsupported-settings.allow-headless-pistons", false);
|
||||
@@ -457,4 +457,9 @@ public class PaperConfig {
|
||||
maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public static int maxJoinsPerTick;
|
@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
|
||||
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index fbd433f7d48282365c73e2a76f14c2755b49d930..1ecf4ba21f0e7dd620804d952e11140ffd5af30b 100644
|
||||
index 2252b9f36ea22a655592c6f176d18b70b7440e4e..8504f4dcfca35c8fe8e266af59762edde76bec77 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -43,6 +43,16 @@ public class PaperWorldConfig {
|
@ -5,7 +5,7 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index b2a88d2005795d8d92c3f550d9f8eeb316a45298..2c73eec83af8bbf7f1dba08315542c94f81512a6 100644
|
||||
index b513fa552440da7a722dfe8cbf92e7294495cd67..f85e9fb13ddeb5c3260592e3cdfe958a14bd63f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -407,7 +407,7 @@ public final class ItemStack {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix CraftTeam null check
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||
index c2dc4d65170eba2d914cf2efdcc231254fec7c02..3d4d4ae34cfbe32a844c7a4bc6cd6fd32e252297 100644
|
||||
index f86776aa42bd5520f8aaeaa46bb93ec4d5b4e27d..2b87a652798cb632fe76bf20e9e7f8cb8bfb3b7b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||
@@ -253,7 +253,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 872f92ac1a6bc86ce54700dbf555ceea4fab2057..b3c07e22d4e7107ca22242661fa9ecf2d81fc9e4 100644
|
||||
index 9be6bcd490562ceefcadcfbbb6f650688737278b..f901ac92e5187868a01946c0744773f4f59af82e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -291,6 +291,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index 6ec39de514ceed7e5ffe9a8dc94c2ffd2902cd98..9cde8ae979287d342574da066f65731324725dea 100644
|
||||
index 001e89e85fb935c539c53c8e9c78927e26e099d8..d1ca61f394c0efa1688069e5d1fb529348d5985f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -368,5 +368,40 @@ public final class CraftItemFactory implements ItemFactory {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f87409af9218e8003da370444ea97695023de439..c3fc81457b534bf7a41ce2b021790cb3396ea56e 100644
|
||||
index 7ee2099dd22eaab384a16ef6a4ab50791fa16aac..d3aff6b0bbf52855adbcd3baca8ca9cb28d1128b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2023,6 +2023,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2038,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.getFunctionLibrary());
|
||||
this.structureManager.onResourceManagerReload(this.resources.getResourceManager());
|
@ -31,7 +31,7 @@ index 6caae980ab043b8d48479e0849e1e297a78eb97a..b5b5f36cbdaac7791426ed721ff7db52
|
||||
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3eaf72f49d8e520c6f3d2fea2818864018b41732..2177e7aaf80ac715052e678fd77c1b9578a5b2e8 100644
|
||||
index 6ddef28e869ae8f3b3cbc4bacc44abc364d036d8..f5718c963d0b34f46a8aa2b82ced48e066c03edc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -152,6 +152,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5d40d8eab8c12379fd32abc1b069ad95130a833f..e683e3b3e1ee6fddddd9f237344961e0e2ad8ca5 100644
|
||||
index ba34e6a8b210cd1549ad2a49d90d3891ee40511c..6708ac20478264889ea92f953afcbd9f4098d08e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1174,6 +1174,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -1205,6 +1205,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086)
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index c28f693bf7da42570d95ab97ccb0ec2bf06f53ee..bcb2750a1b3a8cef6eb4e22c6409f77614390f7b 100644
|
||||
index 779b230c18316242f4322d55b8b28900ca793dac..d51a639fe855d73293cdf322671a8ea643a29cd9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -380,6 +380,7 @@ public class ChunkHolder {
|
||||
@@ -382,6 +382,7 @@ public class ChunkHolder {
|
||||
}
|
||||
|
||||
public void blockChanged(BlockPos pos) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2b227fcea38a9c01b15ec7d79503ba089d32bcb0..545f000d51441b456305417025ae768aed500c53 100644
|
||||
index f5718c963d0b34f46a8aa2b82ced48e066c03edc..d95f81e0cddf193980f404842bf8ce5a89251e00 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3924,4 +3924,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -14,10 +14,10 @@ this breaks your workflow you can always force all scoreboards to be tracked wit
|
||||
settings.track-plugin-scoreboards in paper.yml.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 2675012b619705d7d55406aba10bdbd7c1ccf6cd..649e46115260259820a9d2255ad669b926319a3f 100644
|
||||
index 545948f20efd6c8dd42140b565af94cd6b52b661..7d50aded88f5b7dfebaea1aebc86231f7b5c4e25 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -451,4 +451,9 @@ public class PaperConfig {
|
||||
@@ -462,4 +462,9 @@ public class PaperConfig {
|
||||
private static void maxJoinsPerTick() {
|
||||
maxJoinsPerTick = getInt("settings.max-joins-per-tick", 3);
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 545f000d51441b456305417025ae768aed500c53..1bb27f0d3c990667f0547dc673e5aec977436446 100644
|
||||
index d95f81e0cddf193980f404842bf8ce5a89251e00..c506298b8e1baa864dfc9a44e7680fb2376ec05b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -52,6 +52,7 @@ import net.minecraft.resources.ResourceKey;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c3fc81457b534bf7a41ce2b021790cb3396ea56e..75e4d69e69509a94f0e112fe121369a6f8952ee7 100644
|
||||
index d3aff6b0bbf52855adbcd3baca8ca9cb28d1128b..504d14404ed180f5193552983e5dc08e2efcfd6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2089,6 +2089,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2104,6 +2104,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix CME on adding a passenger in CreatureSpawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1bb27f0d3c990667f0547dc673e5aec977436446..b5c700c8af6e7d375052683811f87046e400ae45 100644
|
||||
index c506298b8e1baa864dfc9a44e7680fb2376ec05b..ad5eda7c87648badbae109494d3c00c21f1ea316 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3433,7 +3433,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling
|
||||
cases where a captured entry is overriden) - but for now this will do.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index f0914b506254791115b465a42a4f816f9cc0dba6..11b454836610f07fffc0efcb60ac5960757a0644 100644
|
||||
index ce5bccd6d76252309e16b946c44674f4cf74450d..54cac6167796360ddaeb0b968f17a3533c4b9775 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -147,7 +147,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Player elytra boost API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a9e3687d145c15f218d83a2d10b151fd9e993868..5a2c999f95684e02131daf7a9582cdf48feb6290 100644
|
||||
index 99e35c68875ae807f406acd6f693f216fab749cd..abc5f4be2f58532d88978e53d7d9b52ddb46ff48 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -538,6 +538,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Toggle for removing existing dragon
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 1ecf4ba21f0e7dd620804d952e11140ffd5af30b..1f673932e329f7e713a37a8c06345a184650f0eb 100644
|
||||
index 8504f4dcfca35c8fe8e266af59762edde76bec77..a03b835320bb99c38ec5f23f0c23284c08bd4171 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -53,6 +53,14 @@ public class PaperWorldConfig {
|
@ -25,10 +25,10 @@ index d32b96a5f51d745869cfc40c01c54de58e1eb843..759e563d1ed13249fada8a8eab6b6a10
|
||||
Connection.LOGGER.debug("Failed to sent packet", throwable);
|
||||
ConnectionProtocol enumprotocol = this.getCurrentProtocol();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 1dd21dc364eef75667d56db33c5df8e006453a08..4444e1235fdd5a3630e71848e1269b5d05bf1c55 100644
|
||||
index 4c658bb7d400e6a4ca1dbacb80e031f01cea2e21..09a0c6fd3746bb182a4262f47c9f1754db30bbd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -255,6 +255,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -256,6 +256,7 @@ public class ServerPlayer extends Player {
|
||||
public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
boolean needsChunkCenterUpdate; // Paper - no-tick view distance
|
||||
@ -49,10 +49,10 @@ index 36dccc209afb838cd3dbdfd26893cf5481d6653f..c49d9eb34883342e685c5363a4d33bf4
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4b8f1a9e4d9654443e695ef0f18299ebb2507465..f3e59b028d05c2d65ed2dab6717df68b68405fe5 100644
|
||||
index b45a9548a156d9d9de1c8a46a81a69226ea54d72..24a1f72fa81584dcdb447a4e2d1d68462c6357ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -587,7 +587,7 @@ public abstract class PlayerList {
|
||||
@@ -588,7 +588,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ changes but this should usually not happen. A config option to disable
|
||||
this completely is added though in case that should ever be necessary.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 1f673932e329f7e713a37a8c06345a184650f0eb..aa4feec29980d344fdcf0623b81bd07590e06b9d 100644
|
||||
index a03b835320bb99c38ec5f23f0c23284c08bd4171..45e65d1c56b693d8f7c5c12da7774849c737aa96 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -361,6 +361,14 @@ public class PaperWorldConfig {
|
||||
@@ -376,6 +376,14 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ in IWorldServerData are removed as they were only used in certain places, with h
|
||||
values used in other places.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index a3c76e0515ee38cb5dc55e7dbf3f91cac5ef4c28..5f25edb32b3e1194cf03c19574fc2ebd07b9a15e 100644
|
||||
index 45e65d1c56b693d8f7c5c12da7774849c737aa96..935bb237f8ecd63ca4cec64a7c7a341c9d3358e5 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -61,6 +61,19 @@ public class PaperWorldConfig {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user