Skip to content

Commit

Permalink
Calculate weight for Elenai Dodge sprinting consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Nov 21, 2024
1 parent 3fa1cae commit 8fd343d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public void utED2SprintingClient(TickEvent.PlayerTickEvent event)
{
if (event.phase == TickEvent.Phase.START
&& event.player instanceof EntityPlayerSP
&& (((EntityPlayerSP) event.player).sprintingTicksLeft < 5 || FeathersHelper.getFeatherLevel((EntityPlayerSP) event.player) == 0)
&& FeathersHelper.getFeatherLevel((EntityPlayerSP) event.player) < UTConfigMods.ELENAI_DODGE_2.utED2SprintingFeatherRequirement)
&& (((EntityPlayerSP) event.player).sprintingTicksLeft < 5 || FeathersHelper.getFeatherLevel((EntityPlayerSP) event.player) - FeathersHelper.getWeight((EntityPlayerSP) event.player) == 0)
&& FeathersHelper.getFeatherLevel((EntityPlayerSP) event.player) - FeathersHelper.getWeight((EntityPlayerSP) event.player) < UTConfigMods.ELENAI_DODGE_2.utED2SprintingFeatherRequirement)
{
event.player.setSprinting(false);
KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindSprint.getKeyCode(), false);
Expand Down

0 comments on commit 8fd343d

Please sign in to comment.