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@afb5b13 Replace SimpleRandom with (Simple)ThreadUnsafeRandom
PaperMC/Paper@d38624b Do not call modifyEntityTrackingRange on own range
PaperMC/Paper@cb2ab7d Remove string dupe exploit setting (#11670)
PaperMC/Paper@5f6a796 deprecate adventure key() methods where applicable
PaperMC/Paper@78fd8f9 Copy items when constructing ClientboundSetCursorItemPacket
PaperMC/Paper@0cc7bd4 Use Player view distance for PlayerNaturallySpawnCreaturesEvent
  • Loading branch information
granny committed Nov 28, 2024
1 parent 2b6f273 commit 504f311
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 49 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.3-R0.1-SNAPSHOT

mcVersion = 1.21.3
paperCommit = 7e789e8376b855e0c25fbbf23cf957daf24aa577
paperCommit = 0cc7bd485760dd0abd387f64d193ffef7aa019ee

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
16 changes: 8 additions & 8 deletions patches/server/0007-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ index c26e3a239441376f2694782d4f07943538677c71..5cd3d7b30a8dea820d0e9569219cbc58
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 957cae6ddeba9efe3b55588567ae51e8b86b6a42..32339a18345feddb49cffe5ed1f18a2bfaf931ba 100644
index b4027f5cf90935a1fe3ab2c28b0bcbb55a7b541b..4c4729292a6b0665412bdea1c1c70af6b4867b74 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -231,6 +231,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
Expand All @@ -46,7 +46,7 @@ index 957cae6ddeba9efe3b55588567ae51e8b86b6a42..32339a18345feddb49cffe5ed1f18a2b
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9dbf86a365b37bf3fcbf901e5dee5821648288d0..84dd32c83d05708acc4ffea1ed358697f320ecbe 100644
index 785ea646cbefb8dc1e22a57bc3a18cdbee440e06..749145ac5ee84b5ebbf4b1eba2df680c1c51bd88 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1033,6 +1033,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand All @@ -66,7 +66,7 @@ index 9dbf86a365b37bf3fcbf901e5dee5821648288d0..84dd32c83d05708acc4ffea1ed358697

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 b5d5dbc50a7b8c40739a15f164ffd08fdc534f9c..5d322e613a0116057373a3c9d7125620c63b43d7 100644
index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..52eb9238965a1c1522b2c523d48ac63e0db5d3d1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2821,6 +2821,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand All @@ -79,10 +79,10 @@ index b5d5dbc50a7b8c40739a15f164ffd08fdc534f9c..5d322e613a0116057373a3c9d7125620
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
entity.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ed5b00620527c1776722d25b1b45f1544802a341..697c8c8fd0cdca4bb8bc3db62f7de8999785ec1e 100644
index a15546e433ebba6c0de01bdaaef201a3d99a87b5..b265a9c8b89c0026b6e74fc8aba10f4c03ca1750 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -384,7 +384,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -340,7 +340,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
private final Set<String> tags;
private final double[] pistonDeltas;
private long pistonDeltasGameTime;
Expand All @@ -91,7 +91,7 @@ index ed5b00620527c1776722d25b1b45f1544802a341..697c8c8fd0cdca4bb8bc3db62f7de899
private float eyeHeight;
public boolean isInPowderSnow;
public boolean wasInPowderSnow;
@@ -3338,6 +3338,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3294,6 +3294,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list);
}

