geforkt von Mirrors/Paper
Fix accidentally renamed internal damage method
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
49b5ee78bb
Commit
219db06f85
@ -381,7 +381,7 @@
|
||||
float f2 = 0.0F;
|
||||
|
||||
- if (f > 0.0F && this.isDamageSourceBlocked(damagesource)) {
|
||||
+ // CraftBukkit - Moved into damageEntity0(DamageSource, float)
|
||||
+ // CraftBukkit - Moved into actuallyHurt(DamageSource, float)
|
||||
+ if (false && f > 0.0F && this.isDamageSourceBlocked(damagesource)) {
|
||||
this.hurtCurrentlyUsedShield(f);
|
||||
f2 = f;
|
||||
@ -398,7 +398,7 @@
|
||||
|
||||
- this.actuallyHurt(damagesource, f - this.lastHurt);
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.damageEntity0(damagesource, f - this.lastHurt)) {
|
||||
+ if (!this.actuallyHurt(damagesource, f - this.lastHurt)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
@ -406,21 +406,21 @@
|
||||
flag1 = false;
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.damageEntity0(damagesource, f)) {
|
||||
+ if (!this.actuallyHurt(damagesource, f)) {
|
||||
+ return false;
|
||||
+ }
|
||||
this.lastHurt = f;
|
||||
- this.invulnerableTime = 20;
|
||||
- this.actuallyHurt(damagesource, f);
|
||||
+ this.invulnerableTime = this.invulnerableDuration; // CraftBukkit - restore use of maxNoDamageTicks
|
||||
+ // this.damageEntity0(damagesource, f);
|
||||
+ // this.actuallyHurt(damagesource, f);
|
||||
+ // CraftBukkit end
|
||||
this.hurtDuration = 10;
|
||||
this.hurtTime = this.hurtDuration;
|
||||
}
|
||||
|
||||
- if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
|
||||
+ // CraftBukkit - Moved into damageEntity0(DamageSource, float)
|
||||
+ // CraftBukkit - Moved into actuallyHurt(DamageSource, float)
|
||||
+ if (false && damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
|
||||
this.hurtHelmet(damagesource, f);
|
||||
f *= 0.75F;
|
||||
@ -650,7 +650,7 @@
|
||||
protected float getDamageAfterArmorAbsorb(DamageSource damagesource, float f) {
|
||||
if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
|
||||
- this.hurtArmor(damagesource, f);
|
||||
+ // this.hurtArmor(damagesource, f); // CraftBukkit - Moved into damageEntity0(DamageSource, float)
|
||||
+ // this.hurtArmor(damagesource, f); // CraftBukkit - Moved into actuallyHurt(DamageSource, float)
|
||||
f = CombatMath.getDamageAfterAbsorb(f, (float) this.getArmorValue(), (float) this.getAttributeValue(GenericAttributes.ARMOR_TOUGHNESS));
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@
|
||||
int i;
|
||||
|
||||
- if (this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
|
||||
+ // CraftBukkit - Moved to damageEntity0(DamageSource, float)
|
||||
+ // CraftBukkit - Moved to actuallyHurt(DamageSource, float)
|
||||
+ if (false && this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
|
||||
i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
@ -674,7 +674,7 @@
|
||||
- f = this.getDamageAfterMagicAbsorb(damagesource, f);
|
||||
- float f1 = f;
|
||||
+ // CraftBukkit start
|
||||
+ protected boolean damageEntity0(final DamageSource damagesource, float f) { // void -> boolean, add final
|
||||
+ protected boolean actuallyHurt(final DamageSource damagesource, float f) { // void -> boolean, add final
|
||||
+ if (!this.isInvulnerableTo(damagesource)) {
|
||||
+ final boolean human = this instanceof EntityHuman;
|
||||
+ float originalDamage = f;
|
||||
|
@ -234,9 +234,9 @@
|
||||
+ // CraftBukkit start
|
||||
@Override
|
||||
- protected void actuallyHurt(DamageSource damagesource, float f) {
|
||||
+ protected boolean damageEntity0(DamageSource damagesource, float f) { // void -> boolean
|
||||
+ protected boolean actuallyHurt(DamageSource damagesource, float f) { // void -> boolean
|
||||
+ if (true) {
|
||||
+ return super.damageEntity0(damagesource, f);
|
||||
+ return super.actuallyHurt(damagesource, f);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (!this.isInvulnerableTo(damagesource)) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren