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@2946dbb Update WorldServer#serverlevelData mapping
PaperMC/Paper@98af0e0 update generator
PaperMC/Paper@20507b4 Apply more patches
PaperMC/Paper@7162ff0 fix item meta
PaperMC/Paper@7d67d3f fix DamageTypeTags init
PaperMC/Paper@0971875 re-add improve perf of mass crafts
PaperMC/Paper@bcf52fe Delete some old patches
PaperMC/Paper@348c855 Readd last API patch (with TODO)
PaperMC/Paper@b630564 More patches
PaperMC/Paper@3cb16c9 Add back per player mob spawning
PaperMC/Paper@fe7b741 Another one
PaperMC/Paper@12ed021 Update material tags and entity effect
PaperMC/Paper@02bca1e Remove timings impl
PaperMC/Paper@4d87302 Fix NPE and StackOverflowError for dispensers
PaperMC/Paper@f8f230a Remove unnecessary AT
PaperMC/Paper@29bf7be Fix unused parameter in PlayerList#remove
PaperMC/Paper@9e35192 Execute spark tasks during tick sleep (#11525)
PaperMC/Paper@e35f199 Use declaration order for state holder property iteration
PaperMC/Paper@6288adb Remove leftover missed timings calls (#11527)
PaperMC/Paper@99b1bf9 Use new ClientboundPlayerRotationPacket for setting player rotation
  • Loading branch information
RealTriassic committed Oct 28, 2024
1 parent edcaba4 commit 274ab9b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 27 deletions.
4 changes: 2 additions & 2 deletions patches/api/0001-Empty-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Empty configuration


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 20750c09d819d62f32491db8672936b929e1098e..272b931981251ad7c6fbdaae74df12a28bb014e5 100644
index 6246251caf2c6f025c824b8e7a944b8d48751fa1..249aba3ee83048e5e04d1bc6103cd345037bb343 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2214,6 +2214,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2265,6 +2265,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand


diff --git a/build.gradle.kts b/build.gradle.kts
index 9966576652ed6007d2228237f292c1dc83ede485..2bb6508b73755693c812c5d6572ce5dc0cea8592 100644
index 9b3a6b336cb1344d4e74e0e4f7c50ffd1e1b8955..a4856371131963dac24aed746786d02a7a919b16 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand All @@ -17,7 +17,7 @@ index 9966576652ed6007d2228237f292c1dc83ede485..2bb6508b73755693c812c5d6572ce5dc
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -81,14 +81,14 @@ tasks.jar {
@@ -85,14 +85,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand Down
30 changes: 25 additions & 5 deletions patches/server/0002-Empty-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,20 @@ index 0000000000000000000000000000000000000000..562200dd06f5c30219746be01441a7de
+ return value.isEmpty() ? fallback : value;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 17a158ff6ce6520b69a5a0032ba4c05449dd0cf8..f604ff221ca1c9115fe2880520339655cd74cf15 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -224,6 +224,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
this.server.spark.enableEarlyIfRequested(); // Paper - spark
+ com.triassic.linearpaper.LinearConfig.init((java.io.File) this.options.valueOf("linear-settings")); // LinearPaper
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
if (this.convertOldUsers()) {
this.getProfileCache().save(false); // Paper
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 044985030607bc20a61666dee7dd2659ae4553b5..7c1490fe1a923edeac927bffa7984b434bfbfc28 100644
index 022de445bbbb869c38be4972c98dcf1c665539ec..50fd1804ca1291d7bedb42dc8d64b4bef8531d1c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
Expand All @@ -313,20 +325,28 @@ index 044985030607bc20a61666dee7dd2659ae4553b5..7c1490fe1a923edeac927bffa7984b43
+ public final com.triassic.linearpaper.LinearWorldConfig linearConfig; // LinearPaper

public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot
@@ -842,6 +843,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.linearConfig = new com.triassic.linearpaper.LinearWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // LinearPaper
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a34e40e273a79a234c3d79b6ad360ce3a4d35ba3..936ad535131f17c0d4729ff1095f20b29d564360 100644
index 9f9eefc7346838a9effcda861cecd098092efb0f..4750ea4373e5dbf3a05854b3677d116911ee9ea3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1088,6 +1088,7 @@ public final class CraftServer implements Server {
@@ -1089,6 +1089,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.linearConfig.init(); // LinearPaper
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -2968,6 +2969,12 @@ public final class CraftServer implements Server {
@@ -3009,6 +3010,12 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0003-Region-format-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ index 0000000000000000000000000000000000000000..1285e3c410c9f6b5ed8c3ac11da60d1e
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..90618bb54dadaf9e77ac86c5b0bd321131a077fc 100644
index af7c6f56444c0e495fd39da872f8030199afc634..ad694f940f425806a302780d6db281fae605b27e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -993,10 +993,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -995,10 +995,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator1.hasNext()) {
ServerLevel worldserver2 = (ServerLevel) iterator1.next();

Expand Down
26 changes: 13 additions & 13 deletions patches/server/0004-Abstract-regionfile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ index 622d0cbe023774d92d212f242b60b96317720835..9701e6b69b99b3ec392810f4a7000adb
}

diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
index e9e1ab1a5be996bc648a53dc4d4123a6b966c437..0226dfda6bdcd80c8f52ad820e1881bef1574232 100644
index 6a465d9b12c92b5385c394fef7456630be97c04d..631c6bab8fd499debc2d0c84f5d5d99eb7d53e5d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -490,10 +490,10 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
@@ -953,10 +953,10 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
private static int getChunkIndex(int x, int z) {
return (x & 31) + (z & 31) * 32;
}
Expand All @@ -148,7 +148,7 @@ index e9e1ab1a5be996bc648a53dc4d4123a6b966c437..0226dfda6bdcd80c8f52ad820e1881be
final int offset = getChunkIndex(x, z);
boolean previous = this.oversized[offset] == 1;
this.oversized[offset] = (byte) (oversized ? 1 : 0);
@@ -532,7 +532,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
@@ -995,7 +995,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
return this.path.getParent().resolve(this.path.getFileName().toString().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt");
}

Expand All @@ -158,7 +158,7 @@ index e9e1ab1a5be996bc648a53dc4d4123a6b966c437..0226dfda6bdcd80c8f52ad820e1881be
try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new InflaterInputStream(Files.newInputStream(file))))) {
return NbtIo.read((java.io.DataInput) out);
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003693adc93 100644
index 78922c3e9a69db1774dd846047b79e9523d7cf41..6f83fe8ab56049d771507f76ae8951af1ef175a9 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -21,7 +21,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
Expand Down Expand Up @@ -225,7 +225,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003

final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));

@@ -204,12 +204,12 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -235,12 +235,12 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}

