Skip to content

Commit

Permalink
first 8 patches
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Dec 4, 2024
1 parent 4f644df commit 863d229
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 84 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Fix pufferfish issues


diff --git a/build.gradle.kts b/build.gradle.kts
index 1bb33b64bd73c8ea591c3ffdf5573c7c55a520f3..c8f5e9eaf5fb83148ffb8ff18cb33d51561a6610 100644
index 96d831791edbe6ae07325008b760f70f75c4d713..cfa25c0cd7f7e249a4f22dc1d316bbf702b27e37 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -62,7 +62,7 @@ dependencies {
@@ -63,7 +63,7 @@ dependencies {

// Pufferfish start
implementation("org.yaml:snakeyaml:1.32")
Expand Down Expand Up @@ -73,7 +73,7 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..bf1aacdfac2d501c62038a22cb9eac7f

@Override
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 5a791fad8c27e4997d53f2e5d9a5aa28189fdf28..af8dc4a57987cc84cb1002f2e5f25c28ec98173f 100644
index 593b343b7cd5a24e34ad19a9e93eb9258f862357..0dbfa1e9ae1f0b8b9c4e9de59a7844ae96f63077 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -77,7 +77,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
Expand All @@ -86,10 +86,10 @@ index 5a791fad8c27e4997d53f2e5d9a5aa28189fdf28..af8dc4a57987cc84cb1002f2e5f25c28
return;
}
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 29e5234c008b8ac1df240a242ff7966057075171..5c4843f6cfd13790a44fc0f928f1fbcef8a648ce 100644
index 99a95d77f44dddfd7be6c2ebd60e827d9de956b7..090e196cf391dced8adcb8106026d67b2aeac6b0 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -134,7 +134,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -135,7 +135,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE;
// Paper end - get block chunk optimisation

Expand Down
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 c8f5e9eaf5fb83148ffb8ff18cb33d51561a6610..77602e4445b1b45a17e5552ac6a769e0ed46ebc7 100644
index cfa25c0cd7f7e249a4f22dc1d316bbf702b27e37..74d7aaae57e0e9ea9e31c4b2189ba50a0ac83bea 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
Expand All @@ -14,10 +14,10 @@ index c8f5e9eaf5fb83148ffb8ff18cb33d51561a6610..77602e4445b1b45a17e5552ac6a769e0
dependencies {
- implementation(project(":pufferfish-api")) // Pufferfish // Paper
+ implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency
// Paper start
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -67,6 +67,10 @@ dependencies {
@@ -68,6 +68,10 @@ dependencies {
}
// Pufferfish end

Expand All @@ -28,7 +28,7 @@ index c8f5e9eaf5fb83148ffb8ff18cb33d51561a6610..77602e4445b1b45a17e5552ac6a769e0
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
@@ -114,14 +118,14 @@ tasks.jar {
@@ -115,14 +119,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -48,7 +48,7 @@ index c8f5e9eaf5fb83148ffb8ff18cb33d51561a6610..77602e4445b1b45a17e5552ac6a769e0
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
@@ -187,7 +191,7 @@ fun TaskContainer.registerRunTask(
@@ -188,7 +192,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {
Expand Down Expand Up @@ -254,7 +254,7 @@ index 4e56018b64d11f76c8da43fd8f85c6de72204e36..9607675e6c5bff2183c4420d11fc63ee

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 6fef86e47e37eab6721cfd67d494afb25a2ded68..c914e1e13c4f64f24efa5f825e58efb69632bfa6 100644
index 1354ccfbf525e5e64483ac5f443cc2325ba63850..5e7b833fc9f37bc370c76e5c43e6c9919d6d20af 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -491,7 +491,7 @@ public class CraftScheduler implements BukkitScheduler {
Expand All @@ -267,7 +267,7 @@ index 6fef86e47e37eab6721cfd67d494afb25a2ded68..c914e1e13c4f64f24efa5f825e58efb6
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index da306aab94697a86ac052f4536c9eff1ff23a92f..86ba02ba848ee20a2e2b52baab8986dd5a013f98 100644
index 6ef651e6dc16bad45aeb76f8e17b97871c506a64..8979956334ad5802d221e45eba91248e7f048d13 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,18 @@ index d62f7375394409a278bc565c8263506c598ceeba..2a7fd4420467cce0c4ddca749955ba45
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index eb9fdff179f59d49b17ee3af18cef7508d45987f..e7b9c8a473403002a75b6840250439c91ed12c1c 100644
index 6470f145e2470574a40ddce6ca5bf924c1bb094c..31ec722cfb102eaea5511aca07a48e4ad36d73af 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -174,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -175,6 +175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - add paper world config

public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
+ public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
@@ -842,6 +843,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -843,6 +844,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
Expand Down Expand Up @@ -159,7 +159,7 @@ index ac8af406180bc680d46e8edc3da0fc2e5211345a..48a8bdd45c063797144e98e76f6007ae
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index be0d38544395a9b3befb898bb961f34e32fe9509..9ad9239ae0804cc7a4a9ea4a05401b303ae9b372 100644
index 1c2439ffc1e407ff69286817d22f127470ce07ba..ae274a56f7cb6200b3c556ed61254bb28146c771 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -176,6 +176,14 @@ public class Main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur client support


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5a8f396d47577f087abb415c972fd4f51e50faba..77823507f99bc39181fe3c285cd077ca6ef0296b 100644
index 8aff5b7dd14b835788348b22b1fec4d381df816f..e223a732b8ff485645fa3a4c08c6bf6dff146dd7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -329,6 +329,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -327,6 +327,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
public @Nullable String clientBrandName = null; // Paper - Brand support
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
Expand Down Expand Up @@ -43,10 +43,10 @@ index b0bc66dc7248aae691dcab68b925b52a1695e63f..b6dd6bde947ac7502f25d31603995961
try {
String channels = payload.toString(com.google.common.base.Charsets.UTF_8);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 554714e449d1d2439b05d7e15f72afccd17d4df5..3d2322233aff511bcc5c85b24230c2e08dc0bcd0 100644
index 84c494ca81b8f58604b372ac7236147776817a4f..d86bf4f995e8156f594fa90ebbab4165e52c0e09 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3580,4 +3580,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3565,4 +3565,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData()));
}
// Paper end - entity effect API
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Component related conveniences


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 77823507f99bc39181fe3c285cd077ca6ef0296b..785ea646cbefb8dc1e22a57bc3a18cdbee440e06 100644
index e223a732b8ff485645fa3a4c08c6bf6dff146dd7..5bad9af939411e23a84184cdc13004bc5e2e2568 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2253,6 +2253,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2236,6 +2236,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.lastSentExp = -1; // CraftBukkit - Added to reset
}

Expand All @@ -35,7 +35,7 @@ index 77823507f99bc39181fe3c285cd077ca6ef0296b..785ea646cbefb8dc1e22a57bc3a18cdb
@Override
public void displayClientMessage(Component message, boolean overlay) {
this.sendSystemMessage(message, overlay);
@@ -2477,6 +2497,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2457,6 +2477,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
return new CommandSourceStack(this.commandSource(), this.position(), this.getRotationVector(), this.serverLevel(), this.getPermissionLevel(), this.getName().getString(), this.getDisplayName(), this.server, this);
}

Expand All @@ -57,7 +57,7 @@ index 77823507f99bc39181fe3c285cd077ca6ef0296b..785ea646cbefb8dc1e22a57bc3a18cdb
this.sendSystemMessage(message, false);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 30de3d1a7792c38ae946f19cb0e14637919b5001..cf8b7f93a1ba027c00d7f45809fa51f1ab55a5de 100644
index 9b71655a425356132afb786eff623f558e1e3498..b973a07d199bc856643b23c090eb56bd1aeb0104 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -991,6 +991,20 @@ public abstract class PlayerList {
Expand Down

0 comments on commit 863d229

Please sign in to comment.