From 54d640ed23fd8aa288c2ff24f7a4d6fc869cf76d Mon Sep 17 00:00:00 2001 From: Samsuik Date: Fri, 6 Sep 2024 20:16:57 +0100 Subject: [PATCH] More clean up --- patches/server/0034-Add-option-to-disable-entity-ai.patch | 4 ++-- .../server/0038-Configure-cannon-physics-by-version.patch | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/patches/server/0034-Add-option-to-disable-entity-ai.patch b/patches/server/0034-Add-option-to-disable-entity-ai.patch index a2108ca..3f3d2da 100644 --- a/patches/server/0034-Add-option-to-disable-entity-ai.patch +++ b/patches/server/0034-Add-option-to-disable-entity-ai.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to disable entity ai diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 763abeea3f14f15c27d600e0bdae44b387687bb4..f805e62b527180c074f63c0887c86cdc94f166ab 100644 +index 763abeea3f14f15c27d600e0bdae44b387687bb4..498367016c764635215b49e177759c30622de15e 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -912,7 +912,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @@ -13,7 +13,7 @@ index 763abeea3f14f15c27d600e0bdae44b387687bb4..f805e62b527180c074f63c0887c86cdc ++this.noActionTime; // Paper start - Allow nerfed mobs to jump and float - if (!this.aware) { -+ if (!this.aware || this.level().sakuraConfig().entity.disableMobAi) { // Sakura ++ if (!this.aware || this.level().sakuraConfig().entity.disableMobAi) { // Sakura - add option to disable entity ai if (goalFloat != null) { if (goalFloat.canUse()) goalFloat.tick(); this.getJumpControl().tick(); diff --git a/patches/server/0038-Configure-cannon-physics-by-version.patch b/patches/server/0038-Configure-cannon-physics-by-version.patch index 9529f24..07702ee 100644 --- a/patches/server/0038-Configure-cannon-physics-by-version.patch +++ b/patches/server/0038-Configure-cannon-physics-by-version.patch @@ -106,7 +106,7 @@ index a5d13c6b0d8765e4a65b43f5835fd907738e1da4..19f0d8cf94a60b66cead3c129ded69fc protected int getExplosionCount() { if (this.cause.getMergeEntityData().getMergeLevel() == MergeLevel.NONE) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 96a546d1266ac53244af4b9f59a35b1216b6b3d1..13f0184f5cf5687b3641d3e94625c0599ed2afb1 100644 +index c4fb10b05f88e3d743ef2a58dd4be09c167a04ee..f1f07e69082d3c43b4b2792af2115ef5d7aef452 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -384,7 +384,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -155,8 +155,9 @@ index 96a546d1266ac53244af4b9f59a35b1216b6b3d1..13f0184f5cf5687b3641d3e94625c059 double d0 = vec3d1.lengthSqr(); - if (d0 > 1.0E-7D) { +- // NOTE: Every minecraft update check if there are any new blocks that make sure of fallDistance. + if (d0 > 1.0E-7D || this.physics.before(1_14_0)) { // Sakura - physics version api - // NOTE: Every minecraft update check if there are any new blocks that make sure of fallDistance. ++ // NOTE: Every minecraft update check if there are any new blocks that make use of fallDistance. // As of 1.21 the only block is powdered snow which returns a solid collision for falling blocks. - if (this.fallDistance != 0.0F && d0 >= 1.0D && !this.isFallingBlock) { + if (this.fallDistance != 0.0F && d0 >= 1.0D && !this.isFallingBlock && this.physics.afterOrEqual(1_18_2)) { // Sakura - physics version api