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
This commit is contained in:
@@ -16,16 +16,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public float eR() {
|
||||
return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D);
|
||||
}
|
||||
|
||||
+ public float getCooledAttackStrength(float adjustTicks) { return getAttackCooldown(adjustTicks); } // Paper - OBFHELPER
|
||||
public float getAttackCooldown(float f) {
|
||||
return MathHelper.a(((float) this.aA + f) / this.eR(), 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
+ public void resetCooldown() { this.ey(); } // Paper - OBFHELPER
|
||||
public void resetAttackCooldown() {
|
||||
this.aA = 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -40,11 +30,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ public float getCooledAttackStrength(float adjustTicks) {
|
||||
+ return getHandle().getCooledAttackStrength(adjustTicks);
|
||||
+ return getHandle().getAttackCooldown(adjustTicks);
|
||||
+ }
|
||||
+
|
||||
+ public void resetCooldown() {
|
||||
+ getHandle().resetCooldown();
|
||||
+ getHandle().resetAttackCooldown();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user