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:
@@ -2,7 +2,7 @@ group=cn.dreeam.leaf
|
||||
mcVersion=1.21.5
|
||||
version=1.21.5-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit=2ba1675c7506cadd8a540ea452e5dafb79ae8947
|
||||
paperCommit=94f2903584945d71012050bcef830da4271fdb90
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes
|
||||
Original license: MIT
|
||||
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:
|
||||
* "co/aikar/timings/TimedEventExecutor.java.patch"
|
||||
|
||||
@@ -1079,7 +1079,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129
|
||||
for (Entity entity : passengerEntity.getPassengers()) {
|
||||
this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2
|
||||
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
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -103,8 +103,6 @@ import net.minecraft.util.HashOps;
|
||||
@@ -1234,7 +1234,7 @@ index 64b0508ef21952c65b0b967b756b2a4c64d96899..b6b03fbbd669e6331b30255df5419611
|
||||
|
||||
protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler);
|
||||
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
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -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.InteractionResult;
|
||||
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
|
||||
|
||||
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
|
||||
this.inBlockState = null;
|
||||
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) {
|
||||
Leashable.tickLeash(serverLevelx, (Entity & Leashable)this);
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
}
|
||||
|
||||
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) {
|
||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||
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.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
@@ -1281,7 +1281,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
return;
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -1290,7 +1290,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
boolean flag = !Mth.equal(movement.x, vec3.x);
|
||||
boolean flag1 = !Mth.equal(movement.z, vec3.z);
|
||||
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()) {
|
||||
@@ -1298,7 +1298,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
} else {
|
||||
if (this.horizontalCollision) {
|
||||
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();
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
|
||||
@@ -1306,7 +1306,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
}
|
||||
}
|
||||
// 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();
|
||||
if (this.portalProcess != null) {
|
||||
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
||||
@@ -1315,7 +1315,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
this.setPortalCooldown();
|
||||
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
|
||||
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()) {
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -1339,7 +1339,7 @@ index af123cc567b5e53703f9555ea6f5ad322c679eb7..ad8e2e90940adbb5bb471833710ee29f
|
||||
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;
|
||||
} else {
|
||||
// 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();
|
||||
teleportTransition.postTeleportTransition().onTransition(entityx);
|
||||
|
||||
@@ -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)
|
||||
|
||||
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
|
||||
+++ 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
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
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
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -24,7 +24,7 @@ index c68233c5953f7a760b9c0b74c19bdfbeb61f349f..51b899299a655af6b85b69fbf7fef03f
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
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
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -36,7 +36,7 @@ index c68233c5953f7a760b9c0b74c19bdfbeb61f349f..51b899299a655af6b85b69fbf7fef03f
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
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) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
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
|
||||
+++ 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();
|
||||
if (!this.level().isClientSide) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
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
|
||||
+++ 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
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
|
||||
+++ 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) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
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
|
||||
+++ 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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Minecraft Changes
|
||||
Original license: MIT
|
||||
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:
|
||||
* "net/minecraft/CrashReport.java.patch"
|
||||
@@ -912,7 +912,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58
|
||||
}
|
||||
// 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
|
||||
index 7f18fb7f61e9219eb23073d9215f3bd6c57dc320..6bc6000c45f35ff85b36bede9d6010d8452b1f21 100644
|
||||
index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b234c579f26 100644
|
||||
--- a/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
|
||||
@@ -1888,7 +1888,7 @@ index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188b
|
||||
}
|
||||
|
||||
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
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -139,6 +139,7 @@ import net.minecraft.world.scores.Team;
|
||||
@@ -1929,7 +1929,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
|
||||
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
|
||||
|
||||
@@ -1969,7 +1969,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
this.position = Vec3.ZERO;
|
||||
this.blockPosition = BlockPos.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 instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
// Paper end - Configurable nether ceiling damage
|
||||
@@ -1977,7 +1977,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
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() {
|
||||
@@ -1986,7 +1986,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1995,7 +1995,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
|
||||
this.wasTouchingWater = false;
|
||||
} 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);
|
||||
}
|
||||
// Paper end
|
||||
@@ -2009,7 +2009,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
return compound;
|
||||
} catch (Throwable var8) {
|
||||
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);
|
||||
}
|
||||
// Paper end
|
||||
@@ -2023,7 +2023,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
} catch (Throwable var8) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT");
|
||||
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 (leashable.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -2031,7 +2031,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
// CraftBukkit start - fire PlayerUnleashEntityEvent
|
||||
// Paper start - Expand EntityUnleashEvent
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -2045,7 +2045,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
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;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -2060,7 +2060,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} 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());
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
@@ -2089,7 +2089,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
public boolean canUsePortal(boolean allowPassengers) {
|
||||
@@ -2098,7 +2098,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -2111,7 +2111,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
// Paper start - optimise collisions
|
||||
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
|
||||
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() {
|
||||
@@ -2120,7 +2120,7 @@ index a65ba74904d7f573d95c39eeeec8ce0373e06821..b714c64a318d38e309351f34426406c7
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
@@ -12065,7 +12065,7 @@ index 634c518c105c8dc50838a4a6690641d82fd637fb..0afdfdc07764a26316c171c2a6722caf
|
||||
|
||||
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
|
||||
index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c784e4270d8 100644
|
||||
index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf8a801fab 100644
|
||||
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
@@ -661,7 +661,10 @@ public class PiglinAi {
|
||||
@@ -12075,7 +12075,7 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c78
|
||||
- if (entity.getItemBySlot(equipmentSlot).is(ItemTags.PIGLIN_SAFE_ARMOR)) {
|
||||
+ // Purpur start - piglins ignore gold-trimmed armor
|
||||
+ 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
|
||||
return true;
|
||||
}
|
||||
@@ -12085,8 +12085,8 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c78
|
||||
}
|
||||
|
||||
+ // Purpur start - piglins ignore gold-trimmed armor
|
||||
+ private static boolean isWearingGoldTrim(Item itemstack) {
|
||||
+ net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.components().get(net.minecraft.core.component.DataComponents.TRIM);
|
||||
+ private static boolean isWearingGoldTrim(net.minecraft.world.item.ItemStack itemstack) {
|
||||
+ 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);
|
||||
+ }
|
||||
+ // Purpur end - piglins ignore gold-trimmed armor
|
||||
@@ -13049,7 +13049,7 @@ index 4541bb5233e986d9993d8593afef9b12c935d00a..4f61c17e0a4a82773834bc21e00cac6e
|
||||
|
||||
public static enum Status {
|
||||
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
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -103,6 +103,10 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
|
||||
@@ -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
|
||||
return;
|
||||
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
|
||||
+++ 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
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89
|
||||
public String toString() {
|
||||
return "Reference{" + this.key + "=" + this.value + "}";
|
||||
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
|
||||
+++ 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);
|
||||
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
|
||||
if (d > eyeY) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
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
|
||||
+++ 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);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ index c3d4cdfece32a05acd03b892cd5b343f0d230e64..1cbc319a9b5ce3b15f79fcfec8cf9c46
|
||||
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;
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
@@ -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
|
||||
index 1cbc319a9b5ce3b15f79fcfec8cf9c46d0d3d1d0..309a31215cb63452215fd880590cffd569aee208 100644
|
||||
index 21dbc78baae89093ef9bc3a0620ab9e557e22910..69521086fca0c9fbc230817062b65c4269c575fd 100644
|
||||
--- a/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);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ index 1cbc319a9b5ce3b15f79fcfec8cf9c46d0d3d1d0..309a31215cb63452215fd880590cffd5
|
||||
this.mainSupportingBlockPos = optional;
|
||||
} else if (movement != null) {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -708,10 +708,10 @@ index 8b1652805a2ac9ebae9c99dd77e81c7a484a7abb..e4bccc642abe15b0ec4b1cf263480106
|
||||
serverPlayer.connection = player.connection;
|
||||
serverPlayer.restoreFrom(player, keepInventory);
|
||||
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
|
||||
+++ 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.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
||||
this.setPortalCooldown();
|
||||
@@ -759,7 +759,7 @@ index 309a31215cb63452215fd880590cffd569aee208..b89923a0b30a294c393716b666ff3377
|
||||
} else if (this.portalProcess.hasExpired()) {
|
||||
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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
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
|
||||
+++ 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
|
||||
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 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 currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Sakura: Optimise check inside blocks and traverse blocks
|
||||
Dreeam TODO: refactor checkinsideblcoks
|
||||
|
||||
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
|
||||
+++ 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) {
|
||||
if (this.isAffectedByBlocks()) {
|
||||
LongSet set = this.visitedBlocks;
|
||||
@@ -17,7 +17,7 @@ index cfd01993160bcc4a8a5b80c82df7c0c82b70f229..f866fd8a7c37b94d24d6d1e41ed0a610
|
||||
|
||||
for (Entity.Movement movement : movements) {
|
||||
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,
|
||||
(pos, step) -> {
|
||||
if (this.isAlive()) {
|
||||
|
||||
@@ -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
|
||||
index f866fd8a7c37b94d24d6d1e41ed0a6106a82a4ac..d09a32288398d3ffa0fa6e9c6fd06f953b33688f 100644
|
||||
index cc6b6b442d72b4a974cedd8ceef710304e52ab18..65a75480831d882e8318f702a519fb172dbc888a 100644
|
||||
--- a/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
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize isEyeInFluid
|
||||
|
||||
|
||||
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
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -269,6 +269,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -18,7 +18,7 @@ index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248
|
||||
public int invulnerableTime;
|
||||
protected boolean firstTick = true;
|
||||
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() {
|
||||
this.wasEyeInWater = this.isEyeInFluid(FluidTags.WATER);
|
||||
@@ -28,7 +28,7 @@ index d09a32288398d3ffa0fa6e9c6fd06f953b33688f..c377aef03861f2d860a7c6273f634248
|
||||
double eyeY = this.getEyeY();
|
||||
if (!(
|
||||
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);
|
||||
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,10 +126,10 @@ index c0044f4013520fd617ec365012b10862571744f3..14d23006d3ec15bb3ec6f976bff6c097
|
||||
|
||||
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
|
||||
index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a209d2b0d 100644
|
||||
index e1a722c3ec74c0967d089ad469d7b3305bf66195..5fda5eadd37ec52ca6470d4aeb18a20c192811be 100644
|
||||
--- a/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;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
// Gale start - VMP - skip entity move if movement is 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
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
@@ -163,7 +163,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} 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
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
|
||||
}
|
||||
|
||||
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) {
|
||||
@@ -187,7 +187,7 @@ index c377aef03861f2d860a7c6273f634248a6963f01..192d65bdc9fc9ae96d460e9b0832c20a
|
||||
}
|
||||
|
||||
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
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
|
||||
@@ -42,10 +42,10 @@ index 2d24d03bbdb5ee0d862cbfff2219f58afffafe12..11f4f2f3bc4c9f9f6a1f83b90f3de34c
|
||||
|
||||
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
|
||||
index 192d65bdc9fc9ae96d460e9b0832c20a209d2b0d..7961d8ff4fc13ca5274f6667181da5ce557ddc0f 100644
|
||||
index 5fda5eadd37ec52ca6470d4aeb18a20c192811be..35fdc9863598755ece1dcc53b4b42c0d5d5e882d 100644
|
||||
--- a/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 start - rewrite chunk system
|
||||
private final boolean isHardColliding = this.moonrise$isHardCollidingUncached();
|
||||
@@ -53,7 +53,7 @@ index 192d65bdc9fc9ae96d460e9b0832c20a209d2b0d..7961d8ff4fc13ca5274f6667181da5ce
|
||||
private net.minecraft.server.level.FullChunkStatus chunkStatus;
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkData chunkData;
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Paper Changes
|
||||
Original license: MIT
|
||||
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:
|
||||
* "Rebrand.patch"
|
||||
@@ -1016,10 +1016,10 @@ index ca656d97a00eef86773be9833fd908283002c885..01759ae999cd158e540f1e2824737407
|
||||
+ // 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
|
||||
index 13feb2f7a0e4be92cc8d57512475b7e335d581a8..5f30621d717bd0728ddc074072ab7a02c487b253 100644
|
||||
index 6b4e74b808b4fb6ac0143d5c82571657b2c49683..fc4fa99a993a017676da2be3cb254399d421bce1 100644
|
||||
--- a/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();
|
||||
this.getHandle().setLastHurtByMob(nmsKiller);
|
||||
if (nmsKiller != null) {
|
||||
@@ -1028,7 +1028,7 @@ index 13feb2f7a0e4be92cc8d57512475b7e335d581a8..5f30621d717bd0728ddc074072ab7a02
|
||||
} else {
|
||||
this.getHandle().lastHurtByPlayer = null;
|
||||
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() {
|
||||
return this.getHandle().getCombatTracker().paperCombatTracker;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user