Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ffe31a1 Readd async saveddata io
PaperMC/Paper@5a503d7 Bulk bugfixes for itemstack damage API (#11063)
  • Loading branch information
granny committed Jul 13, 2024
1 parent 5e70800 commit 14136b8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21-R0.1-SNAPSHOT

mcVersion = 1.21
paperCommit = 70ff1ec0793d2176915e8da3e3ef100093d5bedf
paperCommit = 5a503d7db42eee8d287b7ed32db22a369e9e3146

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0144-Config-to-allow-unsafe-enchants.patch
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ index 2d300905c05c7c23a4da30b3651b331381a1dc0d..30746b3ae45840206bf23e811a9819f3
((ServerPlayer) this.player).connection.send(new ClientboundContainerSetDataPacket(this.containerId, 0, this.cost.get()));
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 00665c3e81264b440cd27431f7632f3bc2b1ceef..293771fd6e86447b219d0936b67cdcdf2bc5f0ee 100644
index 50d82217aade8bb6db557df9655e5746608af3ef..fab7bebb8c7fd21a3bcfbd2f04702eb56f9eb310 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -1249,6 +1249,12 @@ public final class ItemStack implements DataComponentHolder {
@@ -1251,6 +1251,12 @@ public final class ItemStack implements DataComponentHolder {
return !((ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY)).isEmpty();
}

Expand Down
14 changes: 7 additions & 7 deletions patches/server/0250-Remove-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ index 6df79aab2f0a75bbe347dc92e9ed5d62ceec7983..5d52df83c643845ffbeeba3bb640c9de

}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db541146e6e589 100644
index 36fbbf45ae064a345bf4aafbb9ac527197326eb9..b004e2e69598f2d6f3a9cd47aed3f4429c9702aa 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -357,9 +357,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
Expand All @@ -248,7 +248,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411
}

@Override
@@ -387,26 +387,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -394,26 +394,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
this.level.getProfiler().push("purge");
Expand Down Expand Up @@ -281,7 +281,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411
this.level.getProfiler().pop();
this.clearCache();
}
@@ -424,7 +423,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -431,7 +430,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
gameprofilerfiller.push("filteringLoadedChunks");
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
Iterator iterator = this.chunkMap.getChunks().iterator();
Expand All @@ -290,7 +290,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411

while (iterator.hasNext()) {
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
@@ -437,7 +436,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -444,7 +443,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon

if (this.level.tickRateManager().runsNormally()) {
gameprofilerfiller.popPush("naturalSpawnCount");
Expand All @@ -299,7 +299,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
int naturalSpawnChunkCount = k;
@@ -462,7 +461,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -469,7 +468,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false);
}
// Paper end - Optional per player mob spawns
Expand All @@ -308,7 +308,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411

this.lastSpawnState = spawnercreature_d;
gameprofilerfiller.popPush("spawnAndTick");
@@ -503,21 +502,21 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -510,21 +509,21 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}
}
Expand Down Expand Up @@ -336,7 +336,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..be22cbe607876fdf39120d6957db5411
gameprofilerfiller.pop();
gameprofilerfiller.pop();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 19ca4094148cacedd878212adcf81766aff3171e..4a748149d1cbf4e99be76e1d9eca410d65f86e8f 100644
index c1c280ea396d0bef5e0eba79ecd19ee2b26f0f6a..ca3ee624904c9fe195d4eb0d8a7ea8dee6656e95 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -720,7 +720,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
Expand Down
20 changes: 10 additions & 10 deletions patches/server/0251-Remove-Mojang-Profiler.patch
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ index 5d52df83c643845ffbeeba3bb640c9deeae11139..4f02f8b6003580fc178991cbece8ad43

public boolean hasWork() {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153bcc0e271 100644
index b004e2e69598f2d6f3a9cd47aed3f4429c9702aa..efe15505342e10baacadb61275c8f8d270f2de2c 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -374,26 +374,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -381,26 +381,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon

// CraftBukkit start - modelled on below
public void purgeUnload() {
Expand Down Expand Up @@ -503,7 +503,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
if (tickChunks) {
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
@@ -403,10 +403,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -410,10 +410,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}

//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
Expand All @@ -516,7 +516,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
this.clearCache();
}

@@ -417,10 +417,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -424,10 +424,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon

this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) {
Expand All @@ -530,7 +530,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
Iterator iterator = this.chunkMap.getChunks().iterator();
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
@@ -435,7 +435,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -442,7 +442,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}

if (this.level.tickRateManager().runsNormally()) {
Expand All @@ -539,7 +539,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
@@ -464,7 +464,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -471,7 +471,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur

this.lastSpawnState = spawnercreature_d;
Expand All @@ -548,7 +548,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit

Util.shuffle(list, this.level.random);
@@ -504,7 +504,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -511,7 +511,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur

Expand All @@ -557,7 +557,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
if (flag) {
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
@@ -512,14 +512,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -519,14 +519,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}

Expand All @@ -575,7 +575,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
}
}

@@ -700,7 +700,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -707,7 +707,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon

@Override
protected void doRunTask(Runnable task) {
Expand All @@ -585,7 +585,7 @@ index be22cbe607876fdf39120d6957db541146e6e589..63b03939a15150eeafc0498a6c810153
}

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4a748149d1cbf4e99be76e1d9eca410d65f86e8f..b3ddd5eba13f03d30104c9a163da835126b29115 100644
index ca3ee624904c9fe195d4eb0d8a7ea8dee6656e95..0f28eabc50366f35b3804b16db8cc4c38777de6e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -678,16 +678,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
Expand Down

0 comments on commit 14136b8

Please sign in to comment.