mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
fix vmp patch skip entity zero movement (#511)
This commit is contained in:
@@ -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 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d1ce2b9c1 100644
|
||||
index 9c7d16a53d71abd672ad4cfca522d34f0534b32a..c96ed3410ec10e9e8885685a9c1f4bfc0b62d23e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -260,6 +260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -24,7 +24,7 @@ index 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1086,6 +1087,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1086,6 +1087,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -32,11 +32,12 @@ index 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d
|
||||
+ if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ boundingBoxChanged = false;
|
||||
+ // Gale end - VMP - skip entity move if movement is zero
|
||||
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");
|
||||
@@ -4375,6 +4381,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4375,6 +4382,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
|
||||
@@ -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 c845bea5d31296efa03d07e5133e988ef3c57808..515bc3de097bf9edda42584e56fa173727455b5a 100644
|
||||
index bf204f97d8b1820cfc0000df89df37d30f035707..b9594f76a5cb76dd77602ea780b404727ef59c45 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4873,6 +4873,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4874,6 +4874,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 515bc3de097bf9edda42584e56fa173727455b5a..9153d6d44d740e014579ebd7606fd2f3adbca844 100644
|
||||
index b9594f76a5cb76dd77602ea780b404727ef59c45..71254d1b9950ee5b7aa2ad487b12e3fb268af747 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2231,8 +2231,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2232,8 +2232,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 9153d6d44d740e014579ebd7606fd2f3adbca844..479cb2a3135b86bf1ae5132f8ddfbfb59c85cafc 100644
|
||||
index 71254d1b9950ee5b7aa2ad487b12e3fb268af747..5c783dfca548704c70e20e77fe286fbefbe8a77b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1218,8 +1218,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1219,8 +1219,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1923,7 +1923,7 @@ index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188b
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e96526d36f 100644
|
||||
index 5d1f50b49a1d55268b716f6e6b91f82b9851ad57..7b371f70f1c05e75e32fa6357989082ff4e7adae 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -146,6 +146,7 @@ import org.jetbrains.annotations.Contract;
|
||||
@@ -2012,7 +2012,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
this.onBelowWorld();
|
||||
}
|
||||
}
|
||||
@@ -1900,7 +1933,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1901,7 +1934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean fireImmune() {
|
||||
@@ -2021,7 +2021,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
}
|
||||
|
||||
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
@@ -2606,6 +2639,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2607,6 +2640,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
output.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -2033,7 +2033,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
|
||||
@@ -2726,6 +2764,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2727,6 +2765,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
|
||||
// Paper end
|
||||
@@ -2043,7 +2043,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
||||
@@ -3004,6 +3045,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3005,6 +3046,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.isAlive() && this instanceof Leashable leashable2) {
|
||||
if (leashable2.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -2051,7 +2051,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
// Paper start - EntityUnleashEvent
|
||||
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
|
||||
leashable2, player, hand, !player.hasInfiniteMaterials(), true
|
||||
@@ -3299,6 +3341,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3300,6 +3342,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.passengers = ImmutableList.copyOf(list);
|
||||
}
|
||||
|
||||
@@ -2065,7 +2065,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
|
||||
}
|
||||
}
|
||||
@@ -3340,6 +3389,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3341,6 +3390,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -2080,7 +2080,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} else {
|
||||
@@ -3409,15 +3466,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3410,15 +3467,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return Vec3.directionFromRotation(this.getRotationVector());
|
||||
}
|
||||
|
||||
@@ -2100,7 +2100,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3619,7 +3679,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3620,7 +3680,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
@@ -2109,7 +2109,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
@@ -4166,7 +4226,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4167,7 +4227,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit end
|
||||
|
||||
public boolean canUsePortal(boolean allowPassengers) {
|
||||
@@ -2118,7 +2118,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
@@ -4696,6 +4756,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4697,6 +4757,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return Mth.lerp(partialTick, this.yRotO, this.yRot);
|
||||
}
|
||||
|
||||
@@ -2131,7 +2131,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
// Paper start - optimise collisions
|
||||
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
|
||||
if (this.touchingUnloadedChunk()) {
|
||||
@@ -5132,7 +5198,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5133,7 +5199,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public float maxUpStep() {
|
||||
@@ -2140,7 +2140,7 @@ index 2c08ea1657984e145c9dc0be4de4c74f5ca58683..30fc1634e6d3f40636d2aff7397d22e9
|
||||
}
|
||||
|
||||
public void onExplosionHit(@Nullable Entity entity) {
|
||||
@@ -5390,4 +5456,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5391,4 +5457,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
|
||||
@@ -8,7 +8,7 @@ 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 d544d66542d53db1a847a6b1ab8cf5ee848f31de..e563b636a05a299d860a334987594dbd5c7d3511 100644
|
||||
index b5070367c57ebaaff8716d447d50c21925756750..f850c4459f25295af9fb01d5338520071a0f1cda 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -394,6 +394,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -19,7 +19,7 @@ index d544d66542d53db1a847a6b1ab8cf5ee848f31de..e563b636a05a299d860a334987594dbd
|
||||
|
||||
@Override
|
||||
public final boolean moonrise$isHardColliding() {
|
||||
@@ -2260,31 +2261,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2261,31 +2262,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return new Vec3(this.xOld, this.yOld, this.zOld);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index d544d66542d53db1a847a6b1ab8cf5ee848f31de..e563b636a05a299d860a334987594dbd
|
||||
public void playerTouch(Player player) {
|
||||
}
|
||||
|
||||
@@ -5509,4 +5485,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5510,4 +5486,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return false;
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
@@ -38,10 +38,10 @@ index 105423d248df2647d78e6f1a288e9b41003ad437..06294e4036991a803deefc20e35160c5
|
||||
final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting
|
||||
ChunkPos pos = chunk.getPos();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6938961cae73d13a12f30a6ea46725af0728e11d..c18f6f3f8307ae1d221a38cd1dc2191cdc4e767a 100644
|
||||
index f850c4459f25295af9fb01d5338520071a0f1cda..902bdca37fba04933399c9966450b1d2e8a9f66e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -5100,6 +5100,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5101,6 +5101,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void checkDespawn() {
|
||||
}
|
||||
|
||||
|
||||
@@ -858,10 +858,10 @@ index f9e7532f86122a379692561a639a209a126e8bba..fab317d6c9a1c914f19bae11846cb576
|
||||
if (isLocatorBarEnabledFor(player)) {
|
||||
if (!connection.isBroken()) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 74926ada5d16ea6e9986e396b51559f2780c8b90..535bc93decdabcd4f5f9a860a89332fd519ef97f 100644
|
||||
index 902bdca37fba04933399c9966450b1d2e8a9f66e..bdcf61262dc3c370eead4f555226c82f004f420d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3477,15 +3477,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3478,15 +3478,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.portalProcess != null) {
|
||||
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
||||
this.setPortalCooldown();
|
||||
@@ -909,7 +909,7 @@ index 74926ada5d16ea6e9986e396b51559f2780c8b90..535bc93decdabcd4f5f9a860a89332fd
|
||||
} else if (this.portalProcess.hasExpired()) {
|
||||
this.portalProcess = null;
|
||||
}
|
||||
@@ -4062,6 +4087,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4063,6 +4088,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
private Entity teleportCrossDimension(ServerLevel oldLevel, ServerLevel newLevel, 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 6286aa8196a4e3a388f2ed3a472417d84f535970..043ae5e2783d60b295a11d85fad60d87f729cb9b 100644
|
||||
index bdcf61262dc3c370eead4f555226c82f004f420d..e223394c968f1fe31eb66dfbc95bd6e07fb094ee 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4780,10 +4780,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4781,10 +4781,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 6286aa8196a4e3a388f2ed3a472417d84f535970..043ae5e2783d60b295a11d85fad60d87
|
||||
final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3);
|
||||
|
||||
final Level world = this.level;
|
||||
@@ -4819,7 +4816,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4820,7 +4817,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) {
|
||||
for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) {
|
||||
|
||||
@@ -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 043ae5e2783d60b295a11d85fad60d87f729cb9b..b694c7c1837fd4facb16d6bcf93245da9d18a56d 100644
|
||||
index e223394c968f1fe31eb66dfbc95bd6e07fb094ee..0c64c88dfc65d3b1333dcc8ed28b89811307b126 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1184,7 +1184,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1185,7 +1185,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ index 896e50276e4e70f694562f0626dc53d3ecd21258..58b0eb299f8750e167145f4cba6aba99
|
||||
if (rounded > 0) {
|
||||
this.awardStat(Stats.WALK_UNDER_WATER_ONE_CM, rounded);
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index b694c7c1837fd4facb16d6bcf93245da9d18a56d..48c2aeee828c1b79d8d6c5f5fd88fae1ef4befc8 100644
|
||||
index 0c64c88dfc65d3b1333dcc8ed28b89811307b126..fb5ca5ecbc4b018e56d6d934f399f20808240811 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -288,7 +288,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -37,7 +37,7 @@ index b694c7c1837fd4facb16d6bcf93245da9d18a56d..48c2aeee828c1b79d8d6c5f5fd88fae1
|
||||
public int invulnerableTime;
|
||||
protected boolean firstTick = true;
|
||||
protected final SynchedEntityData entityData;
|
||||
@@ -2038,8 +2045,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2039,8 +2046,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
private void updateFluidOnEyes() {
|
||||
@@ -48,7 +48,7 @@ index b694c7c1837fd4facb16d6bcf93245da9d18a56d..48c2aeee828c1b79d8d6c5f5fd88fae1
|
||||
double eyeY = this.getEyeY();
|
||||
if (!(
|
||||
this.getVehicle() instanceof AbstractBoat abstractBoat
|
||||
@@ -2051,7 +2058,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2052,7 +2059,9 @@ 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) {
|
||||
@@ -59,7 +59,7 @@ index b694c7c1837fd4facb16d6bcf93245da9d18a56d..48c2aeee828c1b79d8d6c5f5fd88fae1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2131,9 +2140,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2132,9 +2141,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ index b694c7c1837fd4facb16d6bcf93245da9d18a56d..48c2aeee828c1b79d8d6c5f5fd88fae1
|
||||
public boolean isInLava() {
|
||||
return !this.firstTick && this.fluidHeight.getDouble(FluidTags.LAVA) > 0.0;
|
||||
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index c8354d46ed909090f7c15f396863bf7d73afcefa..3ee788b172240ccf38cb31385dff13364ccc4142 100644
|
||||
index 66ae0b340c7e9ebccfeaee786577e27916ace38c..b7cd9b286e7392c3fd619c7ba9e049076e245fd6 100644
|
||||
--- a/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -153,7 +153,7 @@ public class ExperienceOrb extends Entity {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize waypoint
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 48c2aeee828c1b79d8d6c5f5fd88fae1ef4befc8..b71acd053b38d9b59720e35e664f957df6626b27 100644
|
||||
index fb5ca5ecbc4b018e56d6d934f399f20808240811..6982d163eb02b5706e0887cff83f288c93e2524c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -5118,7 +5118,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5119,7 +5119,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
int floor = Mth.floor(x);
|
||||
int floor1 = Mth.floor(y);
|
||||
int floor2 = Mth.floor(z);
|
||||
@@ -18,7 +18,7 @@ index 48c2aeee828c1b79d8d6c5f5fd88fae1ef4befc8..b71acd053b38d9b59720e35e664f957d
|
||||
this.blockPosition = new BlockPos(floor, floor1, floor2);
|
||||
this.inBlockState = null;
|
||||
if (SectionPos.blockToSectionCoord(floor) != this.chunkPosition.x || SectionPos.blockToSectionCoord(floor2) != this.chunkPosition.z) {
|
||||
@@ -5127,7 +5128,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5128,7 +5129,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
this.levelCallback.onMove();
|
||||
|
||||
@@ -149,7 +149,7 @@ index 88a3f390f615275c84237814e10c969bfe3c6a55..0ad594fe2548cf1c00f8d75fe076d62c
|
||||
|
||||
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 78ffbd45413f552042e8ec77df4e8d896ae5bec1..f3c0b29d50a001029f0275319b87b75a3ff0bca5 100644
|
||||
index 6982d163eb02b5706e0887cff83f288c93e2524c..7bdb5ea03f0fa71edf0ca20145070475e4e028e8 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1138,16 +1138,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -169,8 +169,8 @@ index 78ffbd45413f552042e8ec77df4e8d896ae5bec1..f3c0b29d50a001029f0275319b87b75a
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
// Gale start - VMP - skip entity move if movement is zero
|
||||
if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) {
|
||||
@@ -1155,16 +1145,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
@@ -1156,16 +1146,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
boundingBoxChanged = false;
|
||||
// Gale end - VMP - skip entity move if movement is zero
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
- // Paper start - detailed watchdog information
|
||||
@@ -186,7 +186,7 @@ index 78ffbd45413f552042e8ec77df4e8d896ae5bec1..f3c0b29d50a001029f0275319b87b75a
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -1288,13 +1269,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1289,13 +1270,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Gale end - skip negligible planar movement multiplication
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,7 @@ index 78ffbd45413f552042e8ec77df4e8d896ae5bec1..f3c0b29d50a001029f0275319b87b75a
|
||||
}
|
||||
|
||||
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
|
||||
@@ -5012,9 +4986,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5013,9 +4987,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void setDeltaMovement(Vec3 deltaMovement) {
|
||||
@@ -210,7 +210,7 @@ index 78ffbd45413f552042e8ec77df4e8d896ae5bec1..f3c0b29d50a001029f0275319b87b75a
|
||||
}
|
||||
|
||||
public void addDeltaMovement(Vec3 addend) {
|
||||
@@ -5112,9 +5084,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5113,9 +5085,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// Paper end - Block invalid positions and bounding box
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] optimize checkInsideBlocks calls
|
||||
License: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2d26a7a0b85c85830694e7947f2c4f29483bb99a..d61761dc1683e439af4ebfc393bc8c70de23340f 100644
|
||||
index 7bdb5ea03f0fa71edf0ca20145070475e4e028e8..95c11de1796c032a813c96dba3476171a0e4aadb 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1701,8 +1701,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1702,8 +1702,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ index 2d26a7a0b85c85830694e7947f2c4f29483bb99a..d61761dc1683e439af4ebfc393bc8c70
|
||||
BlockGetter.forEachBlockIntersectedBetween(
|
||||
vec3,
|
||||
vec31,
|
||||
@@ -1711,35 +1716,51 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1712,35 +1717,51 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.isAlive()) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -88,7 +88,7 @@ index 2d26a7a0b85c85830694e7947f2c4f29483bb99a..d61761dc1683e439af4ebfc393bc8c70
|
||||
}
|
||||
|
||||
this.debugBlockIntersection(pos, flag, flag1);
|
||||
@@ -1749,6 +1770,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1750,6 +1771,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize onClimbable
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index d61761dc1683e439af4ebfc393bc8c70de23340f..85789dfd30fe4f3b1108634e84b10f168bf6f64e 100644
|
||||
index 95c11de1796c032a813c96dba3476171a0e4aadb..17a4d1c55f878a2603586812c10d87f3949e35a8 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4992,7 +4992,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4993,7 +4993,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Gale start - don't load chunks to activate climbing entities
|
||||
public @Nullable BlockState getInBlockStateIfLoaded() {
|
||||
if (this.inBlockState == null) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize applyMovementEmissionAndPlaySound
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 85789dfd30fe4f3b1108634e84b10f168bf6f64e..0bd4bc2d3d3edf6f7ea5e41d4049b2e0a3b3151e 100644
|
||||
index 17a4d1c55f878a2603586812c10d87f3949e35a8..d04280e45c6cfb75237d5376e9c30becfd9ad8a0 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1276,7 +1276,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1277,7 +1277,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
float f1 = (float)(movement.length() * 0.6F);
|
||||
float f2 = (float)(movement.horizontalDistance() * 0.6F);
|
||||
BlockPos onPos = this.getOnPos();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize isStateClimbable
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 0bd4bc2d3d3edf6f7ea5e41d4049b2e0a3b3151e..bc02ce9093adb0ec09252ce00f60dd84335cca70 100644
|
||||
index d04280e45c6cfb75237d5376e9c30becfd9ad8a0..b4361d2164c497b0388fac1701a9944d41f58125 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1376,7 +1376,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1377,7 +1377,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
private boolean isStateClimbable(BlockState state) {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] optimize getOnPos
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac71b359f6 100644
|
||||
index b4361d2164c497b0388fac1701a9944d41f58125..1f812fed92f842123708e39a76fe73dd825b3f92 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -895,6 +895,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -47,7 +47,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
}
|
||||
|
||||
this.onGroundNoBlocks = optional.isEmpty();
|
||||
@@ -1207,8 +1218,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1208,8 +1219,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.minorHorizontalCollision = false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
if (this.isLocalInstanceAuthoritative()) {
|
||||
this.checkFallDamage(vec3.y, this.onGround(), blockState, onPosLegacy);
|
||||
}
|
||||
@@ -1275,9 +1286,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1276,9 +1287,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
float f = 0.6F;
|
||||
float f1 = (float)(movement.length() * 0.6F);
|
||||
float f2 = (float)(movement.horizontalDistance() * 0.6F);
|
||||
@@ -70,7 +70,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
boolean isStateClimbable = this.isStateClimbable(blockState);
|
||||
this.moveDist += isStateClimbable ? f1 : f2;
|
||||
this.flyDist += f1;
|
||||
@@ -1346,8 +1356,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1347,8 +1357,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
private void applyEffectsFromBlocks(List<Entity.Movement> movements) {
|
||||
if (this.isAffectedByBlocks()) {
|
||||
if (this.onGround()) {
|
||||
@@ -81,7 +81,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
blockState.getBlock().stepOn(this.level(), onPosLegacy, blockState, this);
|
||||
}
|
||||
|
||||
@@ -1442,34 +1452,124 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1443,34 +1453,124 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.getOnPos(0.2F);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
|
||||
protected float getBlockJumpFactor() {
|
||||
float jumpFactor = this.level().getBlockState(this.blockPosition()).getBlock().getJumpFactor();
|
||||
@@ -1481,7 +1581,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1482,7 +1582,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
BlockState blockState = this.level().getBlockState(this.blockPosition());
|
||||
float speedFactor = blockState.getBlock().getSpeedFactor();
|
||||
if (!blockState.is(Blocks.WATER) && !blockState.is(Blocks.BUBBLE_COLUMN)) {
|
||||
@@ -223,7 +223,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
} else {
|
||||
return speedFactor;
|
||||
}
|
||||
@@ -2103,7 +2203,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2104,7 +2204,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Deprecated
|
||||
protected BlockState getBlockStateOnLegacy() {
|
||||
@@ -232,7 +232,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
}
|
||||
|
||||
public BlockState getBlockStateOn() {
|
||||
@@ -2115,8 +2215,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2116,8 +2216,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
protected void spawnSprintParticle() {
|
||||
@@ -244,7 +244,7 @@ index bc02ce9093adb0ec09252ce00f60dd84335cca70..bb16f3ebffcafcb11d3112e03f5767ac
|
||||
Vec3 deltaMovement = this.getDeltaMovement();
|
||||
BlockPos blockPos = this.blockPosition();
|
||||
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 3ee788b172240ccf38cb31385dff13364ccc4142..d88fc291f3c6ea7dd8293d39a435607937d877bc 100644
|
||||
index b7cd9b286e7392c3fd619c7ba9e049076e245fd6..d923c98460cbb5b99926914261417c7fc1af6810 100644
|
||||
--- a/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -243,6 +243,13 @@ public class ExperienceOrb extends Entity {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] cache eye block position
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index bb16f3ebffcafcb11d3112e03f5767ac71b359f6..29fa9cfa1aa2d507da852f5fe33ea6e4143da194 100644
|
||||
index 1f812fed92f842123708e39a76fe73dd825b3f92..b47a15ca84a66283ceaf46d1d768bfa0530950c2 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -553,20 +553,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -63,7 +63,7 @@ index bb16f3ebffcafcb11d3112e03f5767ac71b359f6..29fa9cfa1aa2d507da852f5fe33ea6e4
|
||||
// Purpur end - copied from Mob - API for any mob to burn daylight
|
||||
// Leaf end - Fix Pufferfish and Purpur patches
|
||||
|
||||
@@ -2151,8 +2163,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2152,8 +2164,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
&& abstractBoat.getBoundingBox().maxY >= eyeY
|
||||
&& abstractBoat.getBoundingBox().minY <= eyeY
|
||||
)) {
|
||||
@@ -75,7 +75,7 @@ index bb16f3ebffcafcb11d3112e03f5767ac71b359f6..29fa9cfa1aa2d507da852f5fe33ea6e4
|
||||
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
|
||||
if (d > eyeY) {
|
||||
// Leaf start - Optimize isEyeInFluid
|
||||
@@ -2280,20 +2293,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2281,20 +2294,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
@@ -98,7 +98,7 @@ index bb16f3ebffcafcb11d3112e03f5767ac71b359f6..29fa9cfa1aa2d507da852f5fe33ea6e4
|
||||
|
||||
public void absSnapTo(double x, double y, double z, float yRot, float xRot) {
|
||||
this.absSnapTo(x, y, z);
|
||||
@@ -4531,6 +4534,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4532,6 +4535,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
EntityDimensions dimensions = this.getDimensions(pose);
|
||||
this.dimensions = dimensions;
|
||||
this.eyeHeight = dimensions.eyeHeight();
|
||||
@@ -106,7 +106,7 @@ index bb16f3ebffcafcb11d3112e03f5767ac71b359f6..29fa9cfa1aa2d507da852f5fe33ea6e4
|
||||
}
|
||||
|
||||
public void refreshDimensions() {
|
||||
@@ -4539,6 +4543,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4540,6 +4544,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
EntityDimensions dimensions = this.getDimensions(pose);
|
||||
this.dimensions = dimensions;
|
||||
this.eyeHeight = dimensions.eyeHeight();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize updateFluidHeightAndDoFluidPushing
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 29fa9cfa1aa2d507da852f5fe33ea6e4143da194..0366217ac729a967ba69fb256481479255d347be 100644
|
||||
index b47a15ca84a66283ceaf46d1d768bfa0530950c2..78d204451266ae3e9d6b5491bb0962ca1c9998cd 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4939,12 +4939,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4940,12 +4940,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
final int minChunkZ = minBlockZ >> 4;
|
||||
final int maxChunkZ = maxBlockZ >> 4;
|
||||
|
||||
@@ -23,7 +23,7 @@ index 29fa9cfa1aa2d507da852f5fe33ea6e4143da194..0366217ac729a967ba69fb2564814792
|
||||
if (chunk == null) continue;
|
||||
final net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunk.getSections();
|
||||
// Leaf end - Prevent double chunk retrieving in entity fluid pushing check and fluid height updating
|
||||
@@ -4956,7 +4956,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4957,7 +4957,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
continue;
|
||||
}
|
||||
final net.minecraft.world.level.chunk.LevelChunkSection section = sections[sectionIdx];
|
||||
@@ -32,7 +32,7 @@ index 29fa9cfa1aa2d507da852f5fe33ea6e4143da194..0366217ac729a967ba69fb2564814792
|
||||
// empty
|
||||
continue;
|
||||
}
|
||||
@@ -5013,7 +5013,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5014,7 +5014,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
this.fluidHeight.put(fluid, maxHeightDiff);
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] optimize checkInsideBlocks
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 0366217ac729a967ba69fb256481479255d347be..afc9788b69a9398c295a6fe3801b82fb6d6c3384 100644
|
||||
index 78d204451266ae3e9d6b5491bb0962ca1c9998cd..20f558f49bcda32373a409eb5137d5b67f6a0404 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1818,72 +1818,57 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1819,72 +1819,57 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
private void checkInsideBlocks(Vec3 vec3, Vec3 vec31, InsideBlockEffectApplier.StepBasedCollector stepBasedCollector, LongSet set) {
|
||||
final Level level = this.level();
|
||||
AABB aabb = this.getBoundingBox().move(vec31.subtract(this.position())).deflate(1.0E-5F);
|
||||
|
||||
@@ -18,10 +18,10 @@ index b94f2122da885fe94bd60c7914421968e6a2f3fa..5178290d060dd8a72f0e6cb77f77d196
|
||||
final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting
|
||||
ChunkPos pos = chunk.getPos();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index dcae12c34690346cb32780f7143fe05549c84c11..841c90c20525e34177de271983db4c1c6b96b57f 100644
|
||||
index 776dba175bd79bda1537bd7004ac214b2b50e0c1..f51d34d794470cb1ca4a5bc69cab81bccbb34434 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1647,8 +1647,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1648,8 +1648,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
final AABB currentBox = this.getBoundingBox();
|
||||
|
||||
@@ -32,7 +32,7 @@ index dcae12c34690346cb32780f7143fe05549c84c11..841c90c20525e34177de271983db4c1c
|
||||
|
||||
final AABB initialCollisionBox;
|
||||
if (xZero & zZero) {
|
||||
@@ -1660,17 +1660,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1661,17 +1661,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
initialCollisionBox = currentBox.expandTowards(movement);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ index dcae12c34690346cb32780f7143fe05549c84c11..841c90c20525e34177de271983db4c1c
|
||||
|
||||
final boolean collidedX = collided.x != movement.x;
|
||||
final boolean collidedY = collided.y != movement.y;
|
||||
@@ -1681,6 +1681,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1682,6 +1682,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
final double stepHeight;
|
||||
|
||||
if ((!collidedDownwards && !this.onGround) || (!collidedX && !collidedZ) || (stepHeight = (double)this.maxUpStep()) <= 0.0) {
|
||||
@@ -63,7 +63,7 @@ index dcae12c34690346cb32780f7143fe05549c84c11..841c90c20525e34177de271983db4c1c
|
||||
return collided;
|
||||
}
|
||||
|
||||
@@ -1691,7 +1692,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1692,7 +1693,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
final List<VoxelShape> stepVoxels = new ArrayList<>();
|
||||
@@ -72,7 +72,7 @@ index dcae12c34690346cb32780f7143fe05549c84c11..841c90c20525e34177de271983db4c1c
|
||||
|
||||
ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.getCollisionsForBlocksOrWorldBorder(
|
||||
this.level, (Entity)(Object)this, stepRetrievalBox, stepVoxels, stepAABBs,
|
||||
@@ -1701,10 +1702,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1702,10 +1703,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
for (final float step : calculateStepHeights(collidedYBox, stepVoxels, stepAABBs, (float)stepHeight, (float)collided.y)) {
|
||||
final Vec3 stepResult = ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.performCollisions(new Vec3(movement.x, (double)step, movement.z), collidedYBox, stepVoxels, stepAABBs);
|
||||
if (stepResult.horizontalDistanceSqr() > collided.horizontalDistanceSqr()) {
|
||||
|
||||
Reference in New Issue
Block a user