Updated Upstream (Pufferfish)

Upstream has released updates that appear to apply and compile correctly

Pufferfish Changes:
pufferfish-gg/Pufferfish@fb73c9b Updated Upstream (Paper)
pufferfish-gg/Pufferfish@f572e28 Disable suffocation optimization for withers
pufferfish-gg/Pufferfish@3d174ab Merge branch 'wefhy-ver/1.20' into ver/1.20 (#80)
pufferfish-gg/Pufferfish@e32a780 Updated Upstream (Paper)
This commit is contained in:
granny
2023-09-03 22:46:44 -07:00
parent 423c2af60c
commit 042e192444
18 changed files with 77 additions and 105 deletions

View File

@@ -616,10 +616,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
+} +}
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..3d4bb28fe686a9ad2e4c0f75f21e6289c2ea5cf9 index 0000000000000000000000000000000000000000..95d1a8a5b349f7849c040026bfa3469d03d92bfd
--- /dev/null --- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java +++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -0,0 +1,296 @@ @@ -0,0 +1,295 @@
+package gg.pufferfish.pufferfish; +package gg.pufferfish.pufferfish;
+ +
+import gg.pufferfish.pufferfish.simd.SIMDDetection; +import gg.pufferfish.pufferfish.simd.SIMDDetection;
@@ -904,7 +904,6 @@ index 0000000000000000000000000000000000000000..3d4bb28fe686a9ad2e4c0f75f21e6289
+ "the ender dragon whenever a player places an end crystal."); + "the ender dragon whenever a player places an end crystal.");
+ } + }
+ +
+
+ public static boolean disableMethodProfiler; + public static boolean disableMethodProfiler;
+ public static boolean disableOutOfOrderChat; + public static boolean disableOutOfOrderChat;
+ public static boolean suppressNullIdDisconnections; + public static boolean suppressNullIdDisconnections;
@@ -2135,7 +2134,7 @@ index 9afc81ccb237c3655d64cdbe8a0db9a4d7791043..aa5cec6d56d7a8e80861aa4c9b4a74ca
private String descriptionId; private String descriptionId;
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd9806741222397c3072d7 100644 index e11d7283662834047b2ff81a2fd25a4263792deb..e07140ef2f4c5b0019550eb3100c724699e7a05c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@@ -2151,11 +2150,11 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239
if (!this.level().isClientSide) { if (!this.level().isClientSide) {
- if (this.isInWall()) { - if (this.isInWall()) {
+ if ((!gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) { // Pufferfish - optimize suffocation + if (shouldCheckForSuffocation() && this.isInWall()) { // Pufferfish - optimize suffocation
this.hurt(this.damageSources().inWall(), 1.0F); this.hurt(this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) { } else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone(); double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
@@ -1369,6 +1368,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1369,6 +1368,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.getHealth() <= 0.0F; return this.getHealth() <= 0.0F;
} }
@@ -2166,12 +2165,16 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239
+ } + }
+ return true; + return true;
+ } + }
+
+ public boolean shouldCheckForSuffocation() {
+ return !gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F));
+ }
+ // Pufferfish end + // Pufferfish end
+ +
@Override @Override
public boolean hurt(DamageSource source, float amount) { public boolean hurt(DamageSource source, float amount) {
if (this.isInvulnerableTo(source)) { if (this.isInvulnerableTo(source)) {
@@ -1965,6 +1973,20 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1965,6 +1977,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos; return this.lastClimbablePos;
} }
@@ -2192,7 +2195,7 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239
public boolean onClimbable() { public boolean onClimbable() {
if (this.isSpectator()) { if (this.isSpectator()) {
return false; return false;
@@ -3651,7 +3673,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3651,7 +3677,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists // Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
@@ -2471,6 +2474,24 @@ index 247aca0b612f5079a0596350e8311c385df8ab1c..7f21d1d400c8a5615ed1a787dcb06803
this.getBrain().tick((ServerLevel) this.level(), this); this.getBrain().tick((ServerLevel) this.level(), this);
this.level().getProfiler().pop(); this.level().getProfiler().pop();
this.level().getProfiler().push("goatActivityUpdate"); this.level().getProfiler().push("goatActivityUpdate");
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 1e07febcf7a3dfb281728cc5e3e4f15dd776d7e0..c65ab566c6241dd6a44bd11a449ef0c4b2f6dc65 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -150,6 +150,13 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
this.bossEvent.setName(this.getDisplayName());
}
+ // Pufferfish start - optimize suffocation
+ @Override
+ public boolean shouldCheckForSuffocation() {
+ return true;
+ }
+ // Pufferfish end
+
@Override
protected SoundEvent getAmbientSound() {
return SoundEvents.WITHER_AMBIENT;
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 52196431a6538872755344859a0454a0e50c3b6e..80fc7918cb294b0d88a293bd6a920441cb55c3ad 100644 index 52196431a6538872755344859a0454a0e50c3b6e..80fc7918cb294b0d88a293bd6a920441cb55c3ad 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java

View File

@@ -191,7 +191,7 @@ index 759713f7c646aaf1a918c87a2834a1d405385dad..c6a06e07f0b4bb29b5f4c70dfa53ff6d
protected ParticleOptions getInkParticle() { protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK; return ParticleTypes.GLOW_SQUID_INK;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e9a31314424d9db911cd9806741222397c3072d7..3c2892b9b2ade76d9d4b081ad5bce4991df11dda 100644 index e07140ef2f4c5b0019550eb3100c724699e7a05c..8fdeda8939879eb070cdd8808263f4beaf144f9e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -218,9 +218,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -218,9 +218,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -224,7 +224,7 @@ index e9a31314424d9db911cd9806741222397c3072d7..3c2892b9b2ade76d9d4b081ad5bce499
@Override @Override
protected void checkFallDamage(double heightDifference, boolean onGround, BlockState state, BlockPos landedPosition) { protected void checkFallDamage(double heightDifference, boolean onGround, BlockState state, BlockPos landedPosition) {
@@ -2686,7 +2687,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2690,7 +2691,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
protected long lastJumpTime = 0L; // Paper protected long lastJumpTime = 0L; // Paper
@@ -233,7 +233,7 @@ index e9a31314424d9db911cd9806741222397c3072d7..3c2892b9b2ade76d9d4b081ad5bce499
Vec3 vec3d = this.getDeltaMovement(); Vec3 vec3d = this.getDeltaMovement();
// Paper start // Paper start
long time = System.nanoTime(); long time = System.nanoTime();
@@ -3458,8 +3459,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3462,8 +3463,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.pushEntities(); this.pushEntities();
this.level().getProfiler().pop(); this.level().getProfiler().pop();
// Paper start // Paper start
@@ -246,7 +246,7 @@ index e9a31314424d9db911cd9806741222397c3072d7..3c2892b9b2ade76d9d4b081ad5bce499
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO); Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
Location to = new Location (this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot()); Location to = new Location (this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone()); io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
@@ -3469,6 +3472,21 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3473,6 +3476,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
} }
} }
@@ -2945,7 +2945,7 @@ index a24ae93efcdb2da5782d342c7697a1bb253400c7..c5100d3d8c36bf0c07f2028c5d3ec4bb
this.dragonFight.updateDragon(this); this.dragonFight.updateDragon(this);
} }
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 1e07febcf7a3dfb281728cc5e3e4f15dd776d7e0..6c86411658ef0bf64cb8cf4f213112b65f2d1d90 100644 index c65ab566c6241dd6a44bd11a449ef0c4b2f6dc65..6674d1b184246ecce5270a6826b153903e4a5a88 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -84,16 +84,30 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -84,16 +84,30 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -3094,7 +3094,7 @@ index 1e07febcf7a3dfb281728cc5e3e4f15dd776d7e0..6c86411658ef0bf64cb8cf4f213112b6
this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0])); this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, WitherBoss.LIVING_ENTITY_SELECTOR)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, WitherBoss.LIVING_ENTITY_SELECTOR));
} }
@@ -256,6 +370,16 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -263,6 +377,16 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override @Override
protected void customServerAiStep() { protected void customServerAiStep() {
@@ -3111,7 +3111,7 @@ index 1e07febcf7a3dfb281728cc5e3e4f15dd776d7e0..6c86411658ef0bf64cb8cf4f213112b6
int i; int i;
if (this.getInvulnerableTicks() > 0) { if (this.getInvulnerableTicks() > 0) {
@@ -576,11 +700,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -583,11 +707,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
} }
public int getAlternativeTarget(int headIndex) { public int getAlternativeTarget(int headIndex) {

View File

@@ -34,7 +34,7 @@ index c6a06e07f0b4bb29b5f4c70dfa53ff6db2e4e6ea..730958dab7f074930cdccb88a89aa26e
protected ParticleOptions getInkParticle() { protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK; return ParticleTypes.GLOW_SQUID_INK;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 3c2892b9b2ade76d9d4b081ad5bce4991df11dda..0d07e666f4da002a353d03844d62a0e3aac44d9d 100644 index 8fdeda8939879eb070cdd8808263f4beaf144f9e..734ca15f79186cb0385b845c40ea56be7ab085cf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -287,6 +287,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -287,6 +287,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -743,7 +743,7 @@ index 86029716d5538e28a8845375cc23d4bf408073ff..973c5045137850905126db91238dd8e5
return createBaseHorseAttributes().add(Attributes.MAX_HEALTH, 15.0D).add(Attributes.MOVEMENT_SPEED, (double)0.2F); return createBaseHorseAttributes().add(Attributes.MAX_HEALTH, 15.0D).add(Attributes.MOVEMENT_SPEED, (double)0.2F);
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index 76e4b87ffc470b7b205fba0a254668f15a394034..e46751dacee17e81933345266049675d0b11ee49 100644 index ffb3d8f057b09ab61b8d33b244e81d25587e6ae7..fad1b122cd3a929e60eb0f9c5b4c63a4bfae522e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java --- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -107,6 +107,11 @@ public class Sniffer extends Animal { @@ -107,6 +107,11 @@ public class Sniffer extends Animal {
@@ -775,7 +775,7 @@ index c5100d3d8c36bf0c07f2028c5d3ec4bbe6e92256..9e85b252bedb5d0d532170e7aa57e02f
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D); return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D);
} }
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 6c86411658ef0bf64cb8cf4f213112b65f2d1d90..6f7ef64612d6229179545d56093efdf58a2d7978 100644 index 6674d1b184246ecce5270a6826b153903e4a5a88..e6d6341f895c763fee05db3a7a7e05a68b9d36e9 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -112,6 +112,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -112,6 +112,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -790,7 +790,7 @@ index 6c86411658ef0bf64cb8cf4f213112b65f2d1d90..6f7ef64612d6229179545d56093efdf5
@Override @Override
protected PathNavigation createNavigation(Level world) { protected PathNavigation createNavigation(Level world) {
FlyingPathNavigation navigationflying = new FlyingPathNavigation(this, world); FlyingPathNavigation navigationflying = new FlyingPathNavigation(this, world);
@@ -420,7 +425,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -427,7 +432,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
this.setInvulnerableTicks(i); this.setInvulnerableTicks(i);
if (this.tickCount % 10 == 0) { if (this.tickCount % 10 == 0) {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity safeFallDistance
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0d07e666f4da002a353d03844d62a0e3aac44d9d..92745269118d8a0cb91cbbebdd7700f7737d2b9a 100644 index 734ca15f79186cb0385b845c40ea56be7ab085cf..287189fc95067d746e8253fc2633b843a72dcd73 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -253,6 +253,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -253,6 +253,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -34,7 +34,7 @@ index 0d07e666f4da002a353d03844d62a0e3aac44d9d..92745269118d8a0cb91cbbebdd7700f7
double d7 = Math.min((double) (0.2F + f / 15.0F), 2.5D); double d7 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
int i = (int) (150.0D * d7); int i = (int) (150.0D * d7);
@@ -2054,7 +2055,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2058,7 +2059,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
MobEffectInstance mobeffect = this.getEffect(MobEffects.JUMP); MobEffectInstance mobeffect = this.getEffect(MobEffects.JUMP);
float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1); float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1);
@@ -44,7 +44,7 @@ index 0d07e666f4da002a353d03844d62a0e3aac44d9d..92745269118d8a0cb91cbbebdd7700f7
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
index 296cc895fbd090b4d43807f4ca393f6dd853e0ce..8400f02a37bdef4a9f92879a6b186ebe1f2f145e 100644 index 7a7466092a2cd194abec3abdb77a7c649b4b433c..fdf41f4990923aa4309febb9c0ca8009de8e16f1 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
@@ -384,7 +384,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @@ -384,7 +384,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Disable loot drops on death by cramming
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 92745269118d8a0cb91cbbebdd7700f7737d2b9a..b3699225e2dc77c6d201e361c8d447395c3f3e62 100644 index 287189fc95067d746e8253fc2633b843a72dcd73..bb8ba67c7a4a4c7a641e103bd20cbc0a01dc66b2 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1801,6 +1801,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1805,6 +1805,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropEquipment(); // CraftBukkit - from below this.dropEquipment(); // CraftBukkit - from below
if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@@ -16,7 +16,7 @@ index 92745269118d8a0cb91cbbebdd7700f7737d2b9a..b3699225e2dc77c6d201e361c8d44739
this.dropFromLootTable(source, flag); this.dropFromLootTable(source, flag);
// Paper start // Paper start
final boolean prev = this.clearEquipmentSlots; final boolean prev = this.clearEquipmentSlots;
@@ -1809,6 +1810,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1813,6 +1814,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper end // Paper end
this.dropCustomDeathLoot(source, i, flag); this.dropCustomDeathLoot(source, i, flag);
this.clearEquipmentSlots = prev; // Paper this.clearEquipmentSlots = prev; // Paper

View File

@@ -18,10 +18,10 @@ index acce1d46d6bce9b052126c76bc1f36264df39e71..5b9ddcab26a4c962dae104c44d65d623
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end // Paper end
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b3699225e2dc77c6d201e361c8d447395c3f3e62..b8e6d0bd2ba18d7e0bf7cd78db8f98d4f1467d71 100644 index bb8ba67c7a4a4c7a641e103bd20cbc0a01dc66b2..c32a8c4b8a75f524b0f99ada0bba6de40c0aa732 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2496,7 +2496,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2500,7 +2500,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override @Override
protected void onBelowWorld() { protected void onBelowWorld() {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b8e6d0bd2ba18d7e0bf7cd78db8f98d4f1467d71..35e3cac34a6a508fbf3971cff9ac07db48ddeaae 100644 index c32a8c4b8a75f524b0f99ada0bba6de40c0aa732..4133db59cf52664354ce1a2e8bbacbad51e09861 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3519,7 +3519,16 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3523,7 +3523,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
int j = i / 10; int j = i / 10;
if (j % 2 == 0) { if (j % 2 == 0) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Totems work in inventory
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8c0ef795691aa17e9522b2deda794bcdf38c64b6..6edb9c371d77fa52b08f0eaf738d0cb4b0af86ce 100644 index 29d523efe2222511c25c8d8a3eeff6adf2a2da0e..c75d3490dd475fc7c1bd4931841cc84888a23bac 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1590,6 +1590,18 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1594,6 +1594,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
} }

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Customizable wither health and healing
Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often. Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often.
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 6f7ef64612d6229179545d56093efdf58a2d7978..b395d5c85f26ca4252d3f8f886b2ee5a7892af5f 100644 index e6d6341f895c763fee05db3a7a7e05a68b9d36e9..8796b779ac0550e32c7313b1280278de48070baf 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -518,8 +518,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -525,8 +525,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
} }
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6edb9c371d77fa52b08f0eaf738d0cb4b0af86ce..04b98c7c738682f5c1da27a6873a814eaca5d14b 100644 index c75d3490dd475fc7c1bd4931841cc84888a23bac..97dfdf4f5730d9f7c162f127bab38833cf757b4d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1768,7 +1768,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1772,7 +1772,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = false; boolean flag = false;
if (this.dead && adversary instanceof WitherBoss) { // Paper if (this.dead && adversary instanceof WitherBoss) { // Paper
@@ -144,10 +144,10 @@ index 3898653acb6127c88a94b5e7111a9cfecb2d136e..8f71c3b94ed17fd72e6bacce7d0a8e39
// flag1 = this.level().removeBlock(blockposition, false) || flag1; // flag1 = this.level().removeBlock(blockposition, false) || flag1;
flag1 = true; flag1 = true;
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index b395d5c85f26ca4252d3f8f886b2ee5a7892af5f..17432b434c899a4d075e4619b4a2bfe3d5761b49 100644 index 8796b779ac0550e32c7313b1280278de48070baf..97be7061d3cccac7b64f4b1a234ccbd83e2b7407 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -485,7 +485,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -492,7 +492,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
if (this.destroyBlocksTick > 0) { if (this.destroyBlocksTick > 0) {
--this.destroyBlocksTick; --this.destroyBlocksTick;

View File

@@ -17,10 +17,10 @@ index 9986dbe52ad38fcc0f642401a932428afc39c9f6..a907930813b0a3176354b4b307576d9f
} }
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 6056180cf792534b450cb00977b5f7bc011d0ae4..257cd3ea1830b46d1c51242cd639c4f0e21c8774 100644 index 76f88b96e4965e61a620d8e8809411a0711bf02e..8d882e6ef4e199258866f30f5548a6feae4582da 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -731,6 +731,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -738,6 +738,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override @Override
protected boolean canRide(Entity entity) { protected boolean canRide(Entity entity) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] One Punch Man!
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 04b98c7c738682f5c1da27a6873a814eaca5d14b..9a4ac87ae3cc766ba4080cf5b4f3743d13bd6266 100644 index 97dfdf4f5730d9f7c162f127bab38833cf757b4d..5ae73f8f86b0f55890b961cdbb8a31ff0ffc6209 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2293,6 +2293,20 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2297,6 +2297,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
} }

View File

@@ -32,7 +32,7 @@ index dbd61da31192896ced9839cf8a3b123a6625ae60..68be1bb59c7e5176c82ed128be5296a2
return this.hardCollides; return this.hardCollides;
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index cdae47c490555efad0eb2d2ae6498888aeaf21bd..972c0e43e3f099706b9ee744551d43d31ffb3fa7 100644 index 4ab8dca4b0f1f555c4ef4963a429dd4c0d28b06c..4c5a0644918dc912feef17470d7fcfd1a3b14d88 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -63,7 +63,7 @@ index cdae47c490555efad0eb2d2ae6498888aeaf21bd..972c0e43e3f099706b9ee744551d43d3
} }
// CraftBukkit start // CraftBukkit start
@@ -3537,6 +3544,27 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3541,6 +3548,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurt(this.damageSources().drown(), 1.0F); this.hurt(this.damageSources().drown(), 1.0F);
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for kinetic damage
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 972c0e43e3f099706b9ee744551d43d31ffb3fa7..21d6851cb903f214db92109a6c16bb7367e40e1c 100644 index 4c5a0644918dc912feef17470d7fcfd1a3b14d88..84d24e624bb3e81df174d5d6de0af3ab3967c4da 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2890,6 +2890,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2894,6 +2894,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (f3 > 0.0F) { if (f3 > 0.0F) {
this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F); this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for Wither's spawn sound
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 86b06182616fe07f1a5ef2b1799c434884cba149..9abc47eb3d0c1a0ee0868ec223431f4de4925c77 100644 index ff5d08f0cf323606ca2eb8bef3f487c7a86029e2..5bf7a6ecd58612c8502ed747263b6c0edd445294 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -418,7 +418,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -425,7 +425,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
} }
// CraftBukkit end // CraftBukkit end

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Config for mob last hurt by player time
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index aff8b1b0683e52038b6d92e052a012c9198bf8ce..ec3a9946b7387754c8f5a15ce6268a7fa666db02 100644 index 4758e9376e144e3baec2423a26f970ad03aa1565..4d13f2645ae9e76ed7b36d381ae24cd826e722b3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1502,13 +1502,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1506,13 +1506,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (entity1 instanceof net.minecraft.world.entity.player.Player) { if (entity1 instanceof net.minecraft.world.entity.player.Player) {
net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1; net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1;

View File

@@ -1162,7 +1162,7 @@ index 156c2683d72c5e83b1cefb9ebf356c6e4d31e7f4..e634f9b7998979e00e4de4899214863e
} }
} else { } else {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a793886dbb 100644 index 4d13f2645ae9e76ed7b36d381ae24cd826e722b3..ed99cd49c5d756bcf540dd8dfcebd32bb6298055 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -410,7 +410,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -410,7 +410,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1183,7 +1183,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
} }
public boolean canSpawnSoulSpeedParticle() { public boolean canSpawnSoulSpeedParticle() {
@@ -3123,10 +3123,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3127,10 +3127,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
this.run += (f3 - this.run) * 0.3F; this.run += (f3 - this.run) * 0.3F;
@@ -1197,7 +1197,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
// Paper start - stop large pitch and yaw changes from crashing the server // Paper start - stop large pitch and yaw changes from crashing the server
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
@@ -3138,7 +3138,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3142,7 +3142,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
// Paper end // Paper end
@@ -1206,7 +1206,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
this.animStep += f2; this.animStep += f2;
if (this.isFallFlying()) { if (this.isFallFlying()) {
++this.fallFlyTicks; ++this.fallFlyTicks;
@@ -3427,19 +3427,19 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3431,19 +3431,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
this.setDeltaMovement(d4, d5, d6); this.setDeltaMovement(d4, d5, d6);
@@ -1231,7 +1231,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
if (this.jumping && this.isAffectedByFluids()) { if (this.jumping && this.isAffectedByFluids()) {
double d7; double d7;
@@ -3466,8 +3466,8 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3470,8 +3470,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.noJumpDelay = 0; this.noJumpDelay = 0;
} }
@@ -1242,7 +1242,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
this.xxa *= 0.98F; this.xxa *= 0.98F;
this.zza *= 0.98F; this.zza *= 0.98F;
this.updateFallFlying(); this.updateFallFlying();
@@ -3494,8 +3494,8 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3498,8 +3498,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travel(vec3d1); this.travel(vec3d1);
} }
@@ -1253,7 +1253,7 @@ index ec3a9946b7387754c8f5a15ce6268a7fa666db02..9012b5b918bca409166db9eb29c201a7
if (!this.level().isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API if (!this.level().isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API
int i = this.getTicksFrozen(); int i = this.getTicksFrozen();
@@ -3512,15 +3512,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3516,15 +3516,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurt(this.damageSources().freeze(), 1.0F); this.hurt(this.damageSources().freeze(), 1.0F);
} }

View File

@@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: wefhy <85190077+wefhy@users.noreply.github.com>
Date: Sat, 26 Aug 2023 23:48:05 -0700
Subject: [PATCH] Disable pufferfish suffocation optimization for withers
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0b08cf7b26731ffd6f3909342f4e3a92fe0c813e..4cd04661b39a7055f5767a3dff88f9a3e197d810 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -419,7 +419,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = this instanceof net.minecraft.world.entity.player.Player;
if (!this.level().isClientSide) {
- if ((!gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) { // Pufferfish - optimize suffocation
+ if (shouldCheckForSuffocation() && this.isInWall()) { // Pufferfish - optimize suffocation // Purpur
this.hurt(this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
@@ -1412,6 +1412,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return true;
}
// Pufferfish end
+ // Purpur start
+ public boolean shouldCheckForSuffocation() {
+ return (!gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F)));
+ }
+ // Purpur end
@Override
public boolean hurt(DamageSource source, float amount) {
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 71f8cea4a33b30fdafa41714a424b3092a3a7cd0..4952a7daa1aad68e3ba53123093cd879e0d544b5 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -291,6 +291,13 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
this.bossEvent.setName(this.getDisplayName());
}
+ // Purpur start - optimize suffocation
+ @Override
+ public boolean shouldCheckForSuffocation() {
+ return true;
+ }
+ // Purpur end
+
@Override
protected SoundEvent getAmbientSound() {
return SoundEvents.WITHER_AMBIENT;