9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

Updated Upstream (Paper/Purpur)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4eda045b Backport fix for MC-296337 (Fixes #12617) (#12619)
PaperMC/Paper@7ebc94c2 Add Registry#getTagValues (#12603)
PaperMC/Paper@e87320d5 Fix UOE when using generateTree with pale oak (#12616)
PaperMC/Paper@94f29035 Do not blow up accessing unregistered memories from API (Fixes #12618) (#12639)

Purpur Changes:
PurpurMC/Purpur@916df1a8 use the correct item reference for retrieving components, closes #1668
This commit is contained in:
Dreeam
2025-06-07 12:41:49 +08:00
parent 192608bbc4
commit c947b7234a
22 changed files with 90 additions and 90 deletions

View File

@@ -2,7 +2,7 @@ group=cn.dreeam.leaf
mcVersion=1.21.5 mcVersion=1.21.5
version=1.21.5-R0.1-SNAPSHOT version=1.21.5-R0.1-SNAPSHOT
paperCommit=2ba1675c7506cadd8a540ea452e5dafb79ae8947 paperCommit=94f2903584945d71012050bcef830da4271fdb90
org.gradle.configuration-cache=true org.gradle.configuration-cache=true
org.gradle.caching=true org.gradle.caching=true

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes
Original license: MIT Original license: MIT
Original project: https://github.com/PurpurMC/Purpur Original project: https://github.com/PurpurMC/Purpur
Commit: 5d3463aaa0472c7d3c2028ea4d0ad3fb128785d2 Commit: 916df1a858c46e240fa966540cf1cc819cfb3c36
Patches listed below are removed in this patch, They exists in Gale or Leaf: Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "co/aikar/timings/TimedEventExecutor.java.patch" * "co/aikar/timings/TimedEventExecutor.java.patch"

View File

@@ -1079,7 +1079,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129
for (Entity entity : passengerEntity.getPassengers()) { for (Entity entity : passengerEntity.getPassengers()) {
this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2 this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 3781d9cc174b7aecacb9b9855d52c7b1ff05835c..eb61b2c6323d2b3dad8939e73d7b95450c09ef6c 100644 index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d8a4661be 100644
--- a/net/minecraft/server/level/ServerPlayer.java --- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java
@@ -103,8 +103,6 @@ import net.minecraft.util.HashOps; @@ -103,8 +103,6 @@ import net.minecraft.util.HashOps;
@@ -1234,7 +1234,7 @@ index 64b0508ef21952c65b0b967b756b2a4c64d96899..b6b03fbbd669e6331b30255df5419611
protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler); protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler);
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29fff3b6e9a 100644 index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9cfae142a 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -82,8 +82,6 @@ import net.minecraft.tags.FluidTags; @@ -82,8 +82,6 @@ import net.minecraft.tags.FluidTags;
@@ -1246,7 +1246,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.Nameable; import net.minecraft.world.Nameable;
@@ -812,8 +810,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -816,8 +814,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end // CraftBukkit end
public void baseTick() { public void baseTick() {
@@ -1255,7 +1255,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
this.inBlockState = null; this.inBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) { if (this.isPassenger() && this.getVehicle().isRemoved()) {
@@ -870,8 +866,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -874,8 +870,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) { if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) {
Leashable.tickLeash(serverLevelx, (Entity & Leashable)this); Leashable.tickLeash(serverLevelx, (Entity & Leashable)this);
} }
@@ -1264,7 +1264,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
} }
public void setSharedFlagOnFire(boolean isOnFire) { public void setSharedFlagOnFire(boolean isOnFire) {
@@ -1091,8 +1085,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1095,8 +1089,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }
@@ -1273,7 +1273,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) { if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) {
movement = movement.multiply(this.stuckSpeedMultiplier); movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO; this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1101,7 +1093,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1105,7 +1097,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper start - ignore movement changes while inactive. // Paper start - ignore movement changes while inactive.
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) { if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) {
setDeltaMovement(Vec3.ZERO); setDeltaMovement(Vec3.ZERO);
@@ -1281,7 +1281,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
return; return;
} }
// Paper end // Paper end
@@ -1136,8 +1127,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1140,8 +1131,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setPos(vec31); this.setPos(vec31);
} }
@@ -1290,7 +1290,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
boolean flag = !Mth.equal(movement.x, vec3.x); boolean flag = !Mth.equal(movement.x, vec3.x);
boolean flag1 = !Mth.equal(movement.z, vec3.z); boolean flag1 = !Mth.equal(movement.z, vec3.z);
this.horizontalCollision = flag || flag1; this.horizontalCollision = flag || flag1;
@@ -1160,7 +1149,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1164,7 +1153,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
if (this.isRemoved()) { if (this.isRemoved()) {
@@ -1298,7 +1298,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
} else { } else {
if (this.horizontalCollision) { if (this.horizontalCollision) {
Vec3 deltaMovement = this.getDeltaMovement(); Vec3 deltaMovement = this.getDeltaMovement();
@@ -1204,7 +1192,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1208,7 +1196,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
float blockSpeedFactor = this.getBlockSpeedFactor(); float blockSpeedFactor = this.getBlockSpeedFactor();
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor)); this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
@@ -1306,7 +1306,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
} }
} }
// Paper start - detailed watchdog information // Paper start - detailed watchdog information
@@ -3208,8 +3195,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3212,8 +3199,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.processPortalCooldown(); this.processPortalCooldown();
if (this.portalProcess != null) { if (this.portalProcess != null) {
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) { if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
@@ -1315,7 +1315,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
this.setPortalCooldown(); this.setPortalCooldown();
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this); TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
if (portalDestination != null) { if (portalDestination != null) {
@@ -3220,7 +3205,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3224,7 +3209,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }
@@ -1323,7 +1323,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
} else if (this.portalProcess.hasExpired()) { } else if (this.portalProcess.hasExpired()) {
this.portalProcess = null; this.portalProcess = null;
} }
@@ -3775,15 +3759,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3779,15 +3763,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.teleport(this.calculatePassengerTransition(teleportTransition, entity)); entity.teleport(this.calculatePassengerTransition(teleportTransition, entity));
} }
@@ -1339,7 +1339,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
return this; return this;
} }
@@ -3799,11 +3780,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3803,11 +3784,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }
@@ -1351,7 +1351,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
return null; return null;
} else { } else {
// Paper start - Fix item duplication and teleport issues // Paper start - Fix item duplication and teleport issues
@@ -3822,7 +3800,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3826,7 +3804,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
level.resetEmptyTime(); level.resetEmptyTime();
teleportTransition.postTeleportTransition().onTransition(entityx); teleportTransition.postTeleportTransition().onTransition(entityx);

View File

@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index a8be25542f63d6166cbed065e5006cbf27253d49..c51776867d87640c20cd317a33dc5c654f1e7a51 100644 index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4b390f292 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -2013,10 +2013,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2017,10 +2017,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Deprecated @Deprecated
public float getLightLevelDependentMagicValue() { public float getLightLevelDependentMagicValue() {

View File

@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
Licensed under: MIT (https://opensource.org/licenses/MIT) Licensed under: MIT (https://opensource.org/licenses/MIT)
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index c68233c5953f7a760b9c0b74c19bdfbeb61f349f..51b899299a655af6b85b69fbf7fef03f7cb83369 100644 index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c39f51ab2b 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -24,7 +24,7 @@ index c68233c5953f7a760b9c0b74c19bdfbeb61f349f..51b899299a655af6b85b69fbf7fef03f
public boolean onGround; public boolean onGround;
public boolean horizontalCollision; public boolean horizontalCollision;
public boolean verticalCollision; public boolean verticalCollision;
@@ -1060,6 +1061,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1064,6 +1065,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper end - detailed watchdog information // Paper end - detailed watchdog information
public void move(MoverType type, Vec3 movement) { public void move(MoverType type, Vec3 movement) {
@@ -36,7 +36,7 @@ index c68233c5953f7a760b9c0b74c19bdfbeb61f349f..51b899299a655af6b85b69fbf7fef03f
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
// Paper start - detailed watchdog information // Paper start - detailed watchdog information
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
@@ -4151,6 +4157,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4155,6 +4161,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public final void setBoundingBox(AABB bb) { public final void setBoundingBox(AABB bb) {

View File

@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
Licensed under: MIT (https://opensource.org/licenses/MIT) Licensed under: MIT (https://opensource.org/licenses/MIT)
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 33f1381569612996f87b25c6d9009f9784517238..466d70b679059bdbe850033547d999c88063d1c2 100644 index c0a75b84360cdaf89bb23380210de7c39f51ab2b..e7c9b51a115d975ea4a6aaa8e051ac7daf58395e 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -860,7 +860,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -864,7 +864,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.checkBelowWorld(); this.checkBelowWorld();
if (!this.level().isClientSide) { if (!this.level().isClientSide) {

View File

@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org Gale - https://galemc.org
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 358de5a663874f56e381d65e63db5787fe9af83c..a28a1d5213900153bbc302b8c6462586a430c06b 100644 index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103715b16f4 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -4661,6 +4661,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4665,6 +4665,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.inBlockState; return this.inBlockState;
} }

View File

@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index d85d70fe5bfa63f0b188663d7ea11b56ff265a18..66b8cf01105df34ced97eeddd4e543adbd8a7105 100644 index 430dec39410c4445326488b537dcd103715b16f4..4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -2157,8 +2157,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2161,8 +2161,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public void push(Entity entity) { public void push(Entity entity) {

View File

@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org Gale - https://galemc.org
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 66b8cf01105df34ced97eeddd4e543adbd8a7105..12eb1e3ed2472ecdd783c8062c99428115d9526a 100644 index 4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13..8508f4b94f3e4532ce36baff4e68189540b0b59a 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1202,8 +1202,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1206,8 +1206,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Minecraft Changes
Original license: MIT Original license: MIT
Original project: https://github.com/PurpurMC/Purpur Original project: https://github.com/PurpurMC/Purpur
Commit: 5d3463aaa0472c7d3c2028ea4d0ad3fb128785d2 Commit: 916df1a858c46e240fa966540cf1cc819cfb3c36
Patches listed below are removed in this patch, They exists in Gale or Leaf: Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "net/minecraft/CrashReport.java.patch" * "net/minecraft/CrashReport.java.patch"
@@ -912,7 +912,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58
} }
// Paper end - Fix merchant inventory not closing on entity removal // Paper end - Fix merchant inventory not closing on entity removal
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 7f18fb7f61e9219eb23073d9215f3bd6c57dc320..6bc6000c45f35ff85b36bede9d6010d8452b1f21 100644 index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b234c579f26 100644
--- a/net/minecraft/server/level/ServerPlayer.java --- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java
@@ -419,6 +419,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -419,6 +419,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1888,7 +1888,7 @@ index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188b
} }
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c70d35d384 100644 index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a504172a1e 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -139,6 +139,7 @@ import net.minecraft.world.scores.Team; @@ -139,6 +139,7 @@ import net.minecraft.world.scores.Team;
@@ -1929,7 +1929,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
public void inactiveTick() { public void inactiveTick() {
} }
@@ -513,10 +516,39 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -517,10 +520,39 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Paper end - optimise entity tracker // Paper end - optimise entity tracker
@@ -1969,7 +1969,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
this.position = Vec3.ZERO; this.position = Vec3.ZERO;
this.blockPosition = BlockPos.ZERO; this.blockPosition = BlockPos.ZERO;
this.chunkPosition = ChunkPos.ZERO; this.chunkPosition = ChunkPos.ZERO;
@@ -888,6 +920,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -892,6 +924,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage // Paper end - Configurable nether ceiling damage
@@ -1977,7 +1977,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
this.onBelowWorld(); this.onBelowWorld();
} }
} }
@@ -1841,7 +1874,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1845,7 +1878,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public boolean fireImmune() { public boolean fireImmune() {
@@ -1986,7 +1986,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} }
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) { public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -1901,7 +1934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1905,7 +1938,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.isInWater() || flag; return this.isInWater() || flag;
} }
@@ -1995,7 +1995,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) { if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
this.wasTouchingWater = false; this.wasTouchingWater = false;
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) { } else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
@@ -2537,6 +2570,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2541,6 +2574,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
compound.putBoolean("Paper.FreezeLock", true); compound.putBoolean("Paper.FreezeLock", true);
} }
// Paper end // Paper end
@@ -2009,7 +2009,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
return compound; return compound;
} catch (Throwable var8) { } catch (Throwable var8) {
CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT"); CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT");
@@ -2667,6 +2707,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2671,6 +2711,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false); freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false);
} }
// Paper end // Paper end
@@ -2023,7 +2023,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} catch (Throwable var8) { } catch (Throwable var8) {
CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT"); CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -2895,6 +2942,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2899,6 +2946,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.isAlive() && this instanceof Leashable leashable) { if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) { if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) { if (!this.level().isClientSide()) {
@@ -2031,7 +2031,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
// CraftBukkit start - fire PlayerUnleashEntityEvent // CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent // Paper start - Expand EntityUnleashEvent
org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
@@ -3101,6 +3149,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3105,6 +3153,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list); this.passengers = ImmutableList.copyOf(list);
} }
@@ -2045,7 +2045,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
} }
} }
@@ -3142,6 +3197,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3146,6 +3201,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false; return false;
} }
// CraftBukkit end // CraftBukkit end
@@ -2060,7 +2060,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) { if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of(); this.passengers = ImmutableList.of();
} else { } else {
@@ -3211,15 +3274,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3215,15 +3278,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Vec3.directionFromRotation(this.getRotationVector()); return Vec3.directionFromRotation(this.getRotationVector());
} }
@@ -2080,7 +2080,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} }
} }
} }
@@ -3421,7 +3487,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3425,7 +3491,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public int getMaxAirSupply() { public int getMaxAirSupply() {
@@ -2089,7 +2089,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} }
public int getAirSupply() { public int getAirSupply() {
@@ -3942,7 +4008,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3946,7 +4012,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end // CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) { public boolean canUsePortal(boolean allowPassengers) {
@@ -2098,7 +2098,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} }
public boolean canTeleport(Level fromLevel, Level toLevel) { public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4484,6 +4550,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4488,6 +4554,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Mth.lerp(partialTick, this.yRotO, this.yRot); return Mth.lerp(partialTick, this.yRotO, this.yRot);
} }
@@ -2111,7 +2111,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
// Paper start - optimise collisions // Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) { public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) { if (this.touchingUnloadedChunk()) {
@@ -4902,7 +4974,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4906,7 +4978,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public float maxUpStep() { public float maxUpStep() {
@@ -2120,7 +2120,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
} }
public void onExplosionHit(@Nullable Entity entity) { public void onExplosionHit(@Nullable Entity entity) {
@@ -5140,4 +5212,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -5144,4 +5216,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition()); return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
} }
// Paper end - Expose entity id counter // Paper end - Expose entity id counter
@@ -12065,7 +12065,7 @@ index 634c518c105c8dc50838a4a6690641d82fd637fb..0afdfdc07764a26316c171c2a6722caf
protected boolean canReplaceCurrentItem(ItemStack candidate) { protected boolean canReplaceCurrentItem(ItemStack candidate) {
diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c784e4270d8 100644 index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf8a801fab 100644
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -661,7 +661,10 @@ public class PiglinAi { @@ -661,7 +661,10 @@ public class PiglinAi {
@@ -12075,7 +12075,7 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c78
- if (entity.getItemBySlot(equipmentSlot).is(ItemTags.PIGLIN_SAFE_ARMOR)) { - if (entity.getItemBySlot(equipmentSlot).is(ItemTags.PIGLIN_SAFE_ARMOR)) {
+ // Purpur start - piglins ignore gold-trimmed armor + // Purpur start - piglins ignore gold-trimmed armor
+ net.minecraft.world.item.ItemStack itemStack = entity.getItemBySlot(equipmentSlot); + net.minecraft.world.item.ItemStack itemStack = entity.getItemBySlot(equipmentSlot);
+ if (itemStack.is(ItemTags.PIGLIN_SAFE_ARMOR) || (entity.level().purpurConfig.piglinIgnoresArmorWithGoldTrim && isWearingGoldTrim(itemStack.getItem()))) { + if (itemStack.is(ItemTags.PIGLIN_SAFE_ARMOR) || (entity.level().purpurConfig.piglinIgnoresArmorWithGoldTrim && isWearingGoldTrim(itemStack))) {
+ // Purpur end - piglins ignore gold-trimmed armor + // Purpur end - piglins ignore gold-trimmed armor
return true; return true;
} }
@@ -12085,8 +12085,8 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c78
} }
+ // Purpur start - piglins ignore gold-trimmed armor + // Purpur start - piglins ignore gold-trimmed armor
+ private static boolean isWearingGoldTrim(Item itemstack) { + private static boolean isWearingGoldTrim(net.minecraft.world.item.ItemStack itemstack) {
+ net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.components().get(net.minecraft.core.component.DataComponents.TRIM); + net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.getComponents().get(net.minecraft.core.component.DataComponents.TRIM);
+ return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD); + return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD);
+ } + }
+ // Purpur end - piglins ignore gold-trimmed armor + // Purpur end - piglins ignore gold-trimmed armor
@@ -13049,7 +13049,7 @@ index 4541bb5233e986d9993d8593afef9b12c935d00a..4f61c17e0a4a82773834bc21e00cac6e
public static enum Status { public static enum Status {
diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index 99617c08cbd989092ba357d8df928786fd04c89a..9d88b260528c3cea2c5fe8e2760094b0a8a35667 100644 index 47490f6152cb1394a448ebc803c973b22da24149..41aac3b9985fbf76f3a4c4c3d4a7366d4759cfc4 100644
--- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java --- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -103,6 +103,10 @@ public abstract class AbstractMinecart extends VehicleEntity { @@ -103,6 +103,10 @@ public abstract class AbstractMinecart extends VehicleEntity {

View File

@@ -78,10 +78,10 @@ index 35ca166964e8436154891708f69ac010491b64aa..586c00610fdba178f27391820d623c3a
this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect 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; return;
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index b714c64a318d38e309351f34426406c70d35d384..4e3b73bee5dae2b5921db86cc53b4cd9ebbd06f8 100644 index d8c83a449a1f33031aa671f3bbe366a504172a1e..d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -522,23 +522,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -526,23 +526,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Purpur end - Add canSaveToDisk to Entity // Purpur end - Add canSaveToDisk to Entity

View File

@@ -46,10 +46,10 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89
public String toString() { public String toString() {
return "Reference{" + this.key + "=" + this.value + "}"; return "Reference{" + this.key + "=" + this.value + "}";
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index fa44ddaeac193a686211a9ede5993674626b8e25..c3d4cdfece32a05acd03b892cd5b343f0d230e64 100644 index ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51..c6bb3d9e1e9c2b38845e70c308fad41c813c600e 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1976,7 +1976,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1980,7 +1980,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
FluidState fluidState = this.level().getFluidState(blockPos); FluidState fluidState = this.level().getFluidState(blockPos);
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos); double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
if (d > eyeY) { if (d > eyeY) {

View File

@@ -8,10 +8,10 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o
these methods more able to be inlined by the JIT compiler. these methods more able to be inlined by the JIT compiler.
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index c3d4cdfece32a05acd03b892cd5b343f0d230e64..1cbc319a9b5ce3b15f79fcfec8cf9c46d0d3d1d0 100644 index c6bb3d9e1e9c2b38845e70c308fad41c813c600e..21dbc78baae89093ef9bc3a0620ab9e557e22910 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -2186,31 +2186,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2190,31 +2190,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return new Vec3(this.xOld, this.yOld, this.zOld); return new Vec3(this.xOld, this.yOld, this.zOld);
} }
@@ -43,7 +43,7 @@ index c3d4cdfece32a05acd03b892cd5b343f0d230e64..1cbc319a9b5ce3b15f79fcfec8cf9c46
public void playerTouch(Player player) { public void playerTouch(Player player) {
} }
@@ -5265,4 +5240,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -5269,4 +5244,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false; return false;
} }
// Purpur end - Ridables // Purpur end - Ridables

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Cache supporting block check
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 1cbc319a9b5ce3b15f79fcfec8cf9c46d0d3d1d0..309a31215cb63452215fd880590cffd569aee208 100644 index 21dbc78baae89093ef9bc3a0620ab9e557e22910..69521086fca0c9fbc230817062b65c4269c575fd 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1078,12 +1078,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1082,12 +1082,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.mainSupportingBlockPos.isPresent() && this.mainSupportingBlockPos.get().equals(pos); return this.mainSupportingBlockPos.isPresent() && this.mainSupportingBlockPos.get().equals(pos);
} }
@@ -45,7 +45,7 @@ index 1cbc319a9b5ce3b15f79fcfec8cf9c46d0d3d1d0..309a31215cb63452215fd880590cffd5
this.mainSupportingBlockPos = optional; this.mainSupportingBlockPos = optional;
} else if (movement != null) { } else if (movement != null) {
AABB aabb1 = aabb.move(-movement.x, 0.0, -movement.z); AABB aabb1 = aabb.move(-movement.x, 0.0, -movement.z);
@@ -1100,6 +1124,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1104,6 +1128,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }

View File

@@ -708,10 +708,10 @@ index 8b1652805a2ac9ebae9c99dd77e81c7a484a7abb..e4bccc642abe15b0ec4b1cf263480106
serverPlayer.connection = player.connection; serverPlayer.connection = player.connection;
serverPlayer.restoreFrom(player, keepInventory); serverPlayer.restoreFrom(player, keepInventory);
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 309a31215cb63452215fd880590cffd569aee208..b89923a0b30a294c393716b666ff3377f0a835dc 100644 index 69521086fca0c9fbc230817062b65c4269c575fd..82096e6b187e63ad3e848b9757ba2152e8c642b4 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -3317,15 +3317,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3321,15 +3321,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.portalProcess != null) { if (this.portalProcess != null) {
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) { if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
this.setPortalCooldown(); this.setPortalCooldown();
@@ -759,7 +759,7 @@ index 309a31215cb63452215fd880590cffd569aee208..b89923a0b30a294c393716b666ff3377
} else if (this.portalProcess.hasExpired()) { } else if (this.portalProcess.hasExpired()) {
this.portalProcess = null; this.portalProcess = null;
} }
@@ -3890,6 +3915,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3894,6 +3919,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
private Entity teleportCrossDimension(ServerLevel level, TeleportTransition teleportTransition) { private Entity teleportCrossDimension(ServerLevel level, TeleportTransition teleportTransition) {

View File

@@ -11,10 +11,10 @@ As part of: Airplane (https://github.com/TECHNOVE/Airplane)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index b89923a0b30a294c393716b666ff3377f0a835dc..cfd01993160bcc4a8a5b80c82df7c0c82b70f229 100644 index 82096e6b187e63ad3e848b9757ba2152e8c642b4..e0db9281f023a09d69479f28a7c8f681641f642f 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -4606,10 +4606,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4610,10 +4610,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper start - optimise collisions // Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) { public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
@@ -26,7 +26,7 @@ index b89923a0b30a294c393716b666ff3377f0a835dc..cfd01993160bcc4a8a5b80c82df7c0c8
final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3); final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3);
final Level world = this.level; final Level world = this.level;
@@ -4645,7 +4642,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4649,7 +4646,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) { for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) {
for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) { for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) {

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Sakura: Optimise check inside blocks and traverse blocks
Dreeam TODO: refactor checkinsideblcoks Dreeam TODO: refactor checkinsideblcoks
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index cfd01993160bcc4a8a5b80c82df7c0c82b70f229..f866fd8a7c37b94d24d6d1e41ed0a6106a82a4ac 100644 index e0db9281f023a09d69479f28a7c8f681641f642f..cc6b6b442d72b4a974cedd8ceef710304e52ab18 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1697,6 +1697,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1701,6 +1701,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
private void checkInsideBlocks(List<Entity.Movement> movements, InsideBlockEffectApplier.StepBasedCollector stepBasedCollector) { private void checkInsideBlocks(List<Entity.Movement> movements, InsideBlockEffectApplier.StepBasedCollector stepBasedCollector) {
if (this.isAffectedByBlocks()) { if (this.isAffectedByBlocks()) {
LongSet set = this.visitedBlocks; LongSet set = this.visitedBlocks;
@@ -17,7 +17,7 @@ index cfd01993160bcc4a8a5b80c82df7c0c82b70f229..f866fd8a7c37b94d24d6d1e41ed0a610
for (Entity.Movement movement : movements) { for (Entity.Movement movement : movements) {
Vec3 vec3 = movement.from(); Vec3 vec3 = movement.from();
@@ -1708,7 +1709,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1712,7 +1713,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
aabb, aabb,
(pos, step) -> { (pos, step) -> {
if (this.isAlive()) { if (this.isAlive()) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise player movement checks
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index f866fd8a7c37b94d24d6d1e41ed0a6106a82a4ac..d09a32288398d3ffa0fa6e9c6fd06f953b33688f 100644 index cc6b6b442d72b4a974cedd8ceef710304e52ab18..65a75480831d882e8318f702a519fb172dbc888a 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1190,7 +1190,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1194,7 +1194,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Paper end // Paper end

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize isEyeInFluid
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248a6963f01 100644 index 65a75480831d882e8318f702a519fb172dbc888a..e1a722c3ec74c0967d089ad469d7b3305bf66195 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -269,6 +269,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -269,6 +269,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -18,7 +18,7 @@ index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248
public int invulnerableTime; public int invulnerableTime;
protected boolean firstTick = true; protected boolean firstTick = true;
protected final SynchedEntityData entityData; protected final SynchedEntityData entityData;
@@ -2011,7 +2014,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2015,7 +2018,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
private void updateFluidOnEyes() { private void updateFluidOnEyes() {
this.wasEyeInWater = this.isEyeInFluid(FluidTags.WATER); this.wasEyeInWater = this.isEyeInFluid(FluidTags.WATER);
@@ -28,7 +28,7 @@ index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248
double eyeY = this.getEyeY(); double eyeY = this.getEyeY();
if (!( if (!(
this.getVehicle() instanceof AbstractBoat abstractBoat this.getVehicle() instanceof AbstractBoat abstractBoat
@@ -2023,7 +2027,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2027,7 +2031,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
FluidState fluidState = this.level().getFluidState(blockPos); FluidState fluidState = this.level().getFluidState(blockPos);
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos); double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
if (d > eyeY) { if (d > eyeY) {
@@ -48,7 +48,7 @@ index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248
} }
} }
} }
@@ -2103,9 +2118,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -2107,9 +2122,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
} }

View File

@@ -126,10 +126,10 @@ index c0044f4013520fd617ec365012b10862571744f3..14d23006d3ec15bb3ec6f976bff6c097
private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2 private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a209d2b0d 100644 index e1a722c3ec74c0967d089ad469d7b3305bf66195..5fda5eadd37ec52ca6470d4aeb18a20c192811be 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1140,16 +1140,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1144,16 +1144,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.onGround; return this.onGround;
} }
@@ -146,7 +146,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
public void move(MoverType type, Vec3 movement) { public void move(MoverType type, Vec3 movement) {
// Gale start - VMP - skip entity move if movement is zero // Gale start - VMP - skip entity move if movement is zero
if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) { if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) {
@@ -1157,16 +1147,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1161,16 +1151,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Gale end - VMP - skip entity move if movement is zero // Gale end - VMP - skip entity move if movement is zero
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
@@ -163,7 +163,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
if (this.noPhysics) { if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else { } else {
@@ -1300,13 +1281,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1304,13 +1285,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Gale end - skip negligible planar movement multiplication // Gale end - skip negligible planar movement multiplication
} }
} }
@@ -177,7 +177,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
} }
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) { private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
@@ -4858,9 +4832,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4862,9 +4836,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public void setDeltaMovement(Vec3 deltaMovement) { public void setDeltaMovement(Vec3 deltaMovement) {
@@ -187,7 +187,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
} }
public void addDeltaMovement(Vec3 addend) { public void addDeltaMovement(Vec3 addend) {
@@ -4968,9 +4940,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -4972,9 +4944,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Paper end - Fix MC-4 // Paper end - Fix MC-4
if (this.position.x != x || this.position.y != y || this.position.z != z) { if (this.position.x != x || this.position.y != y || this.position.z != z) {

View File

@@ -42,10 +42,10 @@ index 2d24d03bbdb5ee0d862cbfff2219f58afffafe12..11f4f2f3bc4c9f9f6a1f83b90f3de34c
protected boolean addEntity(final Entity entity, final boolean fromDisk, final boolean event) { protected boolean addEntity(final Entity entity, final boolean fromDisk, final boolean event) {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 192d65bdc9fc9ae96d460e9b0832c20a209d2b0d..7961d8ff4fc13ca5274f6667181da5ce557ddc0f 100644 index 5fda5eadd37ec52ca6470d4aeb18a20c192811be..35fdc9863598755ece1dcc53b4b42c0d5d5e882d 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -370,6 +370,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -374,6 +374,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper end // Paper end
// Paper start - rewrite chunk system // Paper start - rewrite chunk system
private final boolean isHardColliding = this.moonrise$isHardCollidingUncached(); private final boolean isHardColliding = this.moonrise$isHardCollidingUncached();
@@ -53,7 +53,7 @@ index 192d65bdc9fc9ae96d460e9b0832c20a209d2b0d..7961d8ff4fc13ca5274f6667181da5ce
private net.minecraft.server.level.FullChunkStatus chunkStatus; private net.minecraft.server.level.FullChunkStatus chunkStatus;
private ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkData chunkData; private ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkData chunkData;
private int sectionX = Integer.MIN_VALUE; private int sectionX = Integer.MIN_VALUE;
@@ -383,6 +384,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -387,6 +388,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
@Override @Override

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Paper Changes
Original license: MIT Original license: MIT
Original project: https://github.com/PurpurMC/Purpur Original project: https://github.com/PurpurMC/Purpur
Commit: 5d3463aaa0472c7d3c2028ea4d0ad3fb128785d2 Commit: 916df1a858c46e240fa966540cf1cc819cfb3c36
Patches listed below are removed in this patch, They exists in Gale or Leaf: Patches listed below are removed in this patch, They exists in Gale or Leaf:
* "Rebrand.patch" * "Rebrand.patch"
@@ -1016,10 +1016,10 @@ index ca656d97a00eef86773be9833fd908283002c885..01759ae999cd158e540f1e2824737407
+ // Purpur end - Item entity immunities + // Purpur end - Item entity immunities
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 13feb2f7a0e4be92cc8d57512475b7e335d581a8..5f30621d717bd0728ddc074072ab7a02c487b253 100644 index 6b4e74b808b4fb6ac0143d5c82571657b2c49683..fc4fa99a993a017676da2be3cb254399d421bce1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -513,7 +513,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -514,7 +514,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle(); net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
this.getHandle().setLastHurtByMob(nmsKiller); this.getHandle().setLastHurtByMob(nmsKiller);
if (nmsKiller != null) { if (nmsKiller != null) {
@@ -1028,7 +1028,7 @@ index 13feb2f7a0e4be92cc8d57512475b7e335d581a8..5f30621d717bd0728ddc074072ab7a02
} else { } else {
this.getHandle().lastHurtByPlayer = null; this.getHandle().lastHurtByPlayer = null;
this.getHandle().lastHurtByPlayerMemoryTime = 0; this.getHandle().lastHurtByPlayerMemoryTime = 0;
@@ -1165,4 +1165,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1167,4 +1167,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public CombatTracker getCombatTracker() { public CombatTracker getCombatTracker() {
return this.getHandle().getCombatTracker().paperCombatTracker; return this.getHandle().getCombatTracker().paperCombatTracker;
} }