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@bf5852a Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268)
PaperMC/Paper@fb53074 Apply optimise collision checking in move packet handling patch
PaperMC/Paper@81bfda8 [ci skip] Specify rebase location in CONTRIBUTING (#11255)
PaperMC/Paper@9571983 Fix scanForLegacyEnderDragon world config (#11262)
PaperMC/Paper@ec55c11 Fix indestructable light blocks (#11275)
PaperMC/Paper@1b8ab11 Add Configuration for vertical Despawn Ranges (#10440)
PaperMC/Paper@534ab86 [ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)
PaperMC/Paper@e619744 Allow skipping of world symlink validation (#11250)
PaperMC/Paper@78216fe Re-implement portalCreateRadius world config (#11267)
PaperMC/Paper@4829fbf Handle custom registry elements properly (#11230)
  • Loading branch information
granny committed Aug 16, 2024
1 parent 201e928 commit f2307b8
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 48 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.1-R0.1-SNAPSHOT

mcVersion = 1.21.1
paperCommit = 11b4ac7c659ffb7e4790b0856b14117b6d532200
paperCommit = 4829fbf6bd51e2dc86e2f190971c081aac76a201

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0001-Pufferfish-Server-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1413,10 +1413,10 @@ index 2fe9d9b38c01d04416843fdd48d3e33899b7de63..5a9712de8abe3c3ccd08c5699f89e3ce

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 60ff21c8df4168f14da04a12073bde47cd4693c4..301dc8ea0574f02f28067cda397683c7e7a6152f 100644
index 750f216400a473ed6895273c99ff89960bb56833..3d1dc6d712f61de2a4927b3bf2973f75af24cf11 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1123,6 +1123,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1157,6 +1157,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

@Override
public void handleEditBook(ServerboundEditBookPacket packet) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0008-Component-related-conveniences.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ index cb25a8796dda84fb08865a2af769fb4d10597685..ffc7f4f4544df21b713b780eded8aeba
public void displayClientMessage(Component message, boolean overlay) {
this.sendSystemMessage(message, overlay);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 43eeb8ce4bc350c2b524ade11ca25d8d4d21bea5..063ac25725543988332bdaf0c600e1f6c429943e 100644
index 0368d6ba9cc9fe557d3c7172a87a7a5b15445e47..7d0407951d869dc673d6362999312e1dad00d9a4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1017,6 +1017,20 @@ public abstract class PlayerList {
@@ -1020,6 +1020,20 @@ public abstract class PlayerList {
}
// CraftBukkit end

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0009-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ index ffc7f4f4544df21b713b780eded8aeba4090db52..6cad742f0141ac0e4b4b5a1dd07874eb

private void updatePlayerAttributes() {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 301dc8ea0574f02f28067cda397683c7e7a6152f..ff97005181c2b55ffb2be6d19f27b34f26a2e20c 100644
index 3d1dc6d712f61de2a4927b3bf2973f75af24cf11..b958bfbe87b559417ec6241c14a91e09e0b583d4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2713,6 +2713,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2785,6 +2785,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0011-Barrels-and-enderchests-6-rows.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Barrels and enderchests 6 rows


diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 063ac25725543988332bdaf0c600e1f6c429943e..d52c598573d9ac470a39b5a6c47a2a6be3741a76 100644
index 7d0407951d869dc673d6362999312e1dad00d9a4..34179365c6ac7a3b19f9cd76a8522a597e380a4a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1142,6 +1142,27 @@ public abstract class PlayerList {
@@ -1145,6 +1145,27 @@ public abstract class PlayerList {
player.getBukkitEntity().recalculatePermissions(); // CraftBukkit
this.server.getCommands().sendCommands(player);
} // Paper - Add sendOpLevel API
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0013-AFK-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ index 6cad742f0141ac0e4b4b5a1dd07874eb7588e70f..fe0bbaec0a47305da244bbca7b9ce640
return this.stats;
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ff97005181c2b55ffb2be6d19f27b34f26a2e20c..cb9efbba91510d90fa4a7dbe01fa6e9ba8206612 100644
index b958bfbe87b559417ec6241c14a91e09e0b583d4..0ec1a50485ce0107fe1983fd079be850b2341d46 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -332,6 +332,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down Expand Up @@ -115,7 +115,7 @@ index ff97005181c2b55ffb2be6d19f27b34f26a2e20c..cb9efbba91510d90fa4a7dbe01fa6e9b
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
}
@@ -649,6 +669,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -658,6 +678,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();

Expand All @@ -124,7 +124,7 @@ index ff97005181c2b55ffb2be6d19f27b34f26a2e20c..cb9efbba91510d90fa4a7dbe01fa6e9b
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.cserver.getPluginManager().callEvent(event);
@@ -1450,7 +1472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1485,7 +1507,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
movedWrongly = true;
if (event.getLogWarning())
// Paper end
Expand All @@ -133,7 +133,7 @@ index ff97005181c2b55ffb2be6d19f27b34f26a2e20c..cb9efbba91510d90fa4a7dbe01fa6e9b
} // Paper
}

@@ -1508,6 +1530,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1553,6 +1575,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0045-Add-permission-for-F3-N-debug.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for F3+N debug


diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d52c598573d9ac470a39b5a6c47a2a6be3741a76..105688ba795676a0612969f89668c9c8bda48f54 100644
index 34179365c6ac7a3b19f9cd76a8522a597e380a4a..d13270623d0630f94c7911bd8a544f1ee9449b17 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1134,6 +1134,7 @@ public abstract class PlayerList {
@@ -1137,6 +1137,7 @@ public abstract class PlayerList {
} else {
b0 = (byte) (24 + permissionLevel);
}
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0071-Allow-color-codes-in-books.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Allow color codes in books


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cb9efbba91510d90fa4a7dbe01fa6e9ba8206612..7a2bc00ee456caf48d3261f065fb1c9e760b813b 100644
index 0ec1a50485ce0107fe1983fd079be850b2341d46..efaa369dc1a01e4e40bec8a6a5562e7c1822b1ac 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1199,10 +1199,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1233,10 +1233,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Objects.requireNonNull(list);
stream.forEach(list::add);
Expand All @@ -25,7 +25,7 @@ index cb9efbba91510d90fa4a7dbe01fa6e9ba8206612..7a2bc00ee456caf48d3261f065fb1c9e
};

this.filterTextPacket((List) list).thenAcceptAsync(consumer, this.server);
@@ -1210,13 +1214,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1244,13 +1248,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}

private void updateBookContents(List<FilteredText> pages, int slotId) {
Expand All @@ -45,7 +45,7 @@ index cb9efbba91510d90fa4a7dbe01fa6e9ba8206612..7a2bc00ee456caf48d3261f065fb1c9e

itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1));
this.player.getInventory().setItem(slotId, CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
@@ -1224,6 +1233,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1258,6 +1267,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}

private void signBook(FilteredText title, List<FilteredText> pages, int slotId) {
Expand All @@ -57,7 +57,7 @@ index cb9efbba91510d90fa4a7dbe01fa6e9ba8206612..7a2bc00ee456caf48d3261f065fb1c9e
ItemStack itemstack = this.player.getInventory().getItem(slotId);

if (itemstack.is(Items.WRITABLE_BOOK)) {
@@ -1231,10 +1245,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1265,10 +1279,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

itemstack1.remove(DataComponents.WRITABLE_BOOK_CONTENT);
List<Filterable<Component>> list1 = (List<Filterable<Component>>) (List) pages.stream().map((filteredtext1) -> { // CraftBukkit - decompile error
Expand All @@ -70,7 +70,7 @@ index cb9efbba91510d90fa4a7dbe01fa6e9ba8206612..7a2bc00ee456caf48d3261f065fb1c9e
CraftEventFactory.handleEditBookEvent(this.player, slotId, itemstack, itemstack1); // CraftBukkit
this.player.getInventory().setItem(slotId, itemstack); // CraftBukkit - event factory updates the hand book
}
@@ -1244,6 +1258,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1278,6 +1292,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return this.player.isTextFilteringEnabled() ? Filterable.passThrough(message.filteredOrEmpty()) : Filterable.from(message);
}

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


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 7a2bc00ee456caf48d3261f065fb1c9e760b813b..f71219cc6805c214a130643144c02332d0df5750 100644
index efaa369dc1a01e4e40bec8a6a5562e7c1822b1ac..1121011d188db81be723e12fa734c3659d993176 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2748,6 +2748,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2820,6 +2820,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
AABB axisalignedbb = entity.getBoundingBox();

if (this.player.canInteractWithEntity(axisalignedbb, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(1.0D))) { // Paper - configurable lenience value for interact range
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0117-PlayerBookTooLargeEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerBookTooLargeEvent


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f71219cc6805c214a130643144c02332d0df5750..e327b9400bf29b6712e6d559f174cd31238db515 100644
index 1121011d188db81be723e12fa734c3659d993176..1662892485ec26e191dd21c14b8e8aae87afac41 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1153,6 +1153,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1187,6 +1187,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
int maxBookPageSize = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D);
long byteAllowed = maxBookPageSize;
Expand All @@ -19,7 +19,7 @@ index f71219cc6805c214a130643144c02332d0df5750..e327b9400bf29b6712e6d559f174cd31
for (String testString : pageList) {
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
byteTotal += byteLength;
@@ -1174,7 +1178,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1208,7 +1212,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}

if (byteTotal > byteAllowed) {
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0129-Dont-run-with-scissors.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Dont run with scissors!
inspired by https://modrinth.com/mod/dont-run-with-scissors

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e327b9400bf29b6712e6d559f174cd31238db515..435ab19d1fad30cd75aa705861760674b09ea0ac 100644
index 1662892485ec26e191dd21c14b8e8aae87afac41..65cac2fa564071f5dc3d67b320825b24f6976626 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1605,6 +1605,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1650,6 +1650,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.tryResetCurrentImpulseContext();
}

Expand All @@ -23,7 +23,7 @@ index e327b9400bf29b6712e6d559f174cd31238db515..435ab19d1fad30cd75aa705861760674
this.player.checkMovementStatistics(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5);
this.lastGoodX = this.player.getX();
this.lastGoodY = this.player.getY();
@@ -1632,6 +1639,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1677,6 +1684,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}

Expand All @@ -35,9 +35,9 @@ index e327b9400bf29b6712e6d559f174cd31238db515..435ab19d1fad30cd75aa705861760674
+ }
+ // Purpur end
+
private boolean isPlayerCollidingWithAnythingNew(LevelReader world, AABB box, double newX, double newY, double newZ) {
AABB axisalignedbb1 = this.player.getBoundingBox().move(newX - this.player.getX(), newY - this.player.getY(), newZ - this.player.getZ());
Iterable<VoxelShape> iterable = world.getCollisions(this.player, axisalignedbb1.deflate(9.999999747378752E-6D));
// Paper start - optimise out extra getCubes
private boolean hasNewCollision(final ServerLevel world, final Entity entity, final AABB oldBox, final AABB newBox) {
final List<AABB> collisionsBB = new java.util.ArrayList<>();
diff --git a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java b/src/main/java/net/minecraft/world/damagesource/CombatTracker.java
index 99a7e9eb75231c15bd8bb24fbb4e296bc9fdedff..a375d40ec6365ba8704ba3ece22dd5b2de9857b5 100644
--- a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0183-Store-placer-on-Block-when-placed.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index 3e29f00366511d88c90048ba8017a1de6dc87ebf..f9b1072c794b995781390af7ea542dd4
world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
}
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index a7108b2be0746aa1f0e574d8c6f5ffad6d369835..57595a781a3cbdd8575c4af36328684ce7fc28d9 100644
index 29947de9eb6887f2e61516523ff08d8b581b0f53..5dd4ccde6c4c421f697f629adb1adfadce7b8a42 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -438,7 +438,17 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -437,7 +437,17 @@ public class Block extends BlockBehaviour implements ItemLike {
} // Paper - fix drops not preventing stats/food exhaustion
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ index fe734df8b4521101c3e55c042957a531b3bdf945..7c06b284a6cc74c0b31f8921706c7796
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 435ab19d1fad30cd75aa705861760674b09ea0ac..4db8975e8cb786042239c19f81c9b7f4637d010d 100644
index 65cac2fa564071f5dc3d67b320825b24f6976626..8a0994bdc31b2a328a18a1d62cb99d1708976f65 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1999,6 +1999,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2071,6 +2071,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

boolean cancelled;
if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
Expand Down
Loading

0 comments on commit f2307b8

Please sign in to comment.