aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch
diff options
context:
space:
mode:
authorAikar <[email protected]>2020-08-02 01:39:36 -0400
committerAikar <[email protected]>2020-08-02 01:39:36 -0400
commit9788250b1090713057c6ca39827f52c463fee11c (patch)
tree9cb7add4dc5610a8eb779f6715ae79cc698e65d9 /Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch
parent58a745eba0beeec4f080256330261c505b8e1a66 (diff)
downloadPaper-9788250b1090713057c6ca39827f52c463fee11c.tar.gz
Paper-9788250b1090713057c6ca39827f52c463fee11c.zip
Clean up a lot of obfuscation helpers and impls
This fixes a bug with obfuscation helpers for attack cooldown But every other change should stay the same. Cleaning up a lot of helpers that pointed to already unobfuscated items. Also adds final to many of the obfhelpers to assist with inlining. This is pretty much a patch maintenance
Diffstat (limited to 'Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch')
-rw-r--r--Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch
index be16bad720..df5b38adac 100644
--- a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch
+++ b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
-index 574d9ef4f4f0e95a66252b0428ff84c72d5bc32c..ad92d6d30f0e3280c2e4cab6d0c96280d40ae2ef 100644
+index 574d9ef4f4f0e95a66252b0428ff84c72d5bc32c..ce823833a0b308aeb11902652157575eabf09e3b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1822,7 +1822,16 @@ public abstract class EntityLiving extends Entity {
@@ -16,11 +16,11 @@ index 574d9ef4f4f0e95a66252b0428ff84c72d5bc32c..ad92d6d30f0e3280c2e4cab6d0c96280
+ // Paper start - PlayerAttackEntityCooldownResetEvent
+ if (damagesource.getEntity() instanceof EntityPlayer) {
+ EntityPlayer player = (EntityPlayer) damagesource.getEntity();
-+ if (new com.destroystokyo.paper.event.player.PlayerAttackEntityCooldownResetEvent(player.getBukkitEntity(), this.getBukkitEntity(), player.getCooledAttackStrength(0F)).callEvent()) {
-+ player.resetCooldown();
++ if (new com.destroystokyo.paper.event.player.PlayerAttackEntityCooldownResetEvent(player.getBukkitEntity(), this.getBukkitEntity(), player.getAttackCooldown(0F)).callEvent()) {
++ player.resetAttackCooldown();
+ }
+ } else {
-+ ((EntityHuman) damagesource.getEntity()).resetCooldown();
++ ((EntityHuman) damagesource.getEntity()).resetAttackCooldown();
+ }
+ // Paper end
}