diff --git a/gradle.properties b/gradle.properties index ec2379c30..96931302c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,5 +25,5 @@ pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish pufferfishBranch = ver/1.21 usePufferfish = false -paperCommit = ce0a0419476d1072ca739a0e8f22d8a358c1c1a2 +paperCommit = 99f4bb29ba77964304a37e51b7f1824a4a6032af purpurCommit = c6802b0a27f1f8faac4ad30f902810fd0ed8051e diff --git a/patches/server/0001-Purpur-Server-Changes.patch b/patches/server/0001-Purpur-Server-Changes.patch index 87fa25e54..da9af23f0 100644 --- a/patches/server/0001-Purpur-Server-Changes.patch +++ b/patches/server/0001-Purpur-Server-Changes.patch @@ -897,7 +897,7 @@ index bf8c511739265c6a9cd277752e844481598f8966..ffe2399ab6b1f311536475d8216238b5 // CraftBukkit start diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 4a8356a714ed50d4a32bcf046a2e16491bef014b..56e47c5709c765943407d2065b25bd512d1f9388 100644 +index e693a003ea8f022eef8b49e4332025b769333b30..44a31f6f44885598ee06e88b940b84b1e89e5430 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -617,11 +617,20 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -3101,7 +3101,7 @@ index d2d82e4f22bfeac8881b6815e4bef56c254fded9..abc92e09b7bb636612f04ace8232947c } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1fcd9cd9344b0d2c4752042b07142db7d727dce8..7d57f9b7fc4837f0f44f5c1cb76a5751a15b9254 100644 +index 30de3d1a7792c38ae946f19cb0e14637919b5001..d823c9dc6d898f55e677dc320c84a4d8696671b1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -419,6 +419,7 @@ public abstract class PlayerList { @@ -3688,10 +3688,10 @@ index 303cefba51e19ac43b1f6188ad64ef480715ebaf..98ec88751b3e71c2e7aad633096b7f41 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe09201cac2a1 100644 +index a0876d3f88620bb24ef69101fc67b0dcd5dca0d2..d6d9dd17750d7028e13aad539e7b65a7561d9f4b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -176,7 +176,7 @@ import org.bukkit.plugin.PluginManager; +@@ -177,7 +177,7 @@ import org.bukkit.plugin.PluginManager; // CraftBukkit end public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker @@ -3700,7 +3700,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 // CraftBukkit start private static final int CURRENT_LEVEL = 2; public boolean preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; keep initial motion on first setPositionRotation -@@ -343,6 +343,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -344,6 +344,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public double xOld; public double yOld; public double zOld; @@ -3708,7 +3708,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 public boolean noPhysics; private boolean wasOnFire; public final RandomSource random; -@@ -383,7 +384,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -384,7 +385,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private final Set tags; private final double[] pistonDeltas; private long pistonDeltasGameTime; @@ -3717,7 +3717,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 private float eyeHeight; public boolean isInPowderSnow; public boolean wasInPowderSnow; -@@ -431,6 +432,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -432,6 +433,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean fixedPose = false; // Paper - Expand Pose API @@ -3725,7 +3725,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -610,6 +612,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -611,6 +613,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } // Paper end - optimise entity tracker @@ -3753,7 +3753,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); -@@ -618,7 +641,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -619,7 +642,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -3762,7 +3762,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); -@@ -924,9 +947,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -925,9 +948,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public void baseTick() { @@ -3774,7 +3774,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups this.inBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -995,7 +1018,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -996,7 +1019,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -3783,7 +3783,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } public void setSharedFlagOnFire(boolean onFire) { -@@ -1009,6 +1032,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1010,6 +1033,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage @@ -3791,7 +3791,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 this.onBelowWorld(); } -@@ -1221,9 +1245,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1222,9 +1246,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -3803,7 +3803,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1232,7 +1256,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1233,7 +1257,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -3812,7 +3812,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 return; } // Paper end -@@ -1253,8 +1277,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1254,8 +1278,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z); } @@ -3823,7 +3823,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 boolean flag = !Mth.equal(movement.x, vec3d1.x); boolean flag1 = !Mth.equal(movement.z, vec3d1.z); -@@ -1276,7 +1300,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1277,7 +1301,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (this.isRemoved()) { @@ -3832,7 +3832,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } else { if (this.horizontalCollision) { Vec3 vec3d2 = this.getDeltaMovement(); -@@ -1325,7 +1349,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1326,7 +1350,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess float f = this.getBlockSpeedFactor(); this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f)); @@ -3841,7 +3841,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } } // Paper start - detailed watchdog information -@@ -1970,7 +1994,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1971,7 +1995,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -3850,7 +3850,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -2043,7 +2067,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2044,7 +2068,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.isInWater() || flag; } @@ -3859,7 +3859,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 Entity entity = this.getVehicle(); if (entity instanceof AbstractBoat abstractboat) { -@@ -2725,6 +2749,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2726,6 +2750,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess nbttagcompound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -3871,7 +3871,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2873,6 +2902,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2874,6 +2903,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -3883,7 +3883,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -3124,6 +3158,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3125,6 +3159,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.isAlive() && this instanceof Leashable leashable) { if (leashable.getLeashHolder() == player) { if (!this.level().isClientSide()) { @@ -3891,7 +3891,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 // CraftBukkit start - fire PlayerUnleashEntityEvent // Paper start - Expand EntityUnleashEvent org.bukkit.event.player.PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); -@@ -3329,6 +3364,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3330,6 +3365,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.passengers = ImmutableList.copyOf(list); } @@ -3905,7 +3905,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); } } -@@ -3368,6 +3410,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3369,6 +3411,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // CraftBukkit end @@ -3920,7 +3920,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 if (this.passengers.size() == 1 && this.passengers.get(0) == entity) { this.passengers = ImmutableList.of(); } else { -@@ -3448,14 +3498,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3449,14 +3499,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Vec3.directionFromRotation(this.getRotationVector()); } @@ -3939,7 +3939,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } } else { this.portalProcess = new PortalProcessor(portal, pos.immutable()); -@@ -3471,9 +3524,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3472,9 +3525,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.processPortalCooldown(); if (this.portalProcess != null) { if (this.portalProcess.processPortalTeleportation(worldserver, this, this.canUsePortal(false))) { @@ -3951,7 +3951,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 this.setPortalCooldown(); TeleportTransition teleporttransition = this.portalProcess.getPortalDestination(worldserver, this); -@@ -3485,7 +3538,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3486,7 +3539,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -3960,7 +3960,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } else if (this.portalProcess.hasExpired()) { this.portalProcess = null; } -@@ -3672,7 +3725,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3673,7 +3726,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public int getMaxAirSupply() { @@ -3969,7 +3969,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } public int getAirSupply() { -@@ -4038,12 +4091,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4039,12 +4092,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -3985,7 +3985,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 return null; } else { // Paper start - Fix item duplication and teleport issues -@@ -4069,7 +4122,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4070,7 +4123,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess world.resetEmptyTime(); teleportTarget.postTeleportTransition().onTransition(entity); @@ -3994,7 +3994,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 return entity; } } -@@ -4170,7 +4223,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4171,7 +4224,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public boolean canUsePortal(boolean allowVehicles) { @@ -4003,7 +4003,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } public boolean canTeleport(Level from, Level to) { -@@ -4729,6 +4782,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4759,6 +4812,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Mth.lerp(delta, this.yRotO, this.yRot); } @@ -4016,7 +4016,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { if (this.touchingUnloadedChunk()) { -@@ -5130,7 +5189,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5160,7 +5219,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { @@ -4025,7 +4025,7 @@ index 341c324d15996a74b113f8879d7da737a1be86a1..aac88848871d236bc440ee1a7e6fe092 } public void onExplosionHit(@Nullable Entity entity) {} -@@ -5331,4 +5390,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5361,4 +5420,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end - Expose entity id counter @@ -4210,7 +4210,7 @@ index b851c3ee1426bc0a259bf6c4a662af0c9883dd71..3283228d7ebf98ce98780725a0a412be protected ParticleOptions getInkParticle() { return ParticleTypes.GLOW_SQUID_INK; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468284b0858 100644 +index e86314de8d908a0c3e9f17d3e163c11180cf3f59..d3d4e7e01afeb4ace5e487f9ef0926fd987c8ca4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -248,9 +248,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -4455,7 +4455,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> { -@@ -3123,6 +3190,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3124,6 +3191,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (f > 0.0F) { this.playSound(this.getFallDamageSound((int) f), 1.0F, 1.0F); @@ -4463,7 +4463,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 this.hurt(this.damageSources().flyIntoWall(), f); } } -@@ -3315,12 +3383,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3316,12 +3384,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.run += (f3 - this.run) * 0.3F; @@ -4480,7 +4480,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 // Paper start - stop large pitch and yaw changes from crashing the server this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; -@@ -3332,7 +3400,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3333,7 +3401,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; // Paper end @@ -4489,7 +4489,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 this.animStep += f2; if (this.isFallFlying()) { ++this.fallFlyTicks; -@@ -3562,21 +3630,21 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3563,21 +3631,21 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.setDeltaMovement(d0, d1, d2); @@ -4517,7 +4517,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 if (this.jumping && this.isAffectedByFluids()) { double d3; -@@ -3603,8 +3671,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3604,8 +3672,8 @@ public abstract class LivingEntity extends Entity implements Attackable { this.noJumpDelay = 0; } @@ -4528,7 +4528,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 this.xxa *= 0.98F; this.zza *= 0.98F; if (this.isFallFlying()) { -@@ -3637,8 +3705,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3638,8 +3706,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.calculateEntityAnimation(this instanceof FlyingAnimal); @@ -4539,7 +4539,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API int i = this.getTicksFrozen(); -@@ -3659,18 +3727,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3660,18 +3728,20 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -4565,7 +4565,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 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()); -@@ -3680,6 +3750,21 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3681,6 +3751,21 @@ public abstract class LivingEntity extends Entity implements Attackable { this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); } } @@ -4587,7 +4587,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 } // Paper end - Add EntityMoveEvent world = this.level(); -@@ -3689,6 +3774,34 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3690,6 +3775,34 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -4622,7 +4622,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 } public boolean isSensitiveToWater() { -@@ -3715,7 +3828,17 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3716,7 +3829,17 @@ public abstract class LivingEntity extends Entity implements Attackable { }).toList(); EquipmentSlot enumitemslot = (EquipmentSlot) Util.getRandom(list, this.random); @@ -4641,7 +4641,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 } this.gameEvent(GameEvent.ELYTRA_GLIDE); -@@ -3724,7 +3847,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3725,7 +3848,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } @@ -4650,7 +4650,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 if (!this.onGround() && !this.isPassenger() && !this.hasEffect(MobEffects.LEVITATION)) { Iterator iterator = EquipmentSlot.VALUES.iterator(); -@@ -4646,7 +4769,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4647,7 +4770,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (equippable != null && equippable.dispensable()) { EquipmentSlot enumitemslot = equippable.slot(); @@ -4659,7 +4659,7 @@ index 9c61225a728a2ca91a1c71dead75fc7cd93668b6..3349eefb4363041f77f95667a61d4468 } else { return false; } -@@ -4671,6 +4794,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4672,6 +4795,12 @@ public abstract class LivingEntity extends Entity implements Attackable { return equippable == null ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType()); } @@ -14959,13 +14959,13 @@ index 1fdbef16cd29c8fc74578ac3328f985eca61088d..56c265940208bc94f531a5af94f564b5 public static enum Status { diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index d277f56fef882313d6d21f636fafae2f26630ad7..a1593297b6764ba0229cc1c8f5a55aef107ff9df 100644 +index ce91809d66007def728a127a0a9d33f6235cc94d..bd4e4f03c4b70247c7fc887854e0aa01a8af81c6 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -92,6 +92,7 @@ public abstract class AbstractMinecart extends VehicleEntity { private double flyingY = 0.95; private double flyingZ = 0.95; - public double maxSpeed = 0.4D; + public Double maxSpeed; + public double storedMaxSpeed; // Purpur // CraftBukkit end public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API @@ -15055,7 +15055,7 @@ index d277f56fef882313d6d21f636fafae2f26630ad7..a1593297b6764ba0229cc1c8f5a55aef this.move(MoverType.SELF, this.getDeltaMovement()); if (!this.onGround()) { diff --git a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java -index a8718ee94cd6b9a20bd1e9a49d58d39e6f3f2a7a..4b2c3e30a440ab8d035a48fdd612b61a29143836 100644 +index f43439b31a14b9db4744512465d81134ebe5b3e1..0b9741dfebd0bb95e8c0e1f55ce18dfb353f693a 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java @@ -426,7 +426,7 @@ public class NewMinecartBehavior extends MinecartBehavior { @@ -15068,7 +15068,7 @@ index a8718ee94cd6b9a20bd1e9a49d58d39e6f3f2a7a..4b2c3e30a440ab8d035a48fdd612b61a Vec3 vec3d1 = this.minecart.getRedstoneDirection(railPos); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java -index 23cbafcc12f6e5f5755215a72879a6cab306ad18..ca6883d0f0c2cc8f843c59476dbcf46a62cbd550 100644 +index 04a622f52353ebcc21f41c233f5a0fd67690cf4a..f10ce069ef427df16fd0ce0e60b85c805ca703f0 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java @@ -310,9 +310,9 @@ public class OldMinecartBehavior extends MinecartBehavior { @@ -15919,7 +15919,7 @@ index b232390d8ee8e449e61c0ea7f3af60df507abb97..4039d300debadf29e6c544e8b4c950b7 // Paper end - PlayerLaunchProjectileEvent if (user instanceof net.minecraft.server.level.ServerPlayer) { diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -index 7e308b364227dedc2d05496f5e0c90573f4a53f7..52e0a741e0a2274d3d70e8d8cdfa56f5e934deb2 100644 +index 29a048a9b09166838616ac7ba1d31625d56b0bca..184e6d9bf393188fc1f1c7acd545b4ac6d31f6a4 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java @@ -66,6 +66,18 @@ public class FireworkRocketItem extends Item implements ProjectileItem { @@ -19110,7 +19110,7 @@ index 94ca0407303c4493ab4928b12ec6ecc75aaca549..a138e1b6b66d99f2035de054137a607a + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b185a9b474121b8a4067816b3c3c39270c2a202e..eef85316dc310afef805f29c6665107a24a6a3d1 100644 +index e80439a0d17adaab7b782626fd2ee9ce1669058c..ed6f90e5deb40d48246965d36f064479a313e6f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -414,6 +414,20 @@ public final class CraftServer implements Server { @@ -20466,7 +20466,7 @@ index 774556a62eb240da42e84db4502e2ed43495be17..99597258e8e88cd9e2c901c4ac3ff7fa if (stream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -index 52649f82351ab4f675c3cc3cd6640956b0f76b91..eb51c88c7a0658190d3a8bfd5d18dca79d85fba0 100644 +index b3169c551b8410f5861f9db0543c785439ecba7c..916ca3f1f39e10158fc7c10141785fff49ed1501 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java @@ -23,7 +23,15 @@ public final class CommandPermissions { @@ -27088,10 +27088,10 @@ index 0000000000000000000000000000000000000000..129acb8ad139decc6b1c023cb10bc32d + // Paper end - lifecycle events +} diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 133bcf639a45bd7fa1a2d02410ea3e8568265007..66e7b1966602f6d9f5978d66df7cb81b8c89e75b 100644 +index bd7c37123c70d2afdef252f39548725d4ef318ed..e047c0a4a8638588b4ac0d47c4c96899fac4abb7 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -198,6 +198,8 @@ public class ActivationRange +@@ -199,6 +199,8 @@ public class ActivationRange continue; } @@ -27100,13 +27100,13 @@ index 133bcf639a45bd7fa1a2d02410ea3e8568265007..66e7b1966602f6d9f5978d66df7cb81b // Paper start int worldHeight = world.getHeight(); ActivationRange.maxBB = player.getBoundingBox().inflate( maxRange, worldHeight, maxRange ); -@@ -375,6 +377,7 @@ public class ActivationRange +@@ -376,6 +378,7 @@ public class ActivationRange */ public static boolean checkIfActive(Entity entity) { + if (entity.level().purpurConfig.squidImmuneToEAR && entity instanceof net.minecraft.world.entity.animal.Squid) return true; // Purpur - // Never safe to skip fireworks or entities not yet added to chunk - if ( entity instanceof FireworkRocketEntity ) { + // Never safe to skip fireworks or item gravity + if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0)) { // Paper - Needed for item gravity, see ItemEntity tick return true; diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java index 9eb2823cc8f83bad2626fc77578b0162d9ed5782..f144a08e88f8268b84eb188a36bf470457f59958 100644 diff --git a/patches/server/0016-Apply-various-optimizations.patch b/patches/server/0016-Apply-various-optimizations.patch index 205bce7d9..5d6c0de9f 100644 --- a/patches/server/0016-Apply-various-optimizations.patch +++ b/patches/server/0016-Apply-various-optimizations.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations Akarin - Swaps the predicate order of collision diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6b32cd1391f39b6fe61c3c8c00249d1d4278cbd0..b94f3e2071e71b2b038e875b25c985b0c7c00fc0 100644 +index d6d9dd17750d7028e13aad539e7b65a7561d9f4b..ae264484f99227f5535c428ebda4860fc8abcc72 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2341,8 +2341,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2342,8 +2342,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void playerTouch(Player player) {} public void push(Entity entity) { @@ -21,7 +21,7 @@ index 6b32cd1391f39b6fe61c3c8c00249d1d4278cbd0..b94f3e2071e71b2b038e875b25c985b0 if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant double d0 = entity.getX() - this.getX(); double d1 = entity.getZ() - this.getZ(); -@@ -2370,8 +2371,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2371,8 +2372,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.push(d0, 0.0D, d1); } } diff --git a/patches/server/0021-Variable-entity-wakeup-duration.patch b/patches/server/0021-Variable-entity-wakeup-duration.patch index 98fbf0659..94b603c6c 100644 --- a/patches/server/0021-Variable-entity-wakeup-duration.patch +++ b/patches/server/0021-Variable-entity-wakeup-duration.patch @@ -30,10 +30,10 @@ index 33bcfec86f83ce6e0ec17436ad38da8aeced48be..b047af738236be3400d07d46c663017e public Block block; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 813b8aeb7bf39e03346fd9ca63c4c6498e162965..9843f440d921a61c60df5ec5e6e7ffebc9444b71 100644 +index e047c0a4a8638588b4ac0d47c4c96899fac4abb7..14e62940aec1fe4c70b128f2811df6c09c701718 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -61,29 +61,37 @@ public class ActivationRange +@@ -62,29 +62,37 @@ public class ActivationRange net.minecraft.world.entity.schedule.Activity.PANIC }; diff --git a/patches/server/0025-Improve-SwingTime-ticking.patch b/patches/server/0025-Improve-SwingTime-ticking.patch index b96c7f76c..9d74e6777 100644 --- a/patches/server/0025-Improve-SwingTime-ticking.patch +++ b/patches/server/0025-Improve-SwingTime-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve SwingTime ticking diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 18648eed57dca05d89692064dcf4aa3172cd5914..bf5633f387e268191e2a33be2dcec6c514c0766f 100644 +index d3d4e7e01afeb4ace5e487f9ef0926fd987c8ca4..6f999fcba6f72f2d31835c4ce5f6c17a69b0537c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2771,6 +2771,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2772,6 +2772,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected void updateSwingTime() { diff --git a/patches/server/0041-Completely-remove-Mojang-Profiler.patch b/patches/server/0041-Completely-remove-Mojang-Profiler.patch index 1d202e1bd..9bf34b5ee 100644 --- a/patches/server/0041-Completely-remove-Mojang-Profiler.patch +++ b/patches/server/0041-Completely-remove-Mojang-Profiler.patch @@ -74,7 +74,7 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..467e17bfce31d0919d603698c9d88a04 public int forkLimit() { return this.forkLimit; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f5623f844f17 100644 +index b62be89b9b3705a29b6c42a794d653c66b73f7eb..0cd6da6f5d37113ea642b2a7f6e9807c7e46ae2c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -111,19 +111,19 @@ import net.minecraft.util.datafix.DataFixers; @@ -108,26 +108,27 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562 import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.Difficulty; import net.minecraft.world.RandomSequences; -@@ -229,12 +229,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); -- private MetricsRecorder metricsRecorder; + private MetricsRecorder metricsRecorder; - private Consumer onMetricsRecordingStopped; - private Consumer onMetricsRecordingFinished; - private boolean willStartRecordingMetrics; - @Nullable - private MinecraftServer.TimeProfiler debugCommandProfiler; +- private boolean debugCommandProfilerDelayStart; + //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang's Profiler + //private Consumer onMetricsRecordingStopped; // Plazma - Completely remove Mojang's Profiler + //private Consumer onMetricsRecordingFinished; // Plazma - Completely remove Mojang's Profiler + //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang's Profiler + //@Nullable // Plazma - Completely remove Mojang's Profiler + //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang's Profiler - private boolean debugCommandProfilerDelayStart; ++ //private boolean debugCommandProfilerDelayStart; private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; -@@ -1409,7 +1409,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1735,7 +1735,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { entityplayer.connection.suspendFlushing(); -@@ -2932,6 +2932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2957,12 +2958,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop resultConsumer, Consumer dumpConsumer) { @@ -207,15 +208,15 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562 } public void stopRecordingMetrics() { -@@ -2976,6 +2977,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop imp + + public class RecipeManager extends SimplePreparableReloadListener implements RecipeAccess { + +@@ -94,7 +94,7 @@ public class RecipeManager extends SimplePreparableReloadListener imp } @Override @@ -1199,7 +1200,7 @@ index 26814c13559d82e44546f8b2834a90cc58941a49..22ecef07399ab9d9bde3cd9a3024d070 SortedMap> sortedmap = new TreeMap(); SimpleJsonResourceReloadListener.scanDirectory(manager, Registries.elementsDirPath(Registries.RECIPE), this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedmap); -@@ -108,7 +108,7 @@ public class RecipeManager extends SimplePreparableReloadListener imp +@@ -109,7 +109,7 @@ public class RecipeManager extends SimplePreparableReloadListener imp return RecipeMap.create(list); } diff --git a/patches/server/0042-Remove-persist-isClientSide-flag.patch b/patches/server/0042-Remove-persist-isClientSide-flag.patch index 0a15446c6..f3186c172 100644 --- a/patches/server/0042-Remove-persist-isClientSide-flag.patch +++ b/patches/server/0042-Remove-persist-isClientSide-flag.patch @@ -527,10 +527,10 @@ index e6cbf4506c75046a89fad778e138b448fb4a29a9..a2dcbcc705d4219f9077e4011990e8a2 protected abstract void updateRenderSubState(boolean shouldLerp, float lerpProgress); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d29aa4ef6 100644 +index 07b4f09fcc47bdb3fe96b759ff42d6179bf71060..ce047789ed21e50914a85c87ea3464ad6f5461b9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -620,7 +620,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -621,7 +621,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Purpur start - copied from Mob - API for any mob to burn daylight public boolean isSunBurnTick() { @@ -539,7 +539,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d float f = this.getLightLevelDependentMagicValue(); BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ()); boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow; -@@ -1006,9 +1006,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1007,9 +1007,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } this.checkBelowWorld(); @@ -551,7 +551,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d this.firstTick = false; world = this.level(); -@@ -1295,9 +1295,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1296,9 +1296,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess BlockPos blockposition = this.getOnPosLegacy(); BlockState iblockdata = this.level().getBlockState(blockposition); @@ -563,7 +563,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d if (this.isRemoved()) { //gameprofilerfiller.pop(); // Purpur -@@ -1338,13 +1338,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1339,13 +1339,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // CraftBukkit end @@ -579,7 +579,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d float f = this.getBlockSpeedFactor(); -@@ -1474,9 +1474,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1475,9 +1475,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void extinguishFire() { @@ -591,7 +591,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d this.clearFire(); } -@@ -3157,7 +3157,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3158,7 +3158,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public InteractionResult interact(Player player, InteractionHand hand) { if (this.isAlive() && this instanceof Leashable leashable) { if (leashable.getLeashHolder() == player) { @@ -600,7 +600,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur // CraftBukkit start - fire PlayerUnleashEntityEvent // Paper start - Expand EntityUnleashEvent -@@ -3170,7 +3170,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3171,7 +3171,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end leashable.dropLeash(true, event.isDropLeash()); // Paper - Expand EntityUnleashEvent this.gameEvent(GameEvent.ENTITY_INTERACT, player); @@ -609,7 +609,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d return InteractionResult.SUCCESS; } -@@ -3178,7 +3178,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3179,7 +3179,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ItemStack itemstack = player.getItemInHand(hand); if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) { @@ -618,7 +618,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d // CraftBukkit start - fire PlayerLeashEntityEvent if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) { // ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item // Paper - Fix inventory desync -@@ -3188,7 +3188,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3189,7 +3189,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // CraftBukkit end leashable.setLeashedTo(player, true); @@ -627,7 +627,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d itemstack.shrink(1); return InteractionResult.SUCCESS; -@@ -3260,7 +3260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3261,7 +3261,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } else if (!entity.couldAcceptPassenger()) { return false; @@ -636,7 +636,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d return false; } else { for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { -@@ -3355,7 +3355,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3356,7 +3356,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } else { List list = Lists.newArrayList(this.passengers); @@ -645,7 +645,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d list.add(0, passenger); } else { list.add(passenger); -@@ -3570,7 +3570,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3571,7 +3571,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void animateHurt(float yaw) {} public boolean isOnFire() { @@ -654,7 +654,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0)); } -@@ -3660,7 +3660,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3661,7 +3661,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean isCurrentlyGlowing() { @@ -663,7 +663,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d } public boolean isInvisible() { -@@ -4427,7 +4427,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4428,7 +4428,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.reapplyPosition(); boolean flag = entitysize1.width() <= 4.0F && entitysize1.height() <= 4.0F; @@ -672,7 +672,7 @@ index a27d7545c36a32378084646b750ad91a3c954c29..397d0cad9394025ae7f4e1a538bcb48d this.fudgePositionAfterSizeChange(entitysize); } -@@ -4722,7 +4722,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4723,7 +4723,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean isEffectiveAi() { @@ -761,7 +761,7 @@ index 12127b14babf646711d3a118416453c4f1ac1460..49f1d70616ab757580dd99b76a68c2d2 --this.life; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d730708422 100644 +index 6ba2e04325b3da59801563f66a557ec217495a23..fecf2cdd3736b9c59ee3d4af5ac19d3de6e5cfc8 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -460,7 +460,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -911,7 +911,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot } -@@ -3066,12 +3066,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3067,12 +3067,14 @@ public abstract class LivingEntity extends Entity implements Attackable { if (mobeffect != null) { d0 += (0.05D * (double) (mobeffect.getAmplifier() + 1) - vec3d1.y) * 0.2D; @@ -926,7 +926,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } else { d0 -= this.getEffectiveGravity(); } -@@ -3149,11 +3151,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3150,11 +3152,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.setDeltaMovement(this.updateFallFlyingMovement(vec3d)); this.move(MoverType.SELF, this.getDeltaMovement()); @@ -940,7 +940,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } -@@ -3312,7 +3314,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3313,7 +3315,7 @@ public abstract class LivingEntity extends Entity implements Attackable { super.tick(); this.updatingUsingItem(); this.updateSwimAmount(); @@ -949,7 +949,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 int i = this.getArrowCount(); if (i > 0) { -@@ -3347,7 +3349,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3348,7 +3350,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.isSleeping() && !this.checkBedExists()) { this.stopSleeping(); } @@ -958,7 +958,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 if (!this.isRemoved()) { this.aiStep(); -@@ -3702,14 +3704,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3703,14 +3705,14 @@ public abstract class LivingEntity extends Entity implements Attackable { this.travel(vec3d1); } @@ -976,7 +976,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 int i = this.getTicksFrozen(); if (this.isInPowderSnow && this.canFreeze()) { -@@ -3812,7 +3814,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3813,7 +3815,7 @@ public abstract class LivingEntity extends Entity implements Attackable { protected void updateFallFlying() { this.checkSlowFallDistance(); @@ -985,7 +985,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 if (!this.canGlide()) { if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit this.setSharedFlag(7, false); -@@ -3845,7 +3847,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3846,7 +3848,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.gameEvent(GameEvent.ELYTRA_GLIDE); } @@ -994,7 +994,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } -@@ -3948,7 +3950,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3949,7 +3951,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.autoSpinAttackTicks = 0; } @@ -1003,7 +1003,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 this.setLivingEntityFlag(4, false); this.autoSpinAttackDmg = 0.0F; this.autoSpinAttackItemStack = null; -@@ -3977,7 +3979,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3978,7 +3980,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Entity entity = this.getVehicle(); super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation @@ -1012,7 +1012,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 this.dismountVehicle(entity); } -@@ -4051,7 +4053,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4052,7 +4054,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void take(Entity item, int count) { @@ -1021,7 +1021,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 ((ServerLevel) this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); // Paper - broadcast with collector as source } -@@ -4196,7 +4198,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4197,7 +4199,7 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper start - lag compensate eating // we add 1 to the expected time to avoid lag compensating when we should not final boolean shouldLagCompensate = this.useItem.has(DataComponents.FOOD) && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1L + this.totalEatTimeTicks) * 50L * (1000L * 1000L)); @@ -1030,7 +1030,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 this.useItemRemaining = 0; // Paper end - lag compensate eating this.completeUsingItem(); -@@ -4240,11 +4242,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4241,11 +4243,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.useItemRemaining = this.totalEatTimeTicks = itemstack.getUseDuration(this); this.eatStartTime = System.nanoTime(); // Paper end - lag compensate eating @@ -1044,7 +1044,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } } -@@ -4252,6 +4254,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4253,6 +4255,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void onSyncedDataUpdated(EntityDataAccessor data) { super.onSyncedDataUpdated(data); @@ -1052,7 +1052,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 if (LivingEntity.SLEEPING_POS_ID.equals(data)) { if (this.level().isClientSide) { this.getSleepingPos().ifPresent(this::setPosToBed); -@@ -4270,6 +4273,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4271,6 +4274,7 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper end - lag compensate eating } } @@ -1060,7 +1060,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } -@@ -4304,7 +4308,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4305,7 +4309,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void completeUsingItem() { @@ -1069,7 +1069,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 InteractionHand enumhand = this.getUsedItemHand(); if (!this.useItem.equals(this.getItemInHand(enumhand))) { -@@ -4358,7 +4362,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4359,7 +4363,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -1078,7 +1078,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 } public void handleExtraItemsCreatedOnUse(ItemStack stack) {} -@@ -4388,14 +4392,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4389,14 +4393,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void stopUsingItem() { @@ -1095,7 +1095,7 @@ index 5144a761577c2a2448aaaa35cf41328a53659a50..2935fbb8b455452903fb73d04655f9d7 this.useItem = ItemStack.EMPTY; // Paper start - lag compensate eating -@@ -4833,7 +4837,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4834,7 +4838,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public boolean isCurrentlyGlowing() { @@ -3839,7 +3839,7 @@ index f888f1dd2e3c228b0a370fe920b63d547bbba571..fa97779d631caaabd7ba7b74f9b620e7 } diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index a1593297b6764ba0229cc1c8f5a55aef107ff9df..cccf0f9b515c8b2e7ed73e5f8e238bff0d959657 100644 +index bd4e4f03c4b70247c7fc887854e0aa01a8af81c6..4485a46d2344969e99287a34b73ce361dd9ec7e8 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -639,7 +639,7 @@ public abstract class AbstractMinecart extends VehicleEntity {