Skip to content

Commit

Permalink
Update PacketManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Mar 13, 2024
1 parent 69b1d66 commit 2750c2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/net/aspw/client/features/api/PacketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.aspw.client.protocol.ProtocolBase;
import net.aspw.client.utils.*;
import net.aspw.client.utils.timer.MSTimer;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.*;
import net.minecraft.item.ItemBucketMilk;
Expand Down Expand Up @@ -53,8 +54,8 @@ public static boolean shouldStopRender(Entity entity) {
}

private int getArmSwingAnimationEnd() {
return mc.thePlayer.isPotionActive(Potion.digSpeed) ? 5 - mc.thePlayer.getActivePotionEffect(Potion.digSpeed).getAmplifier() :
(mc.thePlayer.isPotionActive(Potion.digSlowdown) ? 8 + mc.thePlayer.getActivePotionEffect(Potion.digSlowdown).getAmplifier() * 2 : 6);
int speed = mc.thePlayer instanceof EntityPlayerSP ? 2 + (20 - Animations.SpeedSwing.get() - 16) : 6;
return mc.thePlayer.isPotionActive(Potion.digSpeed) ? speed - (1 + mc.thePlayer.getActivePotionEffect(Potion.digSpeed).getAmplifier()) : (mc.thePlayer.isPotionActive(Potion.digSlowdown) ? speed + (1 + mc.thePlayer.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : speed);
}


Expand Down

0 comments on commit 2750c2c

Please sign in to comment.