Expand All @@ -105,7 +105,7 @@ index ed5b00620527c1776722d25b1b45f1544802a341..697c8c8fd0cdca4bb8bc3db62f7de899
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
}
}
@@ -3377,6 +3384,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3333,6 +3340,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false;
}
// CraftBukkit end
Expand All @@ -120,7 +120,7 @@ index ed5b00620527c1776722d25b1b45f1544802a341..697c8c8fd0cdca4bb8bc3db62f7de899
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
this.passengers = ImmutableList.of();
} else {
@@ -5369,4 +5384,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -5325,4 +5340,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((net.minecraft.server.level.ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Add option to set armorstand step height


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 90a51b05c80d079af07133a3e509aada57927a26..1e639ab3e48d884ee6e2c33be85dde51e24183b6 100644
index 99ac631aaa51ab67b5f3356175656c81add3c637..80160d15c9dd62e2a0fba0ad7787b3a5069c7279 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -344,6 +344,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -300,6 +300,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public double xOld;
public double yOld;
public double zOld;
+ public float maxUpStep; // Purpur
public boolean noPhysics;
private boolean wasOnFire;
public final RandomSource random;
@@ -5183,7 +5184,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -5139,7 +5140,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}

public float maxUpStep() {
Expand All @@ -38,7 +38,7 @@ index 70b8023c3badc745f342d5b0ab54699e3923826a..edb0cd90e28016c44b0aaf5c9ed5d7bd
if (!this.canTick) {
if (this.noTickPoseDirty) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 924a7269883e57f4ae4fc97b6f2ba24a922515c0..e3eb27c4be24ed01b3d86be7b8160f47893ca44c 100644
index dcc8e4880c1bfff1abdc1b542000d61e3378d4f1..149360f01139fa4b14e27e5b34fe3fe7682c7ffc 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -91,6 +91,11 @@ public class PurpurWorldConfig {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0048-Allow-leashing-villagers.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Allow leashing villagers


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1e639ab3e48d884ee6e2c33be85dde51e24183b6..75b0a66be9f94c82a02f714860ae8bee323db2a3 100644
index 80160d15c9dd62e2a0fba0ad7787b3a5069c7279..f2d580e9325497cf339b7c1dc043d40bd06ab00d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3134,6 +3134,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3090,6 +3090,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0053-Add-canSaveToDisk-to-Entity.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add canSaveToDisk to Entity


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 75b0a66be9f94c82a02f714860ae8bee323db2a3..77870857cb0207ad0da7a276a55d9eebac43b45c 100644
index f2d580e9325497cf339b7c1dc043d40bd06ab00d..afa4d11c44e2159dfad080c6a45256e9b66fa18c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -613,6 +613,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -569,6 +569,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
// Paper end - optimise entity tracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Stop squids floating on top of water


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 77870857cb0207ad0da7a276a55d9eebac43b45c..ea9d118f99a62004db8fc093ff67794a1ec99ac9 100644
index afa4d11c44e2159dfad080c6a45256e9b66fa18c..3e16f8ec52ff60f696a4a29dfbb9217b0c29106b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4789,6 +4789,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4745,6 +4745,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Mth.lerp(delta, this.yRotO, this.yRot);
}

Expand Down
8 changes: 4 additions & 4 deletions patches/server/0084-Entities-can-use-portals.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Entities can use portals


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ea9d118f99a62004db8fc093ff67794a1ec99ac9..2add41657b8f868bcd4755ca843e457b8dfc7ef0 100644
index 3e16f8ec52ff60f696a4a29dfbb9217b0c29106b..59000a7519071010d03063359c4508426753fe7c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3482,7 +3482,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3438,7 +3438,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void setAsInsidePortal(Portal portal, BlockPos pos) {
if (this.isOnPortalCooldown()) {
this.setPortalCooldown();
Expand All @@ -17,7 +17,7 @@ index ea9d118f99a62004db8fc093ff67794a1ec99ac9..2add41657b8f868bcd4755ca843e457b
if (this.portalProcess != null && this.portalProcess.isSamePortal(portal)) {
if (!this.portalProcess.isInsidePortalThisTick()) {
this.portalProcess.updateEntryPosition(pos.immutable());
@@ -4201,7 +4201,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4157,7 +4157,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end

public boolean canUsePortal(boolean allowVehicles) {
Expand All @@ -27,7 +27,7 @@ index ea9d118f99a62004db8fc093ff67794a1ec99ac9..2add41657b8f868bcd4755ca843e457b

public boolean canTeleport(Level from, Level to) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index ff41df1aefb9c0062af302251e97fad101a7cef3..478756e5e1f5e2fe4878715687d7d6e7d4b10128 100644
index b04c1c2534bec8f2eee873b43969843f54644dca..a28548332baf610521a308a560a858b3fc737b60 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -101,12 +101,14 @@ public class PurpurWorldConfig {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0120-Movement-options-for-armor-stands.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2add41657b8f868bcd4755ca843e457b8dfc7ef0..9d8c26a59b23e8c3cf82168b3716280cfb380f43 100644
index 59000a7519071010d03063359c4508426753fe7c..41237e06a0053b0a61af83b4c1d7cb4d18825884 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2058,7 +2058,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2014,7 +2014,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.isInWater() || flag;
}

Expand Down Expand Up @@ -66,7 +66,7 @@ index 12ff824ffa81ea45f76337ec2b6d80b01047b698..c954cb3255145e18e8ab1e5a1b0267b8
+ // Purpur end
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index d77285976271ebd60892646e3050d947a2becc69..0e6c36fafdf5f12d80340daf1c967f9700ec4ad7 100644
index 3739561c633627ba3fe80f89bce84a243705f4bc..86b27b11f178be0cc05842ccb3ffe4ef14196855 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -100,10 +100,16 @@ public class PurpurWorldConfig {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0121-Fix-stuck-in-portals.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fix stuck in portals


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 6ffb7d0c9c6c7410af9efaf899296a8cb74ee105..ab14a199a588cec0d7df92e55fee596aeebde6f0 100644
index 80426ba728016273990f00db638ea327b75c1883..70a82e80d686337cbe19365ec2d858fedc1d2b77 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1687,6 +1687,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand All @@ -17,10 +17,10 @@ index 6ffb7d0c9c6c7410af9efaf899296a8cb74ee105..ab14a199a588cec0d7df92e55fee596a
this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9d8c26a59b23e8c3cf82168b3716280cfb380f43..d61840da8edad607b6bb3e0b6e168417e4c59f23 100644
index 41237e06a0053b0a61af83b4c1d7cb4d18825884..e613dd28453795184049e7dfcf2ce9e9e978c5ca 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3479,14 +3479,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3435,14 +3435,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Vec3.directionFromRotation(this.getRotationVector());
}

Expand All @@ -39,7 +39,7 @@ index 9d8c26a59b23e8c3cf82168b3716280cfb380f43..d61840da8edad607b6bb3e0b6e168417
} else {
this.portalProcess = new PortalProcessor(portal, pos.immutable());
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 0e6c36fafdf5f12d80340daf1c967f9700ec4ad7..2a0a5cd3952db6e519c3d9cda3310eb06f347451 100644
index 86b27b11f178be0cc05842ccb3ffe4ef14196855..126d2689166579785735cf250ddf0838512ce81b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -327,6 +327,7 @@ public class PurpurWorldConfig {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0140-Drowning-Settings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Drowning Settings


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d61840da8edad607b6bb3e0b6e168417e4c59f23..b4668e9f49aba4ae68c7d51a37f26c9bf754accc 100644
index e613dd28453795184049e7dfcf2ce9e9e978c5ca..7751488ea7c2ebce1b51567e144e519781f2d060 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3706,7 +3706,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3662,7 +3662,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}

public int getMaxAirSupply() {
Expand All @@ -18,7 +18,7 @@ index d61840da8edad607b6bb3e0b6e168417e4c59f23..b4668e9f49aba4ae68c7d51a37f26c9b

public int getAirSupply() {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 713b84c2c07145febc1e5cf4af833dd8f5f1588e..34aca945029f061ca21e8b3e0a2bde490140dd54 100644
index c348aacb203ca913f6d12b64c611debef8fb27f5..1fa230d9f87819359a13cb2970b95c3088a7c718 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -491,7 +491,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand All @@ -40,7 +40,7 @@ index 713b84c2c07145febc1e5cf4af833dd8f5f1588e..34aca945029f061ca21e8b3e0a2bde49
}

diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 3584b2ce21c1b6219acf2321065ca4eba85efff0..360a2e2a2b8849b3f792c93f2f0b4802abe732f6 100644
index e6096491e26d5ad7df5f1d626a14c771662d2898..0f8348bedaf101fa9b9d50c3288aec0953cb56f6 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -165,6 +165,15 @@ public class PurpurWorldConfig {
Expand Down
Loading

0 comments on commit 504f311

Please sign in to comment.