// Paper start - rewrite chunk system
Expand All @@ -240,7 +240,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
// Paper start - rewrite chunk system
if (existingOnly) {
return this.moonrise$getRegionFileIfExists(chunkcoordintpair.x, chunkcoordintpair.z);
@@ -217,7 +217,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -248,7 +248,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
synchronized (this) {
final long key = ChunkPos.asLong(chunkcoordintpair.x >> REGION_SHIFT, chunkcoordintpair.z >> REGION_SHIFT);

Expand All @@ -249,7 +249,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
if (ret != null) {
return ret;
}
@@ -232,7 +232,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -263,7 +263,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise

FileUtil.createDirectoriesSafe(this.folder);

Expand All @@ -258,7 +258,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003

this.regionCache.putAndMoveToFirst(key, ret);

@@ -246,7 +246,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -277,7 +277,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
}

Expand All @@ -267,7 +267,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
synchronized (regionfile) {
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z);
@@ -281,7 +281,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -312,7 +312,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@Nullable
public CompoundTag read(ChunkPos pos) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
Expand All @@ -276,7 +276,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
if (regionfile == null) {
return null;
}
@@ -332,7 +332,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -376,7 +376,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise

public void scanChunk(ChunkPos chunkPos, StreamTagVisitor scanner) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
Expand All @@ -285,7 +285,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
if (regionfile == null) {
return;
}
@@ -362,7 +362,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -406,7 +406,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}

public void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException { // Paper - public
Expand All @@ -294,7 +294,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
// Paper start - rewrite chunk system
if (regionfile == null) {
// if the RegionFile doesn't exist, no point in deleting from it
@@ -421,7 +421,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -465,7 +465,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
// Paper start - rewrite chunk system
synchronized (this) {
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
Expand All @@ -303,7 +303,7 @@ index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..13ab5612f077f111c1154e40f802d003
try {
regionFile.close();
} catch (final IOException ex) {
@@ -438,7 +438,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -482,7 +482,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
// Paper start - rewrite chunk system
synchronized (this) {
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0005-Add-Linear-region-format.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add Linear region format


diff --git a/build.gradle.kts b/build.gradle.kts
index 2bb6508b73755693c812c5d6572ce5dc0cea8592..cfc6a7bc0633bebf0570c1cfacdeaa073372258f 100644
index a4856371131963dac24aed746786d02a7a919b16..5fabf1eeec664874ddfa50b3fba27c6788fb3790 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -30,6 +30,10 @@ dependencies {
Expand Down Expand Up @@ -424,7 +424,7 @@ index 9701e6b69b99b3ec392810f4a7000adb97f1132c..4be8c6d5b066540bbc735fa2dc476b65

if (afile == null) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index dd39ab538a2b1b5998bbfb830df26316b2a718c8..634bfab92ae2e65d60ef6381d7c4eb507215fdd4 100644
index 6f83fe8ab56049d771507f76ae8951af1ef175a9..bc2177540e5b1bd881dd90ee7cc51ce882d7b446 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -87,7 +87,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
Expand All @@ -436,7 +436,7 @@ index dd39ab538a2b1b5998bbfb830df26316b2a718c8..634bfab92ae2e65d60ef6381d7c4eb50

if (!java.nio.file.Files.exists(regionPath)) {
this.markNonExisting(key);
@@ -226,7 +226,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -257,7 +257,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
this.regionCache.removeLast().close();
}

Expand Down

0 comments on commit 274ab9b

Please sign in to comment.