mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-30 12:29:18 +00:00
Update 1.19.3 DEV
This commit is contained in:
@@ -6,19 +6,19 @@ Subject: [PATCH] Optimize suffocation
|
||||
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3529f5fede54fbdf0a3783cce2e3322110685e99..6451507ab1e99be308b741bf6269110415bdb46e 100644
|
||||
index be1b2d83666a3d7cb67c864590e9b2fbbf583a10..87e576b6e070e5d7bed803906e1f10817f18d965 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -400,7 +400,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isAlive()) {
|
||||
@@ -402,7 +402,7 @@ public abstract class LivingEntity extends Entity {
|
||||
boolean flag = this instanceof net.minecraft.world.entity.player.Player;
|
||||
|
||||
- if (this.isInWall()) {
|
||||
+ if ((!top.leavesmc.leaves.LeavesConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) { // Leaves - optimize suffocation
|
||||
this.hurt(DamageSource.IN_WALL, 1.0F);
|
||||
} else if (flag && !this.level.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||
double d0 = this.level.getWorldBorder().getDistanceToBorder(this) + this.level.getWorldBorder().getDamageSafeZone();
|
||||
@@ -1328,6 +1328,15 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.level.isClientSide) {
|
||||
- if (this.isInWall()) {
|
||||
+ if ((!top.leavesmc.leaves.LeavesConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) { // Leaves - optimize suffocation
|
||||
this.hurt(DamageSource.IN_WALL, 1.0F);
|
||||
} else if (flag && !this.level.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||
double d0 = this.level.getWorldBorder().getDistanceToBorder(this) + this.level.getWorldBorder().getDamageSafeZone();
|
||||
@@ -1327,6 +1327,15 @@ public abstract class LivingEntity extends Entity {
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user