even even even even even even more work

This commit is contained in:
Spottedleaf
2020-06-25 18:53:21 -07:00
parent ec7bd6a7c6
commit cfd598512a
34 changed files with 420 additions and 408 deletions

View File

@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof EntityHuman) {
- ((EntityHuman) damagesource.getEntity()).ey(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired
- ((EntityHuman) damagesource.getEntity()).resetAttackCooldown(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired
+ // Paper start - PlayerAttackEntityCooldownResetEvent
+ if (damagesource.getEntity() instanceof EntityPlayer) {
+ EntityPlayer player = (EntityPlayer) damagesource.getEntity();
@@ -23,7 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ ((EntityHuman) damagesource.getEntity()).resetCooldown();
+ }
+ // Paper end
+
}
if (event.isCancelled()) {
return false;