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@862299b "Downgrade" Vineflower to 1.10.1 release (#10423)
PaperMC/Paper@9e886c4 Remove dead code (LegacyResult) (#10411)
PaperMC/Paper@3b078f8 Add API for ticking fluids (#10435)
PaperMC/Paper@908b814 Fix inventory desync with PlayerLeashEntityEvent (#10436)
PaperMC/Paper@3af1346 Allow setting player list name early
PaperMC/Paper@a033033 Added chunk view API (#10398)
PaperMC/Paper@c5f68ff Add CartographyItemEvent and get/setResult for CartographyInventory (#10396)
PaperMC/Paper@fc53ff5 Add Configuration for finding Structures outside World Border (#10437)
PaperMC/Paper@a6b6ecd More Raid API (#7537)
  • Loading branch information
granny committed Apr 21, 2024
1 parent f2a5ca8 commit 7377ee9
Show file tree
Hide file tree
Showing 69 changed files with 130 additions and 158 deletions.
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,17 @@ repositories {

dependencies {
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
decompiler("org.vineflower:vineflower:1.11.0-20240412.144930-14")
decompiler("org.vineflower:vineflower:1.10.1")
paperclip("io.papermc:paperclip:3.0.3")
}

paperweight {
serverProject = project(":purpur-server")

remapRepo = paperMavenPublicUrl
decompileRepo = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
decompileRepo = paperMavenPublicUrl

usePaperUpstream(providers.gradleProperty("paperCommit")) {

withPaperPatcher {
apiPatchDir = layout.projectDirectory.dir("patches/api")
apiOutputDir = layout.projectDirectory.dir("Purpur-API")
Expand Down
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.20.4-R0.1-SNAPSHOT

mcVersion = 1.20.4
paperCommit = 4445d23544e0801fb6f658de98815ce0d8c04f58
paperCommit = a6b6ecdd221b6ae7687561c84c1850aaa62473b4

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0005-Purpur-client-support.patch
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/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c6cb4f17469a8f2e60dd3e28d41402851ce5fb21..6692bc3bedf0f78a3b8cd937e1943d1113e51584 100644
index d048ae07cc33fd77d128cc1ebf88b0804969fa3c..761abf496f8ef400460869d667afe2cf45ffb5f3 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3711,4 +3711,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3752,4 +3752,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Override
Spigot spigot();
// Spigot end
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0010-AFK-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] AFK API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6692bc3bedf0f78a3b8cd937e1943d1113e51584..654516bb7545d74a9e00efc154b5b75707038c96 100644
index 761abf496f8ef400460869d667afe2cf45ffb5f3..95669dfc1de917f4d22242ceda94e64741221469 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3719,5 +3719,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3760,5 +3760,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return True if Player uses Purpur Client
*/
public boolean usesPurpurClient();
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0038-Add-local-difficulty-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api


diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 35fb5047dd8a8521586a9ca9f8d70881355fb7f5..bd1ceec96d354ddfeb7f79e6007b79c4da37a8bb 100644
index e6f66d70d024cf4f0536a5bf8e51bf7b306335df..2d2d8a7494605e465c68b325d3043d334757e9bc 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4222,6 +4222,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4233,6 +4233,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public DragonBattle getEnderDragonBattle();

Expand Down
8 changes: 4 additions & 4 deletions patches/api/0041-Debug-Marker-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ index e318d4d5a1fec1522ef37aed2ed677952e50943b..c15b0b05870a469ea5d314c9fac6a57a
// Purpur end
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index bd1ceec96d354ddfeb7f79e6007b79c4da37a8bb..c2fc3c7158b65a875515afda0d69e2d6529db976 100644
index 2d2d8a7494605e465c68b325d3043d334757e9bc..07e75978b4fc0e446e8aa46a40be5e371dc1c11b 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4230,6 +4230,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4241,6 +4241,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The local difficulty
*/
public float getLocalDifficultyAt(@NotNull Location location);
Expand Down Expand Up @@ -260,10 +260,10 @@ index bd1ceec96d354ddfeb7f79e6007b79c4da37a8bb..c2fc3c7158b65a875515afda0d69e2d6

/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 654516bb7545d74a9e00efc154b5b75707038c96..f2aa9de6b1b6475435f72e9b7939fa7af9583ed3 100644
index 95669dfc1de917f4d22242ceda94e64741221469..1fce58c500ad37a3f4d0b8a3bf18ccb149058dcd 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3739,5 +3739,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3780,5 +3780,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @deprecated Use {@link #resetIdleDuration()} instead
*/
void resetIdleTimer();
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0042-Add-death-screen-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f2aa9de6b1b6475435f72e9b7939fa7af9583ed3..5d22249f7bc98bc88ee798974f481c37807f7c5e 100644
index 1fce58c500ad37a3f4d0b8a3bf18ccb149058dcd..8bbbdad40bc6a1932d8f79ec95c0a92037b3dac5 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3809,5 +3809,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3850,5 +3850,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Clears all debug block highlights
*/
void clearBlockHighlights();
Expand Down
16 changes: 8 additions & 8 deletions patches/server/0001-Pufferfish-Server-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ index 0af9ed92824ccf30814eceb6a2c2e5c12661c991..67eeb39aede6908d2756e49821ca350e
} else {
this.lastTimeStamp = body.timeStamp();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 27db614d46dffc2d10f18d79cc5a084f3421d86b..c1c97130adf4b7bcb5b2470fc12b79da1d837686 100644
index 2dc07e5ef249636e85ad9c78e3729e9e066a8fe8..b9e0a32f5829ca15f949effcafcbe2a975f6f690 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand Down Expand Up @@ -1786,7 +1786,7 @@ index 502bdc726b7890b00ee36871d905dea44e8719e3..fbffe3dab1b7812b50df5d6bddf4fbdb

if (this.isRainingAt(blockposition)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 860d33ac56680babd87358b1d7d2216dac3f7865..2ae1d53364da7f0e30c642df4e9a62f9e6581432 100644
index fe2ef36ab5dc4b933abf24dbfd0e811c53239cf0..e725c1c0496383007ffb94c46fc18340666b5e29 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1135,6 +1135,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down Expand Up @@ -2128,7 +2128,7 @@ index e9bb7feb591032904516d1b9374f486d8a7d066c..366121188c5abb550ed0a5f99d25c001
if (this.isSpectator()) {
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 2439f8d48daca7329049436414f06a36b4b79029..4cf2963fdbe9003fd18ac8c2035ccded57c02abd 100644
index d2c92df28475f0a32a0134324eb0a5609a9afb99..a6b48b4eab6e0e98205fd9cafc3cde5ad39651af 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -222,14 +222,16 @@ public abstract class Mob extends LivingEntity implements Targeting {
Expand Down Expand Up @@ -2236,10 +2236,10 @@ index 38af5c7280366fd6ec077f3d914ea5f3ee77451a..d78e1f6191738d426968efc24e734f04
public boolean hasTasks() {
for (WrappedGoal task : this.availableGoals) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
index de7c3654b5d134e380c0d7e8800beb6c10d8a22a..3e544a1b957e7a9bc2c5548baf7f6499a34151eb 100644
index aee0147649d458b87d92496eda0c1723ebe570d2..89e9ea999d2fbd81a1d74382ef3fcd675fc8b94e 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
@@ -119,6 +119,7 @@ public abstract class MoveToBlockGoal extends Goal {
@@ -121,6 +121,7 @@ public abstract class MoveToBlockGoal extends Goal {
for (int m = 0; m <= l; m = m > 0 ? -m : 1 - m) {
for (int n = m < l && m > -l ? l : 0; n <= l; n = n > 0 ? -n : 1 - n) {
mutableBlockPos.setWithOffset(blockPos, m, k - 1, n);
Expand Down Expand Up @@ -2745,7 +2745,7 @@ index da7489986848316fed029b71d1bc4e1248c9c9a8..661acdf4b1f33d150b0caf179e925d31
return new BlockPos(i, l, j);
}
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
index b865115dc5a8c000521abf668251ab1bd8104505..42af3888a155f114901a90d4028bafed5789f58f 100644
index 64076a452a315090d299a7a58a43fd3b5c1b4e0a..0c317b0147a73a8075e0883f0c132f4db0bdfea7 100644
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
@@ -63,13 +63,18 @@ public final class Biome {
Expand Down Expand Up @@ -3171,7 +3171,7 @@ index 37a0002bbe6539648db5219bb373e0404ae48dc0..ca0571d232e102c4b177a1ea44b96f5f
}

diff --git a/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
index 1132658b063c6cd3feb1783ab4d5f5141ab75140..284c76ddb9724b44bb2e93f590685c728e843e6d 100644
index 88a4a72bb390947dc17e5da09a99b2d1b3ac4621..284c76ddb9724b44bb2e93f590685c728e843e6d 100644
--- a/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
+++ b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
@@ -17,50 +17,69 @@ public class EntityCollisionContext implements CollisionContext {
Expand Down Expand Up @@ -3258,7 +3258,7 @@ index 1132658b063c6cd3feb1783ab4d5f5141ab75140..284c76ddb9724b44bb2e93f590685c72

@Override
public boolean isAbove(VoxelShape shape, BlockPos pos, boolean defaultValue) {
- return this.entityBottom > pos.getY() + shape.max(Direction.Axis.Y) - 1.0E-5F;
- return this.entityBottom > (double)pos.getY() + shape.max(Direction.Axis.Y) - 1.0E-5F;
+ return (this.entity == null ? -Double.MAX_VALUE : entity.getY()) > (double)pos.getY() + shape.max(Direction.Axis.Y) - 1.0E-5F; // Pufferfish
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0005-Purpur-client-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ index 0306771b8f90dcdd77f151c19c6c2d75c41f8feb..34559eae0ea3f88d7b9a3c9e4a2350c4
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 e77bf7f432387bdfa7f69d31b014e8cd254fd4ca..6a558a7042b78e8de7fc637053468ac9029b4133 100644
index 44f4665db613c558078df5bb49106e4ca5679dfe..5da7b468af3dd19491f38140f303e55b7cab21db 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3425,4 +3425,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3456,4 +3456,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void setSendViewDistance(final int viewDistance) {
this.getHandle().setSendViewDistance(viewDistance);
}
Expand Down
Loading

0 comments on commit 7377ee9

Please sign in to comment.