Increase diff stability

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-09-22 02:57:13 +10:00
parent 8a3c8cfcd4
commit e903417936
27 changed files with 162 additions and 170 deletions

View File

@@ -703,7 +703,7 @@
+ }
+
+ f = (float) event.getFinalDamage();
+
+ // Resistance
+ if (event.getDamage(DamageModifier.RESISTANCE) < 0) {
+ float f3 = (float) -event.getDamage(DamageModifier.RESISTANCE);
@@ -726,7 +726,7 @@
+ float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
+ this.hurtArmor(damagesource, armorDamage);
+ }
+
+ // Apply blocking code // PAIL: steal from above
+ if (event.getDamage(DamageModifier.BLOCKING) < 0) {
+ this.level().broadcastEntityEvent(this, (byte) 29); // SPIGOT-4635 - shield damage sound
@@ -847,7 +847,7 @@
this.setSharedFlag(7, flag);
}
@@ -3027,14 +3476,21 @@
@@ -3027,13 +3476,20 @@
@Override
public boolean isPickable() {
@@ -859,18 +859,17 @@
public boolean isPushable() {
- return this.isAlive() && !this.isSpectator() && !this.onClimbable();
+ return this.isAlive() && !this.isSpectator() && !this.onClimbable() && this.collides; // CraftBukkit
}
+ }
+
+ // CraftBukkit start - collidable API
+ @Override
+ public boolean canCollideWithBukkit(Entity entity) {
+ return isPushable() && this.collides != this.collidableExemptions.contains(entity.getUUID());
+ }
}
+ // CraftBukkit end
+
@Override
public float getYHeadRot() {
return this.yHeadRot;
@@ -3229,7 +3685,26 @@
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {