Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@7b66699b 26.2-rc-2
PaperMC/Paper@bb676e22 actual 26.2-rc-2
PaperMC/Paper@a737972b Fix isAllowedInPeaceful call
PaperMC/Paper@c35810c3 Update deps to match Vanilla
PaperMC/Paper@e5643cd4 Update Vex#getSummoner return type
PaperMC/Paper@e00936a3 [ci/skip] update log4j for the api
PaperMC/Paper@eb5df78f fix wither spawning parity and remove openSign var
PaperMC/Paper@d1aca9a6 Apply most remaining feature patches
This commit is contained in:
granny
2026-06-12 17:35:54 -07:00
parent 779f1f2613
commit 0c913568e6
42 changed files with 274 additions and 287 deletions

View File

@@ -7,7 +7,7 @@
## Purpur
[![MIT License](https://img.shields.io/github/license/PurpurMC/Purpur?&logo=github)](LICENSE)
[![Build Status](https://img.shields.io/github/actions/workflow/status/PurpurMC/Purpur/build.yml?branch=ver%2F26.1.2&event=push&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE0clJ0UVK/F9SaBHjwXE/3t173L0D/PUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5/i6h4+vdzGe5X3uz9Gj5EwG+ATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6/cS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q+Uqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId/wPGL5JLJVQIjxwIqUCE5fvA/+N2tmZ8Yd5NCcaDzxbY/hoGuXaBRs+3vY9tunACBZ+BKa/krdWD6k/RaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0/fk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO/t3zPN/n4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMWBjFhOpnxAAACyklEQVQ4y32TXWgdZRCGn8k5Z3e/bzcJRFuoDRqIIPGniaSl1qgXKYhiLUgleFESW1qQ4g94oVKQJmga0ILRBuvfheJFIbY3SmzRFsWgQrTQFlRoKSVXgcMxJiS7++1ukvHiNKGU6FzNDO8MMw8zwn9Yz5c6anKeChxiMk599aq8sZ5Obk3sGNd7G5aZCHJ+Oj8gAwD9I3rSJmyvzLHz+HG5frO+vOaNa3NXiUkKQj9hQ1jQgWrlyCCV6gIdtmBjoJwbPqgL+R08PDQkCUADwD0TerqzxFTJY++vz0l7c0q/F7P5+aNUqyvM2CU2RAV7hsek3XPs3/QHF7/YrSfrDVQrxrErdESNNTYByAp3NmWUTYaGGSuho+QltAGYRdqilChMeKbO4Ijang5+CVJmbcr20PG3n9NiY6ZOvCW9ACMHdDLIeDDIqTWmtAQJV6OMyhOTsqWBQQo/hvP7pFcWeDxwtAQxGqbEq3isI7EOjRy3NyuPPHtOur0UXWMQZXgAX78uP3sJpTBmyHfsGDmotdF+rQWObq/gnSCm9PQ3chnA3qgRgL5jmjXlTM/n7Ny8yJXRY2IA3tur0yaHF8blLoAzj2kaNNBpZvk2iGntuiZBHWLOtXJC3hbzV5SxtDq6yZmzCXOrsRezHNa4YBzlKGN6bQXryD96W+4PU14zGbw/oLMf79EPbAI2g7M9+smP3fqPKVAT81LnFWnzM1y9gYC9gWtwTD6MEsq+Y8Lm7DMZ7cZxt5/T5xd8Fy5SfuC6fA4QZjdd8eEX9eLwAZ1StHKiT1MARStnHtWZH7bpjKIVgKutmipq50O94Mr6+9oKR8ekyy7x5qd9/NmYslynK4WfUjWOqiAFgElZmY+41BTzcrAkW9d9ptO9etgU7I8S3vVyDtkY/JzPwoxXzCJjt6Uy+r/fuGq/3affezkPRSniJ0y2zsqT6+n+BfRHKWgwbKNIAAAAAElFTkSuQmCC)](https://purpurmc.org/downloads/)
[![Build Status](https://img.shields.io/github/actions/workflow/status/PurpurMC/Purpur/build.yml?branch=ver%2F26.2&event=push&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE0clJ0UVK/F9SaBHjwXE/3t173L0D/PUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5/i6h4+vdzGe5X3uz9Gj5EwG+ATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6/cS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q+Uqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId/wPGL5JLJVQIjxwIqUCE5fvA/+N2tmZ8Yd5NCcaDzxbY/hoGuXaBRs+3vY9tunACBZ+BKa/krdWD6k/RaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0/fk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO/t3zPN/n4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMWBjFhOpnxAAACyklEQVQ4y32TXWgdZRCGn8k5Z3e/bzcJRFuoDRqIIPGniaSl1qgXKYhiLUgleFESW1qQ4g94oVKQJmga0ILRBuvfheJFIbY3SmzRFsWgQrTQFlRoKSVXgcMxJiS7++1ukvHiNKGU6FzNDO8MMw8zwn9Yz5c6anKeChxiMk599aq8sZ5Obk3sGNd7G5aZCHJ+Oj8gAwD9I3rSJmyvzLHz+HG5frO+vOaNa3NXiUkKQj9hQ1jQgWrlyCCV6gIdtmBjoJwbPqgL+R08PDQkCUADwD0TerqzxFTJY++vz0l7c0q/F7P5+aNUqyvM2CU2RAV7hsek3XPs3/QHF7/YrSfrDVQrxrErdESNNTYByAp3NmWUTYaGGSuho+QltAGYRdqilChMeKbO4Ijang5+CVJmbcr20PG3n9NiY6ZOvCW9ACMHdDLIeDDIqTWmtAQJV6OMyhOTsqWBQQo/hvP7pFcWeDxwtAQxGqbEq3isI7EOjRy3NyuPPHtOur0UXWMQZXgAX78uP3sJpTBmyHfsGDmotdF+rQWObq/gnSCm9PQ3chnA3qgRgL5jmjXlTM/n7Ny8yJXRY2IA3tur0yaHF8blLoAzj2kaNNBpZvk2iGntuiZBHWLOtXJC3hbzV5SxtDq6yZmzCXOrsRezHNa4YBzlKGN6bQXryD96W+4PU14zGbw/oLMf79EPbAI2g7M9+smP3fqPKVAT81LnFWnzM1y9gYC9gWtwTD6MEsq+Y8Lm7DMZ7cZxt5/T5xd8Fy5SfuC6fA4QZjdd8eEX9eLwAZ1StHKiT1MARStnHtWZH7bpjKIVgKutmipq50O94Mr6+9oKR8ekyy7x5qd9/NmYslynK4WfUjWOqiAFgElZmY+41BTzcrAkW9d9ptO9etgU7I8S3vVyDtkY/JzPwoxXzCJjt6Uy+r/fuGq/3affezkPRSniJ0y2zsqT6+n+BfRHKWgwbKNIAAAAAElFTkSuQmCC)](https://purpurmc.org/downloads/)
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/PurpurMC/Purpur?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx%2BLVQcXZ10dXAVB8APE0clJ0UVK%2FF9SaBHjwXE%2F3t173L0D%2FPUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5%2Fi6h4%2BvdzGe5X3uz9Gj5EwG%2BATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6%2FcS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q%2BUqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId%2FwPGL5JLJVQIjxwIqUCE5fvA%2F%2BN2tmZ8Yd5NCcaDzxbY%2FhoGuXaBRs%2B3vY9tunACBZ%2BBKa%2FkrdWD6k%2FRaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0%2Ffk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO%2Ft3zPN%2Fn4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMVKAA5pS6%2BAAABlElEQVQ4y82PP2gVQRDGf7N3t%2Bvdixpi0N5OELFKJ1iohBciKlgYJLX6YkBbC0sVooVFBAvBPw%2BFZzrJs7DR2iYHRhBsxNI8VLwUx92MRXJGxKCp9AfL7DfDfPutFO3z5wy5DuRlWU2OvLj7hduLYXh0ZSEkOh4SjUKiBK%2BEZP34Gu%2FtbebLE86Qa8BO4FDwyWmAbPjzMWACiNgEMdun6macwfJ6z2qxZYBI6ndAxR%2BRN%2FL1ZGeXlDqFkm%2Fv33nZjHZ0u2OZrw%2F7pBYf16Re8UEJ8VpNE33fP3BxgX%2BOFOOdtjmuGpoPtT51pNcrMZORx4%2FmslQnslAlWahItymZrz%2Bmqc4%2B2z%2B71BjE5uwesEeQsaLY%2FQp42LrfPUqwy2DNO03ZK9hN4Ehj4IDBjzjKCoC5aMDG9q%2BhBz%2BrWCN3KqptBtG89Xx%2BEWB1%2Bszr8OTBFMgkSLKWQAA%2BVCU3%2BK%2BQb%2B0LB4FLGHmrP39LNv3773Ei9IBphLnVduf4VhM4M9JGqGzc%2F5bYnDsrqlcQloaK0adbNfgOUn6NRlZZ46YAAAAASUVORK5CYII%3D)](https://www.codefactor.io/repository/github/PurpurMC/Purpur)
[![Join us on Discord](https://discord.com/api/guilds/685683385313919172/widget.png?style=shield)](https://purpurmc.org/discord)
@@ -67,7 +67,7 @@ Maven
<dependency>
<groupId>org.purpurmc.purpur</groupId>
<artifactId>purpur-api</artifactId>
<version>[26.1.2.build,)</version>
<version>[26.2.build,)</version>
<scope>provided</scope>
</dependency>
```
@@ -80,7 +80,7 @@ repositories {
```
```kotlin
dependencies {
compileOnly("org.purpurmc.purpur:purpur-api:26.1.2.build.+")
compileOnly("org.purpurmc.purpur:purpur-api:26.2.build.+")
}
```

View File

@@ -1,9 +1,9 @@
group = org.purpurmc.purpur
mcVersion = 26.2-pre-5
mcVersion = 26.2-rc-2
apiVersion = 26.2
channel=EXPERIMENTAL
paperCommit = 6631e645f66503e1ff90b71d0288156063a7056b
paperCommit = d1aca9a6c1057bd291255d3e2252dbf04992e410
org.gradle.configuration-cache = true
org.gradle.caching = true

View File

@@ -18,19 +18,19 @@ index ec6dd9de7b82841b1403b1bb851392132be5275b..146c404ac0471ed7df6d3740859663aa
public boolean isClientAuthoritative() {
return false;
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index b145362e0c12e77eb582f7339363971a904622e7..fcade65785db82fc64eeb9b337900a405f05d196 100644
index a45518c47e178540d186c6ac530e7f26fae7edc9..8a5c7ac71613316951f0c9b32f8beab9300e63f6 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1746,6 +1746,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1865,6 +1865,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
for (ServerLevel level : this.getAllLevels()) {
level.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
level.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
+ level.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur - Ridables
level.updateLagCompensationTick(); // Paper - lag compensation
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = level.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
profiler.push(() -> level + " " + level.dimension().identifier());
profiler.push("tick");
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index f220993206a4ea36d2fdf4f053af2b34ccc3beba..3d328c1871993b5e55eb2892364d66b79db22338 100644
index f7e3e4c84a4a9d37834ddbadc2df80eb0ee4c3fc..0bb1ea204c012fc6e65c50454f3387b92b551cc6 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -237,6 +237,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -42,10 +42,10 @@ index f220993206a4ea36d2fdf4f053af2b34ccc3beba..3d328c1871993b5e55eb2892364d66b7
@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index cd3221273750b8d824e49cd472e8f05dffc5f457..119530367e7bd7f99160d8a8b8b6c1f757c3bd01 100644
index d1a126b6a34c48a3218b14e7b6fc30c30bce8e8a..4a9297f43e33df1838ad75543ec0080c833fb078 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -749,6 +749,15 @@ public class ServerPlayer extends Player {
@@ -784,6 +784,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
this.trackEnteredOrExitedLavaOnVehicle();
this.updatePlayerAttributes();
this.advancements.flushDirty(this, true);
@@ -62,10 +62,10 @@ index cd3221273750b8d824e49cd472e8f05dffc5f457..119530367e7bd7f99160d8a8b8b6c1f7
private void updatePlayerAttributes() {
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e9364611059653bd4c37cb75571bb53225cf5d94..5a814aa9df95fbbbff5d3c3bda4b76d04440e624 100644
index e383c953df7569e2536a968c851b234e33b88813..45a509558d10825df46c521804611f809828958b 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2940,6 +2940,8 @@ public class ServerGamePacketListenerImpl
@@ -3013,6 +3013,8 @@ public class ServerGamePacketListenerImpl
ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
final boolean resendData = event.isCancelled() || !ServerGamePacketListenerImpl.this.player.getItemInHand(hand).is(itemType);
@@ -75,10 +75,10 @@ index e9364611059653bd4c37cb75571bb53225cf5d94..5a814aa9df95fbbbff5d3c3bda4b76d0
if (itemType == Items.WATER_BUCKET && target instanceof net.minecraft.world.entity.Bucketable && target instanceof LivingEntity && resendData) {
target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 3b558c80ee8ebc03fb68d63c86f4371617057d7f..6b51feb4e41f10dae9e5fcd303d260d5f511ae91 100644
index d7bcaa9366c8b88d70778adb08b57046878af789..8ca29762d465ba8ebeaa450bd6e1c4f77db5464c 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3223,6 +3223,13 @@ public abstract class Entity
@@ -3463,6 +3463,13 @@ public abstract class Entity
this.passengers = ImmutableList.copyOf(newPassengers);
}
@@ -92,7 +92,7 @@ index 3b558c80ee8ebc03fb68d63c86f4371617057d7f..6b51feb4e41f10dae9e5fcd303d260d5
}
// Paper start - Force entity dismount during teleportation
@@ -3263,6 +3270,14 @@ public abstract class Entity
@@ -3503,6 +3510,14 @@ public abstract class Entity
return false;
}
// CraftBukkit end
@@ -107,7 +107,7 @@ index 3b558c80ee8ebc03fb68d63c86f4371617057d7f..6b51feb4e41f10dae9e5fcd303d260d5
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of();
} else {
@@ -5227,4 +5242,44 @@ public abstract class Entity
@@ -5490,4 +5505,44 @@ public abstract class Entity
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
}
// Paper end
@@ -153,7 +153,7 @@ index 3b558c80ee8ebc03fb68d63c86f4371617057d7f..6b51feb4e41f10dae9e5fcd303d260d5
+ // Purpur end - Ridables
}
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 225cf2d48b15f4787e493d0c2f332cfdb313978f..2d856ba2ce8c6febdc1d5dd2df2718fbe4e1312d 100644
index f80bf4e822b67e3fd655c72d7f1fa601e45c51a8..a714d12aa9f8b3b36d0cf334c744dd7751cb68b3 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -258,9 +258,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -186,7 +186,7 @@ index 225cf2d48b15f4787e493d0c2f332cfdb313978f..2d856ba2ce8c6febdc1d5dd2df2718fb
@Override
protected void checkFallDamage(final double ya, final boolean onGround, final BlockState onState, final BlockPos pos) {
@@ -3202,6 +3203,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -3159,6 +3160,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
this.move(MoverType.SELF, this.getDeltaMovement());
this.setDeltaMovement(this.getDeltaMovement().scale(0.5));
} else {
@@ -207,7 +207,7 @@ index 225cf2d48b15f4787e493d0c2f332cfdb313978f..2d856ba2ce8c6febdc1d5dd2df2718fb
this.moveRelative(airSpeed, input);
this.move(MoverType.SELF, this.getDeltaMovement());
this.setDeltaMovement(this.getDeltaMovement().scale(0.91F));
@@ -3930,8 +3945,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -3887,8 +3902,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
this.pushEntities();
profiler.pop();
// Paper start - Add EntityMoveEvent
@@ -220,7 +220,7 @@ index 225cf2d48b15f4787e493d0c2f332cfdb313978f..2d856ba2ce8c6febdc1d5dd2df2718fb
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
@@ -3941,6 +3958,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -3898,6 +3915,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
this.absSnapTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
}
}
@@ -243,7 +243,7 @@ index 225cf2d48b15f4787e493d0c2f332cfdb313978f..2d856ba2ce8c6febdc1d5dd2df2718fb
// Paper end - Add EntityMoveEvent
if (this.level() instanceof ServerLevel serverLevel && this.isSensitiveToWater() && this.isInWaterOrRain()) {
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index 85cb2e946f3f2e51b7697af78b9f9939bc5f99c8..c707a18175920b12b4d554d8041c7afe10a0efd1 100644
index 40480b578035af29f510ec5ef4611b1a33d1c394..a5885bc19fe469a0c810e241d570d9ab62295492 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -161,8 +161,8 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -257,7 +257,7 @@ index 85cb2e946f3f2e51b7697af78b9f9939bc5f99c8..c707a18175920b12b4d554d8041c7afe
this.jumpControl = new JumpControl(this);
this.bodyRotationControl = this.createBodyControl();
this.navigation = this.createNavigation(level);
@@ -614,6 +614,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -608,6 +608,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
}
}
} else {
@@ -265,7 +265,7 @@ index 85cb2e946f3f2e51b7697af78b9f9939bc5f99c8..c707a18175920b12b4d554d8041c7afe
this.igniteForSeconds(8.0F);
}
}
@@ -1400,7 +1401,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -1398,7 +1399,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
}
protected InteractionResult mobInteract(final Player player, final InteractionHand hand) {
@@ -274,7 +274,7 @@ index 85cb2e946f3f2e51b7697af78b9f9939bc5f99c8..c707a18175920b12b4d554d8041c7afe
}
protected void usePlayerItem(final Player player, final InteractionHand hand, final ItemStack itemStack) {
@@ -1749,4 +1750,58 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -1747,4 +1748,58 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
public float chargeSpeedModifier() {
return 1.0F;
}
@@ -517,7 +517,7 @@ index 5dd0c83e44eb68d90cda5743bc24d97044a02f6e..9861837c1d10e5ffe5dada9f4a75fb9a
BlockPos pos = this.blockPosition();
BlockPos above = pos.above();
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index 242628d88736ac1401e76ecf94fb3f97837fa67c..ca1f1d18b765db8d197f70977e0e175744b07ee4 100644
index 03627acb68d22232f6f6552ba4dfeeebe83152fd..408a0048686dd2f3b48dee53087504ffc4dfc42c 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -101,10 +101,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -583,7 +583,7 @@ index 242628d88736ac1401e76ecf94fb3f97837fa67c..ca1f1d18b765db8d197f70977e0e1757
profiler.pop();
profiler.push("allayActivityUpdate");
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index fbf3feec55deeeafa29c296722cf085ead1617db..e417fa354f22e3532d3bfda9c9ebfccfd4906bc6 100644
index c8c50683597a2314a3c0e72888d5d75dc73fb94a..0b98a358c03c72b89e6b644bf11fc361c25f517f 100644
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -93,6 +93,23 @@ public class Armadillo extends Animal {
@@ -809,7 +809,7 @@ index 57127335a3c68fbf9ac3d64a8504c6e271a5d532..8296a5a5935a77b01f4d11b102f3159d
protected void addAdditionalSaveData(final ValueOutput output) {
super.addAdditionalSaveData(output);
diff --git a/net/minecraft/world/entity/animal/chicken/Chicken.java b/net/minecraft/world/entity/animal/chicken/Chicken.java
index 36a34232cd48fa8f382d8f9b99308d2661d754b5..4a3d3ab6c9f52fd06107131f2564b196e7b42957 100644
index c646ab45fbfb4a5fd29b8ad4914cf115d2f674b5..b0191f605e6f5e7be78a44868bef1805fc2d005c 100644
--- a/net/minecraft/world/entity/animal/chicken/Chicken.java
+++ b/net/minecraft/world/entity/animal/chicken/Chicken.java
@@ -81,9 +81,27 @@ public class Chicken extends Animal {
@@ -841,7 +841,7 @@ index 36a34232cd48fa8f382d8f9b99308d2661d754b5..4a3d3ab6c9f52fd06107131f2564b196
this.goalSelector.addGoal(2, new BreedGoal(this, 1.0));
this.goalSelector.addGoal(3, new TemptGoal(this, 1.0, i -> i.is(ItemTags.CHICKEN_FOOD), false));
diff --git a/net/minecraft/world/entity/animal/cow/AbstractCow.java b/net/minecraft/world/entity/animal/cow/AbstractCow.java
index ff0ddd53fc7ebd870c0522a3c9e967c6be619aea..5325932b1e60dd40014d9043328404266c02e3bf 100644
index 43ad961d0921c07562d13d4cdb86e63cd9b564ea..242957c6f31aa1e050ae2c2e8c25652b0bab1d89 100644
--- a/net/minecraft/world/entity/animal/cow/AbstractCow.java
+++ b/net/minecraft/world/entity/animal/cow/AbstractCow.java
@@ -39,6 +39,7 @@ public abstract class AbstractCow extends Animal {
@@ -1541,7 +1541,7 @@ index f846e5c736baea99fe5e411e36cf56a074145752..d48f8dc3e806ffe767565158bcfa1763
return "entity.minecraft.tropical_fish.predefined." + index;
}
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
index 788b32b81fca696ed01d86789846f5043c2d56d4..aecbd2bddf4eeb365ccad8a85799f7fcd8b9f319 100644
index a8e09c33d3aafd18ad2b6b14a5ba0ac4d9f7f125..9edd4af22e009c8f131f42f0fcad56ef1e56903c 100644
--- a/net/minecraft/world/entity/animal/fox/Fox.java
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
@@ -161,6 +161,44 @@ public class Fox extends Animal {
@@ -1605,7 +1605,7 @@ index 788b32b81fca696ed01d86789846f5043c2d56d4..aecbd2bddf4eeb365ccad8a85799f7fc
this.targetSelector
.addGoal(
3,
@@ -1132,15 +1172,15 @@ public class Fox extends Animal {
@@ -1120,15 +1160,15 @@ public class Fox extends Animal {
}
}
@@ -1624,7 +1624,7 @@ index 788b32b81fca696ed01d86789846f5043c2d56d4..aecbd2bddf4eeb365ccad8a85799f7fc
}
}
@@ -1176,15 +1216,15 @@ public class Fox extends Animal {
@@ -1164,15 +1204,15 @@ public class Fox extends Animal {
}
}
@@ -1830,7 +1830,7 @@ index 0691d05d6ac63cf2dd6d6410ed7dc585bc02fa4b..6d81790bf42f7a580b95644f0f19c3dd
profiler.pop();
profiler.push("goatActivityUpdate");
diff --git a/net/minecraft/world/entity/animal/golem/CopperGolem.java b/net/minecraft/world/entity/animal/golem/CopperGolem.java
index 3feb7ed930e1d65e8fdfa761d3ede9104c158f2e..c27319adafa8089f098efde14989425a4715b260 100644
index 84dbcd50c605a44b55ece4a6f548ba7aa4381638..7953cac5741a5d3672e6b4bf624e1fc1c123a13a 100644
--- a/net/minecraft/world/entity/animal/golem/CopperGolem.java
+++ b/net/minecraft/world/entity/animal/golem/CopperGolem.java
@@ -112,6 +112,28 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab
@@ -1946,7 +1946,7 @@ index ea29222d152ec528a4c649712bf506e9c5176b0f..8c674f2f3a068e92b3975df8137912f4
float pitch = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
diff --git a/net/minecraft/world/entity/animal/golem/SnowGolem.java b/net/minecraft/world/entity/animal/golem/SnowGolem.java
index 1f6507dd9a815ac8b8f57138c96fb4ccba0b64b3..acb61a212f9240ccfa414770868c0fb3835c538a 100644
index 6ea5197affd9bdfc5a5abcd9ef94a244640e8554..8ec69bb91822bff6e7fe338f97d5bb8dbc2345f7 100644
--- a/net/minecraft/world/entity/animal/golem/SnowGolem.java
+++ b/net/minecraft/world/entity/animal/golem/SnowGolem.java
@@ -62,12 +62,31 @@ public class SnowGolem extends AbstractGolem implements RangedAttackMob, Shearab
@@ -2026,7 +2026,7 @@ index ee400d1bfd24cc738ca02c1ec50332d7cfc9c266..60c67b49d236fe1ad152b668083b6140
protected void ageBoundaryReached() {
if (this.isBaby()) {
diff --git a/net/minecraft/world/entity/animal/panda/Panda.java b/net/minecraft/world/entity/animal/panda/Panda.java
index 037beb367fd445d18461b84dca790ca579c00c95..f0b23d5f443a8f29ce98e16f0254425147599d8d 100644
index 4ed8dc9b97fe6319502f651a01d32e6eafa62718..1fee38fdb97678cbf4128962d69ffe57abe76d52 100644
--- a/net/minecraft/world/entity/animal/panda/Panda.java
+++ b/net/minecraft/world/entity/animal/panda/Panda.java
@@ -112,6 +112,32 @@ public class Panda extends Animal {
@@ -2078,7 +2078,7 @@ index 037beb367fd445d18461b84dca790ca579c00c95..f0b23d5f443a8f29ce98e16f02544251
this.targetSelector.addGoal(1, new Panda.PandaHurtByTargetGoal(this).setAlertOthers());
}
@@ -617,7 +645,7 @@ public class Panda extends Animal {
@@ -615,7 +643,7 @@ public class Panda extends Animal {
public InteractionResult mobInteract(final Player player, final InteractionHand hand) {
ItemStack interactionItemStack = player.getItemInHand(hand);
if (this.isScared()) {
@@ -2087,7 +2087,7 @@ index 037beb367fd445d18461b84dca790ca579c00c95..f0b23d5f443a8f29ce98e16f02544251
}
if (this.isOnBack()) {
@@ -663,7 +691,7 @@ public class Panda extends Animal {
@@ -659,7 +687,7 @@ public class Panda extends Animal {
return InteractionResult.SUCCESS_SERVER;
} else {
@@ -2096,7 +2096,7 @@ index 037beb367fd445d18461b84dca790ca579c00c95..f0b23d5f443a8f29ce98e16f02544251
}
}
@@ -970,15 +998,15 @@ public class Panda extends Animal {
@@ -966,15 +994,15 @@ public class Panda extends Animal {
}
}
@@ -2116,7 +2116,7 @@ index 037beb367fd445d18461b84dca790ca579c00c95..f0b23d5f443a8f29ce98e16f02544251
}
}
diff --git a/net/minecraft/world/entity/animal/parrot/Parrot.java b/net/minecraft/world/entity/animal/parrot/Parrot.java
index c93170c007dc3e06b8324d5fa6a1710099c3e26c..ace47c04cb0bdb8b44fa80bfad7b01e670839f91 100644
index 0cff09ae7ca8b5dfd48bb8781081b96e0ba8360d..1beb532330ea892127faf88be85f94056aa2037e 100644
--- a/net/minecraft/world/entity/animal/parrot/Parrot.java
+++ b/net/minecraft/world/entity/animal/parrot/Parrot.java
@@ -137,12 +137,68 @@ public class Parrot extends ShoulderRidingEntity {
@@ -2450,7 +2450,7 @@ index 3c43ae68e2510505773e36bf7b051835986e3df0..2d2078ca3adeb78b6ec2633c35d3c622
@Override
diff --git a/net/minecraft/world/entity/animal/sheep/Sheep.java b/net/minecraft/world/entity/animal/sheep/Sheep.java
index 044e31764d4bb5f4bf2b0657d184a62628430b95..ef69bac6181d5f130008629ddb2763f56232345b 100644
index b3345d2e0f991f578c5a8d2871bee8f936a733c8..cf20e9a64fee6512c14f1b757f435fd4fc3394fc 100644
--- a/net/minecraft/world/entity/animal/sheep/Sheep.java
+++ b/net/minecraft/world/entity/animal/sheep/Sheep.java
@@ -71,10 +71,28 @@ public class Sheep extends Animal implements Shearable {
@@ -2618,7 +2618,7 @@ index e0db02e7f2166e894137190252f28a3f02386207..e2273ce904e2c95491caec67d36d37b4
if (noActionTime > 100) {
this.squid.movementVector = Vec3.ZERO;
diff --git a/net/minecraft/world/entity/animal/turtle/Turtle.java b/net/minecraft/world/entity/animal/turtle/Turtle.java
index 3fec7cfb25ae8798921bca35c076ecb792dccb14..2e147b2276dd8604dc6adb75c7ac90ef42e63955 100644
index 05ec359df5bc0803adcd954721e7cefaf8b867d8..23d566b39a1484b54e2b893da5a2d2cbaeb822fd 100644
--- a/net/minecraft/world/entity/animal/turtle/Turtle.java
+++ b/net/minecraft/world/entity/animal/turtle/Turtle.java
@@ -88,6 +88,23 @@ public class Turtle extends Animal {
@@ -2653,7 +2653,7 @@ index 3fec7cfb25ae8798921bca35c076ecb792dccb14..2e147b2276dd8604dc6adb75c7ac90ef
this.goalSelector.addGoal(0, new Turtle.TurtlePanicGoal(this, 1.2));
this.goalSelector.addGoal(1, new Turtle.TurtleBreedGoal(this, 1.0));
this.goalSelector.addGoal(1, new Turtle.TurtleLayEggGoal(this, 1.0));
@@ -490,9 +508,11 @@ public class Turtle extends Animal {
@@ -488,9 +506,11 @@ public class Turtle extends Animal {
}
}
@@ -2666,7 +2666,7 @@ index 3fec7cfb25ae8798921bca35c076ecb792dccb14..2e147b2276dd8604dc6adb75c7ac90ef
}
private void updateSpeed() {
@@ -511,7 +531,7 @@ public class Turtle extends Animal {
@@ -509,7 +529,7 @@ public class Turtle extends Animal {
}
@Override
@@ -2675,7 +2675,7 @@ index 3fec7cfb25ae8798921bca35c076ecb792dccb14..2e147b2276dd8604dc6adb75c7ac90ef
this.updateSpeed();
if (this.operation == MoveControl.Operation.MOVE_TO && !this.mob.getNavigation().isDone()) {
double xd = this.wantedX - this.mob.getX();
@@ -525,7 +545,7 @@ public class Turtle extends Animal {
@@ -523,7 +543,7 @@ public class Turtle extends Animal {
float yRotD = (float)(Mth.atan2(zd, xd) * 180.0F / (float)Math.PI) - 90.0F;
this.mob.setYRot(this.rotlerp(this.mob.getYRot(), yRotD, 90.0F));
this.mob.yBodyRot = this.mob.getYRot();
@@ -2730,7 +2730,7 @@ index 5d1e0d44163b9f29dc824b46b7b983456a273419..f54a14a1e434cbfedf709d3b1495f2ae
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers());
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index f960bb265bc5a4b350d24c9d1caafb3a06068df0..c0ffda7c18461494aee68aac2d99a660e3b21dcf 100644
index b3e19812063596d600ae50555d0ff92deae3e890..ccb28f6f5e02972c32ac5f3390a72b78f17b28dd 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -92,6 +92,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -3174,7 +3174,7 @@ index d48e066e8c43494aa74158452da369e5617d6a7e..c1acc0a648493ec33ef4fc4a48b52fe0
if (this.nextHeightOffsetChangeTick <= 0) {
this.nextHeightOffsetChangeTick = 100;
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
index 4811c0607acbdf0e8f74327542560b96c84f728b..e5f7d276c083cdb78d2f420c03be1b08115d5597 100644
index 8e32e9a24f98d962a7c90ec400526d1711d8e97e..ac98cd1702fb9ef2b82226d2ee459cb18ebce017 100644
--- a/net/minecraft/world/entity/monster/Creeper.java
+++ b/net/minecraft/world/entity/monster/Creeper.java
@@ -57,21 +57,98 @@ public class Creeper extends Monster {
@@ -4356,7 +4356,7 @@ index 96776d23370736da3408e6a86ed89b7f3d686732..0ac7a442a0ea79f190aceb60b771d616
public SoundEvent getHurtSound(final DamageSource source) {
return this.isTiny() ? SoundEvents.SLIME_HURT_SMALL : SoundEvents.SLIME_HURT;
diff --git a/net/minecraft/world/entity/monster/cubemob/SulfurCube.java b/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
index 7f79c8e4e5874d2ce3a1a58b96df698c3f774011..7b3ab0515bae1963cdd2319f097bfffb4d12f4e5 100644
index 1856b055cfeafb88303957b570812974b33a03ae..e5fd7eefb749394ee8613339bf5802315c0bb4bf 100644
--- a/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
+++ b/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
@@ -129,6 +129,28 @@ public class SulfurCube extends AbstractCubeMob implements Bucketable, Shearable
@@ -4586,7 +4586,7 @@ index 061d08fd2451a7bbd020edbd4035b1e793f552ba..7caebb032e03ce54463c1e1050dc2bfe
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, true));
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index f1c2639637906a8214df967741c84bbe170049c2..f74df436798220d83f62383c523566d0acc2c87a 100644
index 0c27543e9d48e0d0cf067ccb9ab5d5ca49223d10..a688c7ab300753f373af1de3471dce2a2249456e 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -109,6 +109,23 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -4613,7 +4613,7 @@ index f1c2639637906a8214df967741c84bbe170049c2..f74df436798220d83f62383c523566d0
@Override
protected void addAdditionalSaveData(final ValueOutput output) {
super.addAdditionalSaveData(output);
@@ -288,6 +305,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -289,6 +306,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
protected void customServerAiStep(final ServerLevel level) {
ProfilerFiller profiler = Profiler.get();
profiler.push("piglinBrain");
@@ -4677,7 +4677,7 @@ index 5676e8c076954f3109b263aeedadd21bb960db00..3294aca7cb32d5cf9bbc7c2c99a538eb
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
diff --git a/net/minecraft/world/entity/monster/skeleton/Bogged.java b/net/minecraft/world/entity/monster/skeleton/Bogged.java
index 8c8e2d8c7d3cdf83053c291bcd05ecc6f840f3ce..faa10efb42f00c8ff0726afcb689501e9c9ae50c 100644
index faff25abf54e00f38b10bdb47e37ab2d100f32fb..6bb58edc4317e33da1d6053b1c66a9ac10fb6ad9 100644
--- a/net/minecraft/world/entity/monster/skeleton/Bogged.java
+++ b/net/minecraft/world/entity/monster/skeleton/Bogged.java
@@ -41,6 +41,23 @@ public class Bogged extends AbstractSkeleton implements Shearable {
@@ -4705,7 +4705,7 @@ index 8c8e2d8c7d3cdf83053c291bcd05ecc6f840f3ce..faa10efb42f00c8ff0726afcb689501e
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
diff --git a/net/minecraft/world/entity/monster/skeleton/Skeleton.java b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
index c920ea3116795a047225506649d10deec5a964a4..ff352802190974eb466213c464b1f74541886c9b 100644
index e260ed1bf0238e9cb32f84e30ca642d433ae239c..a0bc5a61bfada6cc391078cf29456db64e90b35d 100644
--- a/net/minecraft/world/entity/monster/skeleton/Skeleton.java
+++ b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
@@ -27,6 +27,23 @@ public class Skeleton extends AbstractSkeleton {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable entity base attributes
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 2d856ba2ce8c6febdc1d5dd2df2718fbe4e1312d..55f7761ad757cc4eebbf1271e0d284bc31db753e 100644
index a714d12aa9f8b3b36d0cf334c744dd7751cb68b3..45ab2a35a27b35b682cf90a14c587a50ad2f6ce5 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -310,6 +310,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -52,7 +52,7 @@ index 9861837c1d10e5ffe5dada9f4a75fb9adaccc161..cb242c69be97e0927dd62714f1a9b112
public boolean isFlapping() {
return !this.isResting() && this.tickCount % 10.0F == 0.0F;
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index ca1f1d18b765db8d197f70977e0e175744b07ee4..9206c45b9789ff2834f14efb65dc85113c7bd7d7 100644
index 408a0048686dd2f3b48dee53087504ffc4dfc42c..80c86131486c7392481def252fa74d18ce76beb0 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -155,6 +155,14 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -71,7 +71,7 @@ index ca1f1d18b765db8d197f70977e0e175744b07ee4..9206c45b9789ff2834f14efb65dc8511
protected Brain<Allay> makeBrain(final Brain.Packed packedBrain) {
return BRAIN_PROVIDER.makeBrain(this, packedBrain);
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index e417fa354f22e3532d3bfda9c9ebfccfd4906bc6..9f0e074df58d8b8484aa8be5cb0bc8941cee0f96 100644
index 0b98a358c03c72b89e6b644bf11fc361c25f517f..5c2f3c9c7db6468f4eced1bc2d3734820b4a55db 100644
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -110,6 +110,14 @@ public class Armadillo extends Animal {
@@ -156,7 +156,7 @@ index 8296a5a5935a77b01f4d11b102f3159d97fc8a30..431f296bf651942cd390b7f383295eae
public SoundEvent getAmbientSound() {
return SoundEvents.CAMEL_AMBIENT;
diff --git a/net/minecraft/world/entity/animal/chicken/Chicken.java b/net/minecraft/world/entity/animal/chicken/Chicken.java
index 4a3d3ab6c9f52fd06107131f2564b196e7b42957..f5d2a74c81d9ba8aeaf6c3f50069f529dde68e72 100644
index b0191f605e6f5e7be78a44868bef1805fc2d005c..2d9043763be094376f75b88758a2f487ec89d7c0 100644
--- a/net/minecraft/world/entity/animal/chicken/Chicken.java
+++ b/net/minecraft/world/entity/animal/chicken/Chicken.java
@@ -98,6 +98,14 @@ public class Chicken extends Animal {
@@ -597,7 +597,7 @@ index d48f8dc3e806ffe767565158bcfa17631839a61c..e9692aacca5f32c4280b16b4eabecf87
return "entity.minecraft.tropical_fish.predefined." + index;
}
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
index aecbd2bddf4eeb365ccad8a85799f7fcd8b9f319..cf9fc2afb3b2fac97930289411f0a22fdb8ea61d 100644
index 9edd4af22e009c8f131f42f0fcad56ef1e56903c..af212b36f9e09880cdaec25d461fe53b6f557de1 100644
--- a/net/minecraft/world/entity/animal/fox/Fox.java
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
@@ -199,6 +199,14 @@ public class Fox extends Animal {
@@ -616,7 +616,7 @@ index aecbd2bddf4eeb365ccad8a85799f7fcd8b9f319..cf9fc2afb3b2fac97930289411f0a22f
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
diff --git a/net/minecraft/world/entity/animal/golem/CopperGolem.java b/net/minecraft/world/entity/animal/golem/CopperGolem.java
index c27319adafa8089f098efde14989425a4715b260..5337c65d317299df2ac0dfd9b7ea12fc7debcdb6 100644
index 7953cac5741a5d3672e6b4bf624e1fc1c123a13a..e26a2fb1f59540d853806dfdece97d574f0eebc0 100644
--- a/net/minecraft/world/entity/animal/golem/CopperGolem.java
+++ b/net/minecraft/world/entity/animal/golem/CopperGolem.java
@@ -134,6 +134,16 @@ public class CopperGolem extends AbstractGolem implements ContainerUser, Shearab
@@ -656,7 +656,7 @@ index 8c674f2f3a068e92b3975df8137912f4b8327cf2..9fd7366157c7e6d3d75469c33599560c
protected void registerGoals() {
if (this.level().purpurConfig.ironGolemPoppyCalm) this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.ReceiveFlower(this)); // Purpur - Iron golem calm anger options
diff --git a/net/minecraft/world/entity/animal/golem/SnowGolem.java b/net/minecraft/world/entity/animal/golem/SnowGolem.java
index acb61a212f9240ccfa414770868c0fb3835c538a..3fe90a55e0b681c3c689db081abe28e6931e711f 100644
index 8ec69bb91822bff6e7fe338f97d5bb8dbc2345f7..c614c61424199cb2105e84b85fe67f66dd6aa248 100644
--- a/net/minecraft/world/entity/animal/golem/SnowGolem.java
+++ b/net/minecraft/world/entity/animal/golem/SnowGolem.java
@@ -79,6 +79,14 @@ public class SnowGolem extends AbstractGolem implements RangedAttackMob, Shearab
@@ -752,7 +752,7 @@ index c9aa882ab43ced1d3d9b84e19feae39d6ed28b78..1ceeaad8411f06de37a0ea5aff8fc48d
return AbstractNautilus.createAttributes().add(Attributes.MOVEMENT_SPEED, 1.1F);
}
diff --git a/net/minecraft/world/entity/animal/panda/Panda.java b/net/minecraft/world/entity/animal/panda/Panda.java
index f0b23d5f443a8f29ce98e16f0254425147599d8d..bd8936c6ef9d2285858b784873e85d52812b3f14 100644
index 1fee38fdb97678cbf4128962d69ffe57abe76d52..9649b766fa90c34feef5dec766aa7c6b4778b386 100644
--- a/net/minecraft/world/entity/animal/panda/Panda.java
+++ b/net/minecraft/world/entity/animal/panda/Panda.java
@@ -138,6 +138,15 @@ public class Panda extends Animal {
@@ -771,7 +771,7 @@ index f0b23d5f443a8f29ce98e16f0254425147599d8d..bd8936c6ef9d2285858b784873e85d52
@Override
protected boolean canDispenserEquipIntoSlot(final EquipmentSlot slot) {
return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot();
@@ -625,7 +634,11 @@ public class Panda extends Animal {
@@ -623,7 +632,11 @@ public class Panda extends Animal {
public void setAttributes() {
if (this.isWeak()) {
@@ -785,7 +785,7 @@ index f0b23d5f443a8f29ce98e16f0254425147599d8d..bd8936c6ef9d2285858b784873e85d52
if (this.isLazy()) {
diff --git a/net/minecraft/world/entity/animal/parrot/Parrot.java b/net/minecraft/world/entity/animal/parrot/Parrot.java
index ace47c04cb0bdb8b44fa80bfad7b01e670839f91..441919a0a99c4d87c13611999e1e24e9cfb6e0e9 100644
index 1beb532330ea892127faf88be85f94056aa2037e..2594c8407b6345a14a262bb072d34339f244999c 100644
--- a/net/minecraft/world/entity/animal/parrot/Parrot.java
+++ b/net/minecraft/world/entity/animal/parrot/Parrot.java
@@ -199,6 +199,14 @@ public class Parrot extends ShoulderRidingEntity {
@@ -861,7 +861,7 @@ index 2d2078ca3adeb78b6ec2633c35d3c622184cc3b2..38fa1c0b79e3dc11e830af95be4bed1e
public void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this));
diff --git a/net/minecraft/world/entity/animal/sheep/Sheep.java b/net/minecraft/world/entity/animal/sheep/Sheep.java
index ef69bac6181d5f130008629ddb2763f56232345b..6ba9cd9090ef264660361e28198886f96c95dfba 100644
index cf20e9a64fee6512c14f1b757f435fd4fc3394fc..d3d5168fdafa7afe5813e1c0ea99ab17c8eddcc3 100644
--- a/net/minecraft/world/entity/animal/sheep/Sheep.java
+++ b/net/minecraft/world/entity/animal/sheep/Sheep.java
@@ -88,6 +88,14 @@ public class Sheep extends Animal implements Shearable {
@@ -936,7 +936,7 @@ index e2273ce904e2c95491caec67d36d37b4b5e0fe67..66477755d3ee8293a8bd79baa0121495
protected void registerGoals() {
this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this));
diff --git a/net/minecraft/world/entity/animal/turtle/Turtle.java b/net/minecraft/world/entity/animal/turtle/Turtle.java
index 2e147b2276dd8604dc6adb75c7ac90ef42e63955..806da779ee6ea7ab6fe572d2ca6cf35c03d302b3 100644
index 23d566b39a1484b54e2b893da5a2d2cbaeb822fd..aea12003ef838f8f4d1e1c6b83a527e6c812a3c8 100644
--- a/net/minecraft/world/entity/animal/turtle/Turtle.java
+++ b/net/minecraft/world/entity/animal/turtle/Turtle.java
@@ -105,6 +105,14 @@ public class Turtle extends Animal {
@@ -974,7 +974,7 @@ index f54a14a1e434cbfedf709d3b1495f2ae9ae4f11f..acf623ba0ab1f1d6c98af1a83cddd634
protected void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this));
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 57d415d987924c2b9025f8137baae20e99fd55ca..0efd061a3f53eaa657113579d8833f488e4d7bc4 100644
index ccb28f6f5e02972c32ac5f3390a72b78f17b28dd..163afb24f856b75528a362e899548a1515a47aca 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -165,6 +165,13 @@ public class EnderDragon extends Mob implements Enemy {
@@ -991,7 +991,7 @@ index 57d415d987924c2b9025f8137baae20e99fd55ca..0efd061a3f53eaa657113579d8833f48
public static AttributeSupplier.Builder createAttributes() {
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0).add(Attributes.CAMERA_DISTANCE, 16.0);
}
@@ -1069,7 +1076,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -1061,7 +1068,7 @@ public class EnderDragon extends Mob implements Enemy {
@Override
protected float sanitizeScale(final float scale) {
@@ -1048,7 +1048,7 @@ index c1acc0a648493ec33ef4fc4a48b52fe0b3dc04b2..b553c6dd60bd23fba7ee3df9886561fc
protected void registerGoals() {
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
index e5f7d276c083cdb78d2f420c03be1b08115d5597..01c722932aaed2221badaa6231d8a20d005b087b 100644
index ac98cd1702fb9ef2b82226d2ee459cb18ebce017..ada74699fcc5a50694cf4b651f42011dd3ade2d4 100644
--- a/net/minecraft/world/entity/monster/Creeper.java
+++ b/net/minecraft/world/entity/monster/Creeper.java
@@ -137,6 +137,14 @@ public class Creeper extends Monster {
@@ -1501,7 +1501,7 @@ index 0ac7a442a0ea79f190aceb60b771d616b377e613..22c20e4360473cdbe9cda8bb7b3b30be
+ }
}
diff --git a/net/minecraft/world/entity/monster/cubemob/SulfurCube.java b/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
index 67658b7493593b70939b891b064f817433e70d42..d5591ac5853e9f016e385bfa852a64bf40fb0dce 100644
index e5fd7eefb749394ee8613339bf5802315c0bb4bf..a74793c70daa6c4f1bbdd41044026033bf86c860 100644
--- a/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
+++ b/net/minecraft/world/entity/monster/cubemob/SulfurCube.java
@@ -151,6 +151,20 @@ public class SulfurCube extends AbstractCubeMob implements Bucketable, Shearable
@@ -1623,7 +1623,7 @@ index 7caebb032e03ce54463c1e1050dc2bfe14cb16ee..d06f6bf930277f08756752f7f259a57f
protected void registerGoals() {
super.registerGoals();
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index f74df436798220d83f62383c523566d0acc2c87a..95751fd884c70ff6a3ff95fb2d442627a7867996 100644
index a688c7ab300753f373af1de3471dce2a2249456e..702f9d6512357a79834f6e8a882e5fbb680bad4e 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -126,6 +126,14 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -1661,7 +1661,7 @@ index 3b8a2fbd8f403c72fe092f8f2a95f95c9f7f930c..3cbb6f2ee343e6d3851e84e53cb1aafa
return Monster.createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 50.0)
diff --git a/net/minecraft/world/entity/monster/skeleton/Bogged.java b/net/minecraft/world/entity/monster/skeleton/Bogged.java
index faa10efb42f00c8ff0726afcb689501e9c9ae50c..617f61f4f7559a42e27d935ab9837ed99a8e9c1e 100644
index 6bb58edc4317e33da1d6053b1c66a9ac10fb6ad9..dd55f35c828beb57ae1f995ecbbacb95ef982603 100644
--- a/net/minecraft/world/entity/monster/skeleton/Bogged.java
+++ b/net/minecraft/world/entity/monster/skeleton/Bogged.java
@@ -58,6 +58,14 @@ public class Bogged extends AbstractSkeleton implements Shearable {
@@ -1680,7 +1680,7 @@ index faa10efb42f00c8ff0726afcb689501e9c9ae50c..617f61f4f7559a42e27d935ab9837ed9
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
diff --git a/net/minecraft/world/entity/monster/skeleton/Skeleton.java b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
index ff352802190974eb466213c464b1f74541886c9b..12f87667ddeda1f57fe89f137b2df6cebef35c74 100644
index a0bc5a61bfada6cc391078cf29456db64e90b35d..f9551eeb0190c5dafc550d657115173a265f1c5e 100644
--- a/net/minecraft/world/entity/monster/skeleton/Skeleton.java
+++ b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
@@ -44,6 +44,13 @@ public class Skeleton extends AbstractSkeleton {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Minecart settings and WASD controls
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 119530367e7bd7f99160d8a8b8b6c1f757c3bd01..2ff355757f3637186ed9f9c81323b799a98f3128 100644
index 4a9297f43e33df1838ad75543ec0080c833fb078..ce07d6a8d49e5f538f61955394c20f880863885d 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -1288,6 +1288,11 @@ public class ServerPlayer extends Player {
@@ -1324,6 +1324,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
// Purpur start - Add boat fall damage config
if (source.is(net.minecraft.tags.DamageTypeTags.IS_FALL)) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 55f7761ad757cc4eebbf1271e0d284bc31db753e..991ded4e26c00ffb25a933a8cc175849e1e579b2 100644
index 45ab2a35a27b35b682cf90a14c587a50ad2f6ce5..7ec097b3be4fa2ad99de2891fa5507af92ebbeab 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -4011,7 +4011,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -3968,7 +3968,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
if (freeFallInterval % 2 == 0) {
List<EquipmentSlot> slotsWithGliders = EquipmentSlot.VALUES.stream().filter(slot -> canGlideUsing(this.getItemBySlot(slot), slot)).toList();
EquipmentSlot slotToDamage = Util.getRandom(slotsWithGliders, this.random);
@@ -49,10 +49,10 @@ index b3443ff2d06af328493046e723efc11d299a2824..3c001b3810097d5cb60ad64e0727d8d9
itemStack.shrink(1); // Moved up from below
} else {
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
index b415581057f20e3aba5b249ec35b9069aa873038..a528429259f5981ac4e1c89953c217bfd165517f 100644
index 3bbad55a7a81534a192e91ecd198f3201f65f527..d74eef5eb06f7d957941e9602f137f20c25fc3c5 100644
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -682,6 +682,14 @@ public final class ItemStack implements DataComponentHolder, ItemInstance {
@@ -669,6 +669,14 @@ public final class ItemStack implements DataComponentHolder, ItemInstance {
org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent
}
// CraftBukkit end

View File

@@ -47,7 +47,7 @@ index 44f34214b53a8ea754e3c62f5db652ea944a95f6..79de24884cb5862a4af6dd9a9067434d
partner.resetLove();
level.broadcastEntityEvent(this, EntityEvent.IN_LOVE_HEARTS);
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index 9f0e074df58d8b8484aa8be5cb0bc8941cee0f96..4296d0caec2583f1b0135719ba6f218b3df7a3a8 100644
index 5c2f3c9c7db6468f4eced1bc2d3734820b4a55db..7ff07fafcdb5d34a69f28d2c9c184bb8fc7656c2 100644
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -118,6 +118,13 @@ public class Armadillo extends Animal {
@@ -119,7 +119,7 @@ index 431f296bf651942cd390b7f383295eae3f4d2bce..a683afa61a69a9ea2d372dc7a00dc76f
protected void addAdditionalSaveData(final ValueOutput output) {
super.addAdditionalSaveData(output);
diff --git a/net/minecraft/world/entity/animal/chicken/Chicken.java b/net/minecraft/world/entity/animal/chicken/Chicken.java
index 122ebcf1a7fb7e7856a8f73d4a0355672d5c9655..b27e52819fa244d93f70177b19898ab6399e2d3f 100644
index 1f49e50339e1cc280fa0b88e5cdc6e2c075ed59a..0393438650f54689fe031b3bccfaea90db816969 100644
--- a/net/minecraft/world/entity/animal/chicken/Chicken.java
+++ b/net/minecraft/world/entity/animal/chicken/Chicken.java
@@ -111,6 +111,13 @@ public class Chicken extends Animal {
@@ -335,7 +335,7 @@ index a225a5bc7209cdaf328b252fd712cde2605fb039..b04d9caff464a5e690bafcdce4b1b46b
return this.entityData.get(DATA_TRUSTING);
}
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
index cf9fc2afb3b2fac97930289411f0a22fdb8ea61d..f63f304ec9375ffca0a7b22c9598a38452a3b739 100644
index af212b36f9e09880cdaec25d461fe53b6f557de1..5a69911edb5cf6144bf1f5f49e9bb2a497d5a8c2 100644
--- a/net/minecraft/world/entity/animal/fox/Fox.java
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
@@ -207,6 +207,13 @@ public class Fox extends Animal {
@@ -352,7 +352,7 @@ index cf9fc2afb3b2fac97930289411f0a22fdb8ea61d..f63f304ec9375ffca0a7b22c9598a384
@Override
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
@@ -1010,8 +1017,10 @@ public class Fox extends Animal {
@@ -998,8 +1005,10 @@ public class Fox extends Animal {
CriteriaTriggers.BRED_ANIMALS.trigger(loveCause, this.animal, this.partner, offspring);
}
@@ -456,7 +456,7 @@ index 1ceeaad8411f06de37a0ea5aff8fc48d9211eed2..55b4a41867799dcb2999f0c324bde8b2
return AbstractNautilus.createAttributes().add(Attributes.MOVEMENT_SPEED, 1.1F);
}
diff --git a/net/minecraft/world/entity/animal/panda/Panda.java b/net/minecraft/world/entity/animal/panda/Panda.java
index bd8936c6ef9d2285858b784873e85d52812b3f14..9328cb71c88efc13afc203da1c0bff7cd305fb3c 100644
index 9649b766fa90c34feef5dec766aa7c6b4778b386..4166894bee228546f6e4e991a3cf2a1380abe367 100644
--- a/net/minecraft/world/entity/animal/panda/Panda.java
+++ b/net/minecraft/world/entity/animal/panda/Panda.java
@@ -147,6 +147,13 @@ public class Panda extends Animal {
@@ -474,7 +474,7 @@ index bd8936c6ef9d2285858b784873e85d52812b3f14..9328cb71c88efc13afc203da1c0bff7c
protected boolean canDispenserEquipIntoSlot(final EquipmentSlot slot) {
return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot();
diff --git a/net/minecraft/world/entity/animal/parrot/Parrot.java b/net/minecraft/world/entity/animal/parrot/Parrot.java
index 441919a0a99c4d87c13611999e1e24e9cfb6e0e9..22962f57daf5c274fa0ec46170f36dcaa1c8bed3 100644
index 2594c8407b6345a14a262bb072d34339f244999c..d3bb7e7162fc9e3be1a5d84e95fe78c7a9ed423a 100644
--- a/net/minecraft/world/entity/animal/parrot/Parrot.java
+++ b/net/minecraft/world/entity/animal/parrot/Parrot.java
@@ -207,6 +207,13 @@ public class Parrot extends ShoulderRidingEntity {
@@ -546,7 +546,7 @@ index 38fa1c0b79e3dc11e830af95be4bed1e74910108..f0c4ad3715322bf1a5a60edd870b34a1
public void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this));
diff --git a/net/minecraft/world/entity/animal/sheep/Sheep.java b/net/minecraft/world/entity/animal/sheep/Sheep.java
index 6ba9cd9090ef264660361e28198886f96c95dfba..cd53e9540856c53b9aae961ee0303b592a513684 100644
index d3d5168fdafa7afe5813e1c0ea99ab17c8eddcc3..01220c13a3f5cd920bcbbd23f66d73e597fee97f 100644
--- a/net/minecraft/world/entity/animal/sheep/Sheep.java
+++ b/net/minecraft/world/entity/animal/sheep/Sheep.java
@@ -96,6 +96,13 @@ public class Sheep extends Animal implements Shearable {
@@ -582,7 +582,7 @@ index 9246c76131c02832d96eeb6d3899e0050abce938..33eb3e6b312ef32c6ae94a7ef5333ab6
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
diff --git a/net/minecraft/world/entity/animal/turtle/Turtle.java b/net/minecraft/world/entity/animal/turtle/Turtle.java
index 806da779ee6ea7ab6fe572d2ca6cf35c03d302b3..bbee5d60204cf7c6e77cf337044e608d79d8462e 100644
index aea12003ef838f8f4d1e1c6b83a527e6c812a3c8..4104787b7cc9e746f88969cad3a5b6d86b9f184b 100644
--- a/net/minecraft/world/entity/animal/turtle/Turtle.java
+++ b/net/minecraft/world/entity/animal/turtle/Turtle.java
@@ -113,6 +113,13 @@ public class Turtle extends Animal {
@@ -599,7 +599,7 @@ index 806da779ee6ea7ab6fe572d2ca6cf35c03d302b3..bbee5d60204cf7c6e77cf337044e608d
public void setHomePos(final BlockPos pos) {
this.homePos = pos;
}
@@ -348,8 +355,10 @@ public class Turtle extends Animal {
@@ -346,8 +353,10 @@ public class Turtle extends Animal {
}
this.turtle.setHasEgg(true);

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Apply display names from item forms of entities to entities
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
index 385d6bdf435320b4779a27512447e7cc64e05ddf..ec65ca3fd54c8da3768851ee53195735d24d4895 100644
index c1c9387a54ed219f8da58a9a417c85a15eea7bec..235c2acd9781979d4cf621cdfae2d6f745595fbd 100644
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -476,6 +476,7 @@ public class ArmorStand extends LivingEntity {
@@ -15,8 +15,8 @@ index 385d6bdf435320b4779a27512447e7cc64e05ddf..ec65ca3fd54c8da3768851ee53195735
ItemStack result = new ItemStack(Items.ARMOR_STAND);
+ if (level.purpurConfig.persistentDroppableEntityDisplayNames) // Purpur - Apply display names from item forms of entities to entities and vice versa
result.set(DataComponents.CUSTOM_NAME, this.getCustomName());
this.drops.add(new DefaultDrop(result, stack -> Block.popResource(this.level(), this.blockPosition(), stack))); // CraftBukkit - add to drops // Paper - Restore vanilla drops behavior
return this.brokenByAnything(level, source); // Paper
this.deathDropItems = new java.util.ArrayList<>(); // Paper
this.deathDropItems.add(new DefaultDrop(result, stack -> Block.popResource(this.level(), this.blockPosition(), stack))); // CraftBukkit - add to drops // Paper - Restore vanilla drops behavior
diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java
index 7fa894e6052dd35a87b19f6bac6031bfd0243deb..19bd80e860a520f6a07baa3e66cc40c8a419c79f 100644
--- a/net/minecraft/world/entity/decoration/ItemFrame.java

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add mobGriefing override to everything affected
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 991ded4e26c00ffb25a933a8cc175849e1e579b2..a9e93d55de28964169988e2b276fdfc8acd29fdb 100644
index 7ec097b3be4fa2ad99de2891fa5507af92ebbeab..166c8d92937d534646d7a7521529d30afaa6f618 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1982,7 +1982,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -1961,7 +1961,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
if (this.level() instanceof ServerLevel serverLevel) {
boolean var6 = false;
if (this.dead && killer instanceof WitherBoss) { // Paper
@@ -18,10 +18,10 @@ index 991ded4e26c00ffb25a933a8cc175849e1e579b2..a9e93d55de28964169988e2b276fdfc8
BlockState state = Blocks.WITHER_ROSE.defaultBlockState();
if (this.level().getBlockState(pos).isAir() && state.canSurvive(this.level(), pos)) {
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index c707a18175920b12b4d554d8041c7afe10a0efd1..6e6ba45c93209bd9e7a8565bf166b4cc9843b80a 100644
index a5885bc19fe469a0c810e241d570d9ab62295492..460ba9d3a192c5f17a1b5c4682bbbba3d2f8ebe2 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -577,7 +577,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -571,7 +571,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
&& this.canPickUpLoot()
&& this.isAlive()
&& !this.dead
@@ -92,10 +92,10 @@ index ff0f99d4b560a1c0721885b0eba5bd5ab2087bd7..51c72524c14c078d1bb0539f0b54fc4a
} else if (this.nextStartTick > 0) {
this.nextStartTick--;
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
index f63f304ec9375ffca0a7b22c9598a38452a3b739..bf9ff90916733110a249912d7aeabc2e45f63b01 100644
index 5a69911edb5cf6144bf1f5f49e9bb2a497d5a8c2..9e113deaf6aa50380e20271b66daad566d40b08e 100644
--- a/net/minecraft/world/entity/animal/fox/Fox.java
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
@@ -1075,7 +1075,7 @@ public class Fox extends Animal {
@@ -1063,7 +1063,7 @@ public class Fox extends Animal {
}
protected void onReachedTarget() {
@@ -105,7 +105,7 @@ index f63f304ec9375ffca0a7b22c9598a38452a3b739..bf9ff90916733110a249912d7aeabc2e
if (state.is(Blocks.SWEET_BERRY_BUSH)) {
this.pickSweetBerries(state);
diff --git a/net/minecraft/world/entity/animal/golem/SnowGolem.java b/net/minecraft/world/entity/animal/golem/SnowGolem.java
index 3fe90a55e0b681c3c689db081abe28e6931e711f..ad300631146959f158cbabddac12fda4deb33360 100644
index c614c61424199cb2105e84b85fe67f66dd6aa248..da0e4f830b708a5f1046aff48de525c7ecd4f05b 100644
--- a/net/minecraft/world/entity/animal/golem/SnowGolem.java
+++ b/net/minecraft/world/entity/animal/golem/SnowGolem.java
@@ -135,7 +135,7 @@ public class SnowGolem extends AbstractGolem implements RangedAttackMob, Shearab
@@ -131,7 +131,7 @@ index f0c4ad3715322bf1a5a60edd870b34a15949a77f..80a65dba81ab82cdb9bd43d1878e7455
}
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index ffd612896a30ebff55906baba94150eb25fd8e98..2597ee3ca93653af04b5e620f3909c3791369bf0 100644
index 163afb24f856b75528a362e899548a1515a47aca..56f3c0b9d1f34f9dff5db46d441d1d4f86f4668e 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -537,7 +537,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -227,10 +227,10 @@ index 73ebf1ac5d814399887e4e8e717ee8fb41404969..4b077693e8749b6d2440b12f0aa1d7d6
}
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index 95751fd884c70ff6a3ff95fb2d442627a7867996..013550c72a194977b1874f30aeda60d27b682853 100644
index 702f9d6512357a79834f6e8a882e5fbb680bad4e..96fd5f5139a12c59277cf0a86d571551b1113f35 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -416,7 +416,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -415,7 +415,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
public boolean wantsToPickUp(final ServerLevel level, final ItemStack itemStack) {
@@ -294,10 +294,10 @@ index a2aab8db9826e0b4607f54914af43918a7e35512..e5cf3ec08e134e24fbcc31d903219130
// CraftBukkit end
}
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
index ac5808a7019e7131b2e7f6710537d63ad5340703..f37710c48aafb11d65b99e4d37ef1382a8a36417 100644
index 7eb20e1ea16136116e1979eb3a17b31f4cc3cc75..457acdb4f5893303a4eea3d5e97404f1dcec8195 100644
--- a/net/minecraft/world/entity/raid/Raider.java
+++ b/net/minecraft/world/entity/raid/Raider.java
@@ -398,7 +398,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -396,7 +396,7 @@ public abstract class Raider extends PatrollingMonster {
}
private boolean cannotPickUpBanner() {

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
Co-authored by: Encode42 <me@encode42.dev>
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 6b51feb4e41f10dae9e5fcd303d260d5f511ae91..2f2b5794cc37aedb5dc09925dd77b6e700934a95 100644
index 8ca29762d465ba8ebeaa450bd6e1c4f77db5464c..0f5961a9fb49dbd77b682cf922cc14be48fe3397 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -453,6 +453,21 @@ public abstract class Entity
@@ -558,6 +558,21 @@ public abstract class Entity
}
// Purpur end - Add canSaveToDisk to Entity
@@ -32,11 +32,11 @@ index 6b51feb4e41f10dae9e5fcd303d260d5f511ae91..2f2b5794cc37aedb5dc09925dd77b6e7
this.type = type;
this.level = level;
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index a9e93d55de28964169988e2b276fdfc8acd29fdb..77a5742fe3aab5acde6dff9664fea66f66262f3c 100644
index 166c8d92937d534646d7a7521529d30afaa6f618..82705d97a520ffd6b4b4a1e5c7bf5439d93bf269 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -305,6 +305,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
public boolean silentDeath = true; // Paper - mark entity as dying silently for cancellable death event
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
public int invulnerableDuration = LivingEntity.INVULNERABLE_DURATION; // Paper - configurable invulnerable duration
+ protected boolean shouldBurnInDay = false; public boolean shouldBurnInDay() { return this.shouldBurnInDay; } public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; } // Purpur - API for any mob to burn daylight
@@ -59,7 +59,7 @@ index a9e93d55de28964169988e2b276fdfc8acd29fdb..77a5742fe3aab5acde6dff9664fea66f
this.lastHurtByPlayer = EntityReference.read(input, "last_hurt_by_player");
this.lastHurtByPlayerMemoryTime = input.getIntOr("last_hurt_by_player_memory_time", 0);
this.lastHurtByMob = EntityReference.read(input, "last_hurt_by_mob");
@@ -3981,6 +3984,37 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -3938,6 +3941,37 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
if (this.level() instanceof ServerLevel serverLevel && this.isSensitiveToWater() && this.isInWaterOrRain()) {
this.hurtServer(serverLevel, this.damageSources().drown(), 1.0F);
}
@@ -98,10 +98,10 @@ index a9e93d55de28964169988e2b276fdfc8acd29fdb..77a5742fe3aab5acde6dff9664fea66f
protected void applyInput() {
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index 6e6ba45c93209bd9e7a8565bf166b4cc9843b80a..b5c2b64c581c30cdf6f379ccd76a863b81513f8b 100644
index 460ba9d3a192c5f17a1b5c4682bbbba3d2f8ebe2..00353f1668e4fb3d97c57175a5f141d6a39d70f7 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -567,9 +567,9 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -561,9 +561,9 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@Override
public void aiStep() {
super.aiStep();
@@ -113,7 +113,7 @@ index 6e6ba45c93209bd9e7a8565bf166b4cc9843b80a..b5c2b64c581c30cdf6f379ccd76a863b
ProfilerFiller profiler = Profiler.get();
profiler.push("looting");
@@ -621,16 +621,8 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -615,16 +615,8 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
}
public boolean isSunBurnTick() {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Setting to reintroduce end void rings
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index fcade65785db82fc64eeb9b337900a405f05d196..09d05ed938d0dd4cd5d7adb68f4229519cf4f61b 100644
index 8a5c7ac71613316951f0c9b32f8beab9300e63f6..3c110bcbbb13fc127c0a4dfbba1e82456bbb35da 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1239,6 +1239,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1350,6 +1350,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Purpur end - config for startup commands
@@ -25,7 +25,7 @@ index fcade65785db82fc64eeb9b337900a405f05d196..09d05ed938d0dd4cd5d7adb68f422951
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index 97f4c88aedefa02ae01471a75a16647b5e23e198..8df237acbbd52c88d618e2365f064be08ea5c200 100644
index 7ea092a405c686999cbda8a20ea2e0ca39dde65d..cb55c56017269747f82bf78d48f8f602a0d63c4d 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -235,6 +235,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Per mob mob_griefing loot pickup override
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index b5c2b64c581c30cdf6f379ccd76a863b81513f8b..7aaabbde2aaa58d2ae412bc6910cb95dee3b9fe5 100644
index 00353f1668e4fb3d97c57175a5f141d6a39d70f7..524e37ac277eee9430a86b3a2dd69066f0d1b74f 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -577,7 +577,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -571,7 +571,7 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
&& this.canPickUpLoot()
&& this.isAlive()
&& !this.dead
@@ -17,7 +17,7 @@ index b5c2b64c581c30cdf6f379ccd76a863b81513f8b..7aaabbde2aaa58d2ae412bc6910cb95d
Vec3i pickupReach = this.getPickupReach();
for (ItemEntity entity : this.level()
@@ -596,6 +596,12 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
@@ -590,6 +590,12 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
profiler.pop();
}
@@ -31,7 +31,7 @@ index b5c2b64c581c30cdf6f379ccd76a863b81513f8b..7aaabbde2aaa58d2ae412bc6910cb95d
return EquipmentSlot.HEAD;
}
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index 9206c45b9789ff2834f14efb65dc85113c7bd7d7..d3074e1ce8d7d13bcb5b23e7602e94d6b7558f03 100644
index 80c86131486c7392481def252fa74d18ce76beb0..fe909b5d6689e0978a9efaad330f28e121865fc6 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -163,6 +163,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -49,10 +49,10 @@ index 9206c45b9789ff2834f14efb65dc85113c7bd7d7..d3074e1ce8d7d13bcb5b23e7602e94d6
protected Brain<Allay> makeBrain(final Brain.Packed packedBrain) {
return BRAIN_PROVIDER.makeBrain(this, packedBrain);
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
index ca5b0b8081c4943bfbfba4f0f9284f0fdda3cf9f..91a001af54b9ba53c9c2a7cfd797d9ff2f53c0db 100644
index a5c8c4cd7fb80ee0fb87eba85b6a3095223b849c..db20e27227430809704b2d6148d0ffa13c7094fe 100644
--- a/net/minecraft/world/entity/animal/fox/Fox.java
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
@@ -821,6 +821,13 @@ public class Fox extends Animal {
@@ -814,6 +814,13 @@ public class Fox extends Animal {
}
// Purpur end - Tulips change fox type
@@ -64,8 +64,8 @@ index ca5b0b8081c4943bfbfba4f0f9284f0fdda3cf9f..91a001af54b9ba53c9c2a7cfd797d9ff
+ // Purpur end - Check mobGriefing Overrides
+
@Override
// Paper start - Cancellable death event
protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(final ServerLevel level, final DamageSource source) {
// Paper start - Fix MC-153010 (dropCustomDeathLoot is only called when shouldDropLoot = true)
protected boolean guaranteedToDropUndamaged(final net.minecraft.world.entity.EquipmentSlot slot) {
diff --git a/net/minecraft/world/entity/monster/illager/Pillager.java b/net/minecraft/world/entity/monster/illager/Pillager.java
index 9d6629c29dc471ef1db672cce4260a983d452cbd..55b7fc1c375edaf8c86294884da55d5d97e09e93 100644
--- a/net/minecraft/world/entity/monster/illager/Pillager.java
@@ -103,7 +103,7 @@ index d42afe275f7a917d5784da2838972dff73f1476a..68b252bfd6bacc3952ffc610032cd8a0
protected void registerGoals() {
super.registerGoals();
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index 9246caa06976c258c15c95b52a156aebf63d89d7..ac96afede920fcc19a3a136ed75b1c66c0cfdea5 100644
index 8d952bf8a063f5f5ebb8054295c7ff12f03d1572..432f6edccbfeffdec2a4b468137c8e035be9f74a 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -148,6 +148,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -120,7 +120,7 @@ index 9246caa06976c258c15c95b52a156aebf63d89d7..ac96afede920fcc19a3a136ed75b1c66
@Override
protected void addAdditionalSaveData(final ValueOutput output) {
super.addAdditionalSaveData(output);
@@ -430,7 +437,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -429,7 +436,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
public boolean wantsToPickUp(final ServerLevel level, final ItemStack itemStack) {
@@ -148,7 +148,7 @@ index ee1a87f7811d22b5b33b3ae6b22fc5332b57322b..34cd7f5b209e466a4bef506a9d796e04
return Monster.createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 50.0)
diff --git a/net/minecraft/world/entity/monster/skeleton/Bogged.java b/net/minecraft/world/entity/monster/skeleton/Bogged.java
index 617f61f4f7559a42e27d935ab9837ed99a8e9c1e..4022813e5cb9188f310fa5b633567cf854f4d627 100644
index dd55f35c828beb57ae1f995ecbbacb95ef982603..cece76ba9a5c58cc811af1fec415f8e7cd81b3b3 100644
--- a/net/minecraft/world/entity/monster/skeleton/Bogged.java
+++ b/net/minecraft/world/entity/monster/skeleton/Bogged.java
@@ -66,6 +66,13 @@ public class Bogged extends AbstractSkeleton implements Shearable {
@@ -166,7 +166,7 @@ index 617f61f4f7559a42e27d935ab9837ed99a8e9c1e..4022813e5cb9188f310fa5b633567cf8
protected void defineSynchedData(final SynchedEntityData.Builder entityData) {
super.defineSynchedData(entityData);
diff --git a/net/minecraft/world/entity/monster/skeleton/Skeleton.java b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
index 675faf3f02447fd73f48acc08c4b224114a0dc2e..8610e59cdebe6ae6fc4ba0fb654e990b1e3f34ee 100644
index 661ca577e899287c895d8d5b2c7919d7340af9e7..0d9a1bbe3255f94bf9ef35591a01b596c6fa6a52 100644
--- a/net/minecraft/world/entity/monster/skeleton/Skeleton.java
+++ b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
@@ -65,6 +65,13 @@ public class Skeleton extends AbstractSkeleton {
@@ -328,10 +328,10 @@ index 64a6f4517f581f64a71382bdb302b71c68dc5396..a1ff5e589516bb46236ef1408f0f4f2f
public Brain<Villager> getBrain() {
return (Brain<Villager>)super.getBrain();
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
index f37710c48aafb11d65b99e4d37ef1382a8a36417..23a541f8d740d19df59b9e024156f497326a41cb 100644
index 457acdb4f5893303a4eea3d5e97404f1dcec8195..d4f15192c8fb7cc66c9e15ace3b72d7fc4ea575d 100644
--- a/net/minecraft/world/entity/raid/Raider.java
+++ b/net/minecraft/world/entity/raid/Raider.java
@@ -398,7 +398,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -396,7 +396,7 @@ public abstract class Raider extends PatrollingMonster {
}
private boolean cannotPickUpBanner() {

View File

@@ -1,19 +0,0 @@
From d44c75e006d2ffe1b3217d503036c0a070fc63ba Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/squid/Squid.java b/net/minecraft/world/entity/animal/squid/Squid.java
index 637cdcf459aaf78dc381d8a990b0e2c571c06de8..45e170bbcc72206ed0018440c435359084749a7f 100644
--- a/net/minecraft/world/entity/animal/squid/Squid.java
+++ b/net/minecraft/world/entity/animal/squid/Squid.java
@@ -51,10 +51,29 @@ public class Squid extends AgeableWaterCreature {
public Squid(final EntityType<? extends Squid> type, final Level level) {
super(type, level);
- // this.random.setSeed(this.getId()); // Paper - Share random for entities to make them more random
+ if (!level.purpurConfig.entitySharedRandom) this.random.setSeed(this.getId()); // Paper - Share random for entities to make them more random // Purpur - Add toggle for RNG manipulation
this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -626,5 +_,22 @@
@@ -634,5 +_,22 @@
DispenserBlock.registerBehavior(Items.TNT_MINECART, new MinecartDispenseItemBehavior(EntityTypes.TNT_MINECART));
DispenserBlock.registerBehavior(Items.HOPPER_MINECART, new MinecartDispenseItemBehavior(EntityTypes.HOPPER_MINECART));
DispenserBlock.registerBehavior(Items.COMMAND_BLOCK_MINECART, new MinecartDispenseItemBehavior(EntityTypes.COMMAND_BLOCK_MINECART));

View File

@@ -25,7 +25,7 @@
getTPS(this.tickTimes1m, interval),
getTPS(this.tickTimes5m, interval),
getTPS(this.tickTimes15m, interval)
@@ -955,6 +_,15 @@
@@ -1046,6 +_,15 @@
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -41,7 +41,7 @@
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1044,6 +_,8 @@
@@ -1140,6 +_,8 @@
this.safeShutdown(wait, false);
}
public void safeShutdown(final boolean wait, final boolean isRestarting) {
@@ -50,7 +50,7 @@
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (this.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1210,11 +_,21 @@
@@ -1321,11 +_,21 @@
}
// Paper end - Add onboarding message for initial server start
// Paper start - Improve outdated version checking
@@ -73,7 +73,7 @@
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
long thisTickNanos; // Paper - improve tick loop - diff on change, expect this to be tick interval
@@ -1228,9 +_,11 @@
@@ -1339,9 +_,11 @@
final long ticksBehind = Math.max(1L, this.tickSchedule.getPeriodsAhead(thisTickNanos, tickStart));
final long catchup = (long)Math.max(
1,
@@ -86,7 +86,7 @@
// adjust ticksBehind so that it is not greater-than catchup
if (ticksBehind - catchup > 0L) {
final long difference = ticksBehind - catchup;
@@ -1852,7 +_,7 @@
@@ -1972,7 +_,7 @@
}
public String getServerModName() {

View File

@@ -9,7 +9,7 @@
private final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this);
// CraftBukkit start
@@ -389,8 +_,25 @@
@@ -644,8 +_,25 @@
// CraftBukkit end
this.tickTime = tickTime;
this.server = server;
@@ -36,15 +36,15 @@
ChunkGenerator generator = levelStem.generator();
// CraftBukkit start
// Paper start - per-world time
@@ -481,6 +_,7 @@
this.environmentAttributes = EnvironmentAttributeSystem.builder().addDefaultLayers(this).build();
this.updateSkyBrightness();
@@ -739,6 +_,7 @@
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
+ this.preciseTime = this.serverLevelData.getGameTime(); // Purpur - Configurable daylight cycle
}
// Paper start
@@ -549,7 +_,7 @@
@@ -807,7 +_,7 @@
}
int percentage = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE);
@@ -53,7 +53,7 @@
Optional<Holder<WorldClock>> defaultClock = this.dimensionType().defaultClock();
org.bukkit.event.world.ClockTimeSkipEvent event = null; // Paper - per-world time
if (this.getGameRules().get(GameRules.ADVANCE_TIME) && defaultClock.isPresent()) {
@@ -759,9 +_,18 @@
@@ -1048,9 +_,18 @@
&& this.random.nextDouble() < difficulty.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses
&& !this.getBlockState(pos.below()).is(BlockTags.LIGHTNING_RODS);
if (isTrap) {
@@ -73,7 +73,7 @@
horse.setAge(0);
horse.setPos(pos.getX(), pos.getY(), pos.getZ());
this.addFreshEntity(horse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
@@ -796,9 +_,35 @@
@@ -1085,9 +_,35 @@
if (state.is(Blocks.SNOW)) {
int currentLayers = state.getValue(SnowLayerBlock.LAYERS);
if (currentLayers < Math.min(maxHeight, 8)) {
@@ -109,7 +109,7 @@
}
} else {
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, topPos, Blocks.SNOW.defaultBlockState(), Block.UPDATE_ALL, null); // CraftBukkit
@@ -819,7 +_,7 @@
@@ -1108,7 +_,7 @@
p -> p.is(PoiTypes.LIGHTNING_ROD),
lightningRodPos -> lightningRodPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, lightningRodPos.getX(), lightningRodPos.getZ()) - 1,
center,
@@ -118,7 +118,7 @@
PoiManager.Occupancy.ANY
);
return nearbyLightningRod.map(blockPos -> blockPos.above(1));
@@ -867,8 +_,26 @@
@@ -1156,8 +_,26 @@
int percentage = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE);
Component message;
if (this.sleepStatus.areEnoughSleeping(percentage)) {
@@ -145,7 +145,7 @@
message = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(percentage));
}
@@ -1034,6 +_,7 @@
@@ -1323,6 +_,7 @@
public void resetWeatherCycle() {
WeatherData weatherData = this.getWeatherData();
// CraftBukkit start
@@ -153,7 +153,7 @@
weatherData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1041,6 +_,7 @@
@@ -1330,6 +_,7 @@
weatherData.setRainTime(0);
}
// CraftBukkit end
@@ -161,7 +161,7 @@
weatherData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// CraftBukkit start
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
@@ -1690,7 +_,7 @@
@@ -2001,7 +_,7 @@
Explosion.BlockInteraction blockInteraction = switch (interactionType) {
case NONE -> Explosion.BlockInteraction.KEEP;
case BLOCK -> this.getDestroyType(GameRules.BLOCK_EXPLOSION_DROP_DECAY);
@@ -170,7 +170,7 @@
? this.getDestroyType(GameRules.MOB_EXPLOSION_DROP_DECAY)
: Explosion.BlockInteraction.KEEP;
case TNT -> this.getDestroyType(GameRules.TNT_EXPLOSION_DROP_DECAY);
@@ -2586,7 +_,7 @@
@@ -2920,7 +_,7 @@
// Spigot start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -436,6 +_,9 @@
@@ -441,6 +_,9 @@
public boolean isRealPlayer; // Paper
public com.destroystokyo.paper.event.entity.@Nullable PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
public org.bukkit.event.player.PlayerQuitEvent.@Nullable 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
@@ -8,9 +8,9 @@
+ private boolean compassBar = false; // Purpur - Add compass command
+ private boolean ramBar = false; // Purpur - Implement rambar commands
public ServerPlayer(final MinecraftServer server, final ServerLevel level, final GameProfile gameProfile, final ClientInformation clientInformation) {
super(level, gameProfile);
@@ -480,6 +_,9 @@
// Paper start - rewrite chunk system
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
@@ -515,6 +_,9 @@
this.respawnConfig = input.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null);
this.spawnExtraParticlesOnFall = input.getBooleanOr("spawn_extra_particles_on_fall", false);
this.raidOmenPosition = input.read("raid_omen_position", BlockPos.CODEC).orElse(null);
@@ -20,7 +20,7 @@
// Paper start - Expand PlayerGameModeChangeEvent
this.loadGameTypes(input);
}
@@ -522,6 +_,9 @@
@@ -557,6 +_,9 @@
output.store("ShoulderEntityRight", CompoundTag.CODEC, this.getShoulderEntityRight());
}
this.getBukkitEntity().setExtraData(output); // CraftBukkit
@@ -30,15 +30,15 @@
}
private void saveParentVehicle(final ValueOutput playerOutput) {
@@ -1158,6 +_,7 @@
@@ -1194,6 +_,7 @@
// Paper - moved up to sendClientboundPlayerCombatKillPacket()
sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent
this.sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent
Team team = this.getTeam();
+ if (org.purpurmc.purpur.PurpurConfig.deathMessageOnlyBroadcastToAffectedPlayer) this.sendSystemMessage(deathMessage); else // Purpur - Configurable broadcast settings
if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) {
this.server.getPlayerList().broadcastSystemMessage(deathMessage, false);
} else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) {
@@ -1267,6 +_,13 @@
@@ -1303,6 +_,13 @@
return false;
}
@@ -52,7 +52,7 @@
Entity entity = source.getEntity();
if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false.
!(entity instanceof Player player && !this.canHarmPlayer(player))
@@ -1508,7 +_,7 @@
@@ -1544,7 +_,7 @@
}
if (newLevel.dimension() == lastDimension) {
@@ -61,7 +61,7 @@
this.connection.resetPosition();
transition.postTeleportTransition().onTransition(this);
return this;
@@ -1531,6 +_,7 @@
@@ -1567,6 +_,7 @@
profiler.pop();
profiler.push("placing");
@@ -69,7 +69,7 @@
this.setServerLevel(newLevel);
this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
@@ -1643,7 +_,7 @@
@@ -1679,7 +_,7 @@
new AABB(bedCenter.x() - 8.0, bedCenter.y() - 5.0, bedCenter.z() - 8.0, bedCenter.x() + 8.0, bedCenter.y() + 5.0, bedCenter.z() + 8.0),
monster -> monster.isPreventingPlayerRest(this.level(), this)
);
@@ -78,7 +78,7 @@
return Either.left(Player.BedSleepingProblem.NOT_SAFE);
}
}
@@ -1679,7 +_,17 @@
@@ -1715,7 +_,17 @@
CriteriaTriggers.SLEPT_IN_BED.trigger(this);
});
if (!this.level().canSleepThroughNights()) {
@@ -97,7 +97,7 @@
}
this.level().updateSleepingPlayerList();
@@ -1774,6 +_,7 @@
@@ -1810,6 +_,7 @@
@Override
public void openTextEdit(final SignBlockEntity sign, final boolean isFrontText) {
@@ -105,7 +105,7 @@
this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos()));
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), isFrontText));
}
@@ -2118,6 +_,26 @@
@@ -2154,6 +_,26 @@
this.lastSentExp = -1; // CraftBukkit - Added to reset
}
@@ -132,7 +132,7 @@
@Override
public void completeUsingItem() {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@@ -2355,6 +_,20 @@
@@ -2391,6 +_,20 @@
);
}
@@ -153,7 +153,7 @@
@Override
public void sendSystemMessage(final Component message) {
this.sendSystemMessage(message, false);
@@ -2506,7 +_,67 @@
@@ -2542,7 +_,67 @@
public void resetLastActionTime() {
this.lastActionTime = Util.getMillis();
@@ -222,7 +222,7 @@
public ServerStatsCounter getStats() {
return this.stats;
@@ -3131,4 +_,65 @@
@@ -3167,4 +_,65 @@
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/WorldGenRegion.java
+++ b/net/minecraft/server/level/WorldGenRegion.java
@@ -297,6 +_,7 @@
@@ -327,6 +_,7 @@
int chunkX = SectionPos.blockToSectionCoord(pos.getX());
int chunkZ = SectionPos.blockToSectionCoord(pos.getZ());
// Paper start - Buffer OOB setBlock calls

View File

@@ -34,7 +34,7 @@
this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
}
}
@@ -685,6 +_,8 @@
@@ -696,6 +_,8 @@
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@@ -43,7 +43,7 @@
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.cserver.getPluginManager().callEvent(event);
@@ -741,6 +_,7 @@
@@ -775,6 +_,7 @@
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
if (packet.getId() == this.awaitingTeleport) {
if (this.awaitingPositionFromClient == null) {
@@ -51,7 +51,7 @@
this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause
return;
}
@@ -1312,6 +_,10 @@
@@ -1346,6 +_,10 @@
final int maxBookPageSize = pageMax.intValue();
final double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D);
long byteAllowed = maxBookPageSize;
@@ -62,7 +62,7 @@
for (final String page : pageList) {
final int byteLength = page.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
byteTotal += byteLength;
@@ -1336,7 +_,8 @@
@@ -1370,7 +_,8 @@
}
if (byteTotal > byteAllowed) {
@@ -72,7 +72,7 @@
this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect
return;
}
@@ -1355,31 +_,45 @@
@@ -1389,31 +_,45 @@
Optional<String> title = packet.title();
title.ifPresent(contents::add);
contents.addAll(packet.pages());
@@ -122,7 +122,7 @@
writtenBook.set(
DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(title), this.player.getPlainTextName(), 0, pages, true)
);
@@ -1392,6 +_,16 @@
@@ -1426,6 +_,16 @@
return this.player.isTextFilteringEnabled() ? Filterable.passThrough(text.filteredOrEmpty()) : Filterable.from(text);
}
@@ -139,7 +139,7 @@
@Override
public void handleEntityTagQuery(final ServerboundEntityTagQueryPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
@@ -1431,7 +_,15 @@
@@ -1465,7 +_,15 @@
@Override
public void handleMovePlayer(final ServerboundMovePlayerPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
@@ -156,7 +156,7 @@
this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause
} else {
ServerLevel level = this.player.level();
@@ -1615,7 +_,7 @@
@@ -1650,7 +_,7 @@
movedWrongly = true;
if (event.getLogWarning())
// Paper end
@@ -165,7 +165,7 @@
} // Paper
}
@@ -1670,6 +_,8 @@
@@ -1715,6 +_,8 @@
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@@ -174,7 +174,7 @@
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.cserver.getPluginManager().callEvent(event);
@@ -1725,6 +_,13 @@
@@ -1770,6 +_,13 @@
this.player.tryResetCurrentImpulseContext();
}
@@ -188,7 +188,7 @@
this.player.checkMovementStatistics(this.player.getX() - startX, this.player.getY() - startY, this.player.getZ() - startZ);
this.lastGoodX = this.player.getX();
this.lastGoodY = this.player.getY();
@@ -1745,6 +_,17 @@
@@ -1790,6 +_,17 @@
}
}
@@ -206,7 +206,7 @@
private boolean shouldCheckPlayerMovement(final boolean isFallFlying) {
if (this.isSingleplayerOwner()) {
return false;
@@ -2158,6 +_,7 @@
@@ -2231,6 +_,7 @@
boolean cancelled;
if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) {
@@ -214,7 +214,7 @@
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemStack, hand);
cancelled = event.useItemInHand() == Event.Result.DENY;
} else {
@@ -2801,6 +_,7 @@
@@ -2874,6 +_,7 @@
ItemStack mainHandItem = this.player.getMainHandItem();
if (this.player.isWithinAttackRange(mainHandItem, targetBounds, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0))) { // Paper - configurable lenience
if (!mainHandItem.has(DataComponents.PIERCING_WEAPON)) {
@@ -222,7 +222,7 @@
if (target instanceof ItemEntity
|| target instanceof ExperienceOrb
|| target == this.player
@@ -3584,7 +_,7 @@
@@ -3656,7 +_,7 @@
@Override
public void handleChangeGameMode(final ServerboundChangeGameModePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());

View File

@@ -3,12 +3,12 @@
@@ -165,6 +_,7 @@
SlotProvider,
DebugValueSource,
TypedInstance<EntityType<?>> {
TypedInstance<EntityType<?>>, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
+ public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
static boolean isLevelAtLeast(ValueInput input, int level) {
@@ -341,8 +_,9 @@
@@ -297,8 +_,9 @@
public double xOld;
public double yOld;
public double zOld;
@@ -19,7 +19,7 @@
public int tickCount;
private int remainingFireTicks;
private final EntityFluidInteraction fluidInteraction = new EntityFluidInteraction(Set.of(FluidTags.WATER, FluidTags.LAVA));
@@ -375,8 +_,8 @@
@@ -331,8 +_,8 @@
public @Nullable PortalProcessor portalProcess;
public int portalCooldown;
private boolean invulnerable;
@@ -30,7 +30,7 @@
private boolean hasGlowingTag;
private final Set<String> tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl
private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
@@ -427,6 +_,7 @@
@@ -382,6 +_,7 @@
private final int despawnTime; // Paper - entity despawn time limit
public int totalEntityAge; // Paper - age-like counter for all entities
public final io.papermc.paper.entity.activation.ActivationType activationType = io.papermc.paper.entity.activation.ActivationType.activationTypeFor(this); // Paper - EAR 2/tracking ranges
@@ -38,9 +38,9 @@
// Paper start - EAR 2
public final boolean defaultActivationState;
public long activatedTick = Integer.MIN_VALUE;
@@ -444,11 +_,23 @@
@@ -549,11 +_,23 @@
}
// Paper end
// Paper end - optimise entity tracker
+ // Purpur start - Add canSaveToDisk to Entity
+ public boolean canSaveToDisk() {
@@ -62,7 +62,7 @@
this.position = Vec3.ZERO;
this.blockPosition = BlockPos.ZERO;
this.chunkPosition = ChunkPos.ZERO;
@@ -850,6 +_,7 @@
@@ -955,6 +_,7 @@
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage
@@ -70,7 +70,7 @@
this.onBelowWorld();
}
}
@@ -1945,7 +_,7 @@
@@ -2092,7 +_,7 @@
}
public boolean fireImmune() {
@@ -79,7 +79,7 @@
}
public boolean causeFallDamage(final double fallDistance, final float damageModifier, final DamageSource damageSource) {
@@ -2531,7 +_,7 @@
@@ -2682,7 +_,7 @@
output.putBoolean("Bukkit.invisible", this.persistentInvisibility);
}
// SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
@@ -88,7 +88,7 @@
output.putInt("Bukkit.MaxAirSupply", this.getMaxAirSupply());
}
output.putInt("Spigot.ticksLived", this.totalEntityAge); // Paper
@@ -2617,6 +_,11 @@
@@ -2768,6 +_,11 @@
output.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -100,7 +100,7 @@
} catch (Throwable t) {
CrashReport report = CrashReport.forThrowable(t, "Saving entity NBT");
CrashReportCategory category = report.addCategory("Entity being saved");
@@ -2740,6 +_,9 @@
@@ -2891,6 +_,9 @@
}
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
// Paper end
@@ -110,7 +110,7 @@
} catch (Throwable t) {
CrashReport report = CrashReport.forThrowable(t, "Loading entity NBT");
CrashReportCategory category = report.addCategory("Entity being loaded");
@@ -2916,6 +_,7 @@
@@ -3156,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
@@ -118,7 +118,7 @@
// Paper start - EntityUnleashEvent
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
leashable, player, hand, !player.hasInfiniteMaterials(), true
@@ -3323,15 +_,18 @@
@@ -3563,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -138,7 +138,7 @@
}
}
}
@@ -4065,7 +_,7 @@
@@ -4311,7 +_,7 @@
}
public boolean canUsePortal(final boolean ignorePassenger) {
@@ -147,7 +147,7 @@
}
public boolean canTeleport(final Level from, final Level to) {
@@ -4615,6 +_,12 @@
@@ -4863,6 +_,12 @@
return Mth.lerp(partial, this.yRotO, this.yRot);
}
@@ -160,7 +160,7 @@
public boolean touchingUnloadedChunk() {
AABB box = this.getBoundingBox().inflate(1.0);
int x0 = Mth.floor(box.minX);
@@ -4909,7 +_,7 @@
@@ -5166,7 +_,7 @@
}
public float maxUpStep() {

View File

@@ -105,7 +105,7 @@
if (damage < 0.0F) {
damage = 0.0F;
}
@@ -1724,10 +_,10 @@
@@ -1722,10 +_,10 @@
protected @Nullable Player resolvePlayerResponsibleForDamage(final DamageSource source) {
Entity sourceEntity = source.getEntity();
if (sourceEntity instanceof Player playerSource) {
@@ -118,7 +118,7 @@
} else {
this.lastHurtByPlayer = null;
this.lastHurtByPlayerMemoryTime = 0;
@@ -1779,6 +_,17 @@
@@ -1777,6 +_,17 @@
}
}
@@ -136,23 +136,18 @@
final org.bukkit.inventory.EquipmentSlot handSlot = (usedHand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(usedHand) : null;
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
event.setCancelled(protectionItem == null);
@@ -1956,6 +_,7 @@
@@ -1930,8 +_,10 @@
protected void dropAllDeathLoot(final ServerLevel level, final DamageSource source) {
boolean playerKilled = this.lastHurtByPlayerMemoryTime > 0;
this.dropEquipment(level); // CraftBukkit - from below
if (this.shouldDropLoot(level)) {
+ if (!(source.is(net.minecraft.world.damagesource.DamageTypes.CRAMMING) && level().purpurConfig.disableDropsOnCrammingDeath)) { // Purpur - Disable loot drops on death by cramming
this.dropFromLootTable(level, source, playerKilled);
// Paper start
final boolean prev = this.clearEquipmentSlots;
@@ -1964,6 +_,7 @@
// Paper end
this.dropCustomDeathLoot(level, source, playerKilled);
this.clearEquipmentSlots = prev; // Paper
+ } // Purpur - Disable loot drops on death by cramming
+ }
}
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
@@ -3323,6 +_,7 @@
this.dropEquipment(level);
@@ -3280,6 +_,7 @@
float dmg = (float)(diff * 10.0 - 3.0);
if (dmg > 0.0F) {
this.playSound(this.getFallDamageSound((int)dmg), 1.0F, 1.0F);
@@ -160,7 +155,7 @@
this.hurt(this.damageSources().flyIntoWall(), dmg);
}
}
@@ -4816,6 +_,12 @@
@@ -4773,6 +_,12 @@
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.typeHolder());
}

View File

@@ -61,7 +61,7 @@
// Paper start - allow changing despawnInPeaceful
this.despawnInPeacefulOverride = readDespawnInPeacefulOverride(input);
}
@@ -1289,7 +_,7 @@
@@ -1287,7 +_,7 @@
);
}
@@ -70,7 +70,7 @@
return groupData;
}
@@ -1646,6 +_,7 @@
@@ -1644,6 +_,7 @@
}
this.postPiercingAttack();

View File

@@ -1,11 +1,11 @@
--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
@@ -95,7 +_,7 @@
return true;
@@ -96,7 +_,7 @@
};
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = poiManager.findAllClosestFirstWithType(
- poiType, cacheTest, body.blockPosition(), SCAN_RANGE, PoiManager.Occupancy.HAS_SPACE
+ poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE // Purpur - Configurable villager search radius
)
.limit(5L)
.filter(px -> validPoi.test(level, (BlockPos)px.getSecond()))
// Paper start - optimise POI searches
java.util.List<Pair<Holder<PoiType>, BlockPos>> poiPositionsRaw = new java.util.ArrayList<>();
- ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), SCAN_RANGE, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw);
+ ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw); // Purpur - Configurable villager search radius
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = new java.util.HashSet<>(poiPositionsRaw.size());
for (Pair<Holder<PoiType>, BlockPos> pair : poiPositionsRaw) {
if (validPoi.test(level, pair.getSecond())) {

View File

@@ -20,10 +20,10 @@
}
@Override
@@ -722,6 +_,29 @@
return slot == EquipmentSlot.MAINHAND;
@@ -715,6 +_,29 @@
private boolean trusts(final LivingEntity entity) {
return this.getTrustedEntities().anyMatch(trusted -> trusted.matches(entity));
}
// Paper end
+
+ // Purpur start - Tulips change fox type
+ @Override
@@ -49,4 +49,4 @@
+ // Purpur end - Tulips change fox type
@Override
// Paper start - Cancellable death event
// Paper start - Fix MC-153010 (dropCustomDeathLoot is only called when shouldDropLoot = true)

View File

@@ -1,6 +1,15 @@
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -968,6 +_,7 @@
@@ -615,7 +_,7 @@
}
int xpCount = 500;
- if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) {
+ if (this.dragonFight != null && (level().purpurConfig.enderDragonAlwaysDropsFullExp || !this.dragonFight.hasPreviouslyKilledDragon())) { // Purpur - Ender dragon always drop full exp
xpCount = 12000;
}
xpCount = this.expToDrop; // CraftBukkit - SPIGOT-2420: Moved up to #getExpReward method
@@ -960,6 +_,7 @@
@Override
protected boolean canRide(final Entity vehicle) {
@@ -8,12 +17,3 @@
return false;
}
@@ -1003,7 +_,7 @@
boolean shouldDrop = level.getGameRules().get(GameRules.MOB_DROPS);
int xpCount = 500;
- if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) {
+ if (this.dragonFight != null && (level().purpurConfig.enderDragonAlwaysDropsFullExp || !this.dragonFight.hasPreviouslyKilledDragon())) { // Purpur - Ender dragon always drop full exp
xpCount = 12000;
}

View File

@@ -14,7 +14,7 @@
}
public ArmorStand(final Level level, final double x, final double y, final double z) {
@@ -547,6 +_,7 @@
@@ -550,6 +_,7 @@
// Paper start - Allow ArmorStands not to tick
@Override
public void tick() {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -182,6 +_,11 @@
@@ -183,6 +_,11 @@
public static boolean checkPiglinSpawnRules(
final EntityType<Piglin> type, final LevelAccessor level, final EntitySpawnReason spawnReason, final BlockPos pos, final RandomSource random
) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -664,14 +_,24 @@
@@ -660,14 +_,24 @@
}
public static boolean isWearingSafeArmor(final LivingEntity livingEntity) {

View File

@@ -1,14 +1,14 @@
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -452,6 +_,7 @@
@@ -456,6 +_,7 @@
// revert back all captured blocks
for (org.bukkit.block.BlockState blockstate : blocks) {
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace(true); // poi updates needs to be skipped since the poi were never registered as part of the capture
+ ((org.bukkit.craftbukkit.block.CraftBlock) blockstate.getBlock()).getBlockState().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
for (org.bukkit.craftbukkit.block.CraftBlockState snapshot : capturedBlockStates) {
snapshot.revertPlace(true); // poi updates needs to be skipped since the poi were never registered as part of the capture
+ snapshot.getBlock().getBlockState().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
}
SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
@@ -475,6 +_,7 @@
} else {
// Change the stack to its new contents if it hasn't been tampered with.
@@ -477,6 +_,7 @@
if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically
block.onPlace(level, newPos, oldBlock, true, context);
}
@@ -16,7 +16,7 @@
level.notifyAndUpdatePhysics(newPos, null, oldBlock, block, level.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
}
@@ -579,6 +_,26 @@
@@ -566,6 +_,26 @@
return this.isDamageableItem() && this.getDamageValue() > 0;
}
@@ -43,7 +43,7 @@
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
@@ -1237,6 +_,12 @@
@@ -1230,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/EntityGetter.java
+++ b/net/minecraft/world/level/EntityGetter.java
@@ -142,7 +_,7 @@
@@ -183,7 +_,7 @@
default boolean hasNearbyAlivePlayer(final double x, final double y, final double z, final double range) {
for (Player player : this.players()) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -171,10 +_,54 @@
@@ -172,10 +_,54 @@
}
// Paper end - add paper world config
@@ -55,7 +55,7 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -220,6 +_,8 @@
@@ -853,6 +_,8 @@
final org.bukkit.NamespacedKey worldKey = CraftNamespacedKey.fromMinecraft(dimension.identifier()); // Paper
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, worldKey); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -64,8 +64,8 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, worldKey, biomeProvider, environment);
@@ -1505,4 +_,14 @@
return ret;
@@ -2203,4 +_,14 @@
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
}
// Paper end - allow patching this logic
+

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/NaturalSpawner.java
+++ b/net/minecraft/world/level/NaturalSpawner.java
@@ -213,7 +_,7 @@
@@ -286,7 +_,7 @@
pos.set(x, yStart, z);
double xx = x + 0.5;
double zz = z + 0.5;

View File

@@ -1,9 +1,9 @@
--- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java
@@ -341,6 +_,23 @@
}
public int explode() {
@@ -631,6 +_,23 @@
this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH];
this.mutablePos = new BlockPos.MutableBlockPos();
// Paper end - collision optimisations
+ // Purpur start - add PreExplodeEvents
+ if (this.source != null) {
+ org.bukkit.Location location = new org.bukkit.Location(this.level.getWorld(), this.center.x, this.center.y, this.center.z);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/WitherSkullBlock.java
+++ b/net/minecraft/world/level/block/WitherSkullBlock.java
@@ -69,6 +_,7 @@
@@ -68,6 +_,7 @@
);
witherBoss.yBodyRot = match.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F;
witherBoss.makeInvulnerable();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -106,6 +_,10 @@
@@ -107,6 +_,10 @@
input.read("PublicBukkitValues", CompoundTag.CODEC)
.ifPresent(this.persistentDataContainer::putAll);
// Paper end - read persistent data container
@@ -11,7 +11,7 @@
}
public final void loadWithComponents(final ValueInput input) {
@@ -123,6 +_,11 @@
@@ -124,6 +_,11 @@
output.store("PublicBukkitValues", CompoundTag.CODEC, this.persistentDataContainer.toTagCompound());
}
// CraftBukkit end
@@ -23,7 +23,7 @@
}
public final CompoundTag saveWithFullMetadata(final HolderLookup.Provider registries) {
@@ -388,4 +_,16 @@
@@ -390,4 +_,16 @@
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
}
}

View File

@@ -2,9 +2,9 @@
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -94,6 +_,7 @@
ListTag entities = new ListTag();
final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
chunk.getEntities().forEach(e -> {
TagValueOutput output = TagValueOutput.createWithContext(reporter.forChild(e.problemPath()), e.registryAccess());
+ if (!e.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity
if (e.save(output)) {
CompoundTag result = output.buildResult();
entities.add(result);
// Paper start - Entity load/save limit per chunk
final EntityType<?> entityType = e.getType();
final int saveLimit = this.level.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -309,7 +_,7 @@
// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {
- LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - 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.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4);
+ LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - DO NOT REPORT THIS TO PURPUR - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4); // Purpur - Rebrand
}
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/material/FlowingFluid.java
+++ b/net/minecraft/world/level/material/FlowingFluid.java
@@ -192,7 +_,7 @@
@@ -234,7 +_,7 @@
}
}
@@ -9,7 +9,7 @@
BlockState belowState = level.getBlockState(mutablePos.setWithOffset(pos, Direction.DOWN));
FluidState belowFluid = belowState.getFluidState();
if (belowState.isSolid() || this.isSourceBlockOfThisType(belowFluid)) {
@@ -280,6 +_,12 @@
@@ -320,6 +_,12 @@
}
protected abstract boolean canConvertToSource(ServerLevel level);

View File

@@ -36,10 +36,10 @@ index de6fe0b783a145f6571bf73665e7107430f22592..612e3457d537d6129437443753cad3e4
+ // Purpur end - Ridables
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a3f9ebbd03c355168c8ea72e8d9f0e222712c61d..fbd78d4f06deaddb0954863cdf4eac47ce80e0b7 100644
index 72bc687efb64e0b3b3802775b2d1b8b133b092fb..dfe878e2bcbf10c8b148b755db3e3ba05b575d8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -654,6 +654,15 @@ public class CraftEventFactory {
@@ -656,6 +656,15 @@ public class CraftEventFactory {
}
craftServer.getPluginManager().callEvent(event);
@@ -55,7 +55,7 @@ index a3f9ebbd03c355168c8ea72e8d9f0e222712c61d..fbd78d4f06deaddb0954863cdf4eac47
return event;
}
@@ -1159,6 +1168,7 @@ public class CraftEventFactory {
@@ -1156,6 +1165,7 @@ public class CraftEventFactory {
EntityDamageEvent event;
if (damager != null) {
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, critical);

View File

@@ -24,10 +24,10 @@ index 612e3457d537d6129437443753cad3e48590d542..a188eb750d6371f7e550a8971135a81d
Preconditions.checkArgument(entity != null, "Unknown entity");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 77fc83bfe613d0e795d8623584bc79ee51d46b59..489aa599f979433ec2ae8c9a77aa9c2b0c6f0662 100644
index 033f0bc33c7a1fb5d16f354953242f9eeb30d309..46b1ee090e483206846fddc1cd273b389753b042 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1137,4 +1137,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1138,4 +1138,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
manager.untrackWaypoint(getHandle());
manager.trackWaypoint(getHandle());
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1947,6 +_,52 @@
@@ -1951,6 +_,52 @@
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -495,7 +_,7 @@
@@ -496,7 +_,7 @@
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
this.getHandle().setLastHurtByMob(nmsKiller);
if (nmsKiller != null) {