Matthew's Difficulty Mod

Matthew's Difficulty Mod

8.5k Downloads

[BUG] Cannot jump when stamina is disabled in config

ScottCowe opened this issue ยท 4 comments

commented

Describe the bug
I disables stamina in the config files, and yet in a survival world I often find I cannot jump

To Reproduce
Steps to reproduce the behavior:

  1. Change stamina settings as follows `"stamina settings" {
    # Determines if the player will be punished with a slowness effect when stamina bottoms out.
    # DEFAULT: TRUE
    B:"Apply Slowness On Depletion"=false

         # Determines whether or not stamina will be disabled when on the peaceful difficulty.
         # DEFAULT: FALSE
         B:"Disable Peaceful Stamina"=false
    
         # Determines whether or not stamina will be disabled.
         # DEFAULT: FALSE
         B:"Disable Stamina"=true
    
         # Change the amount of stamina that each action takes.
         # To modify an action, fill a new value into the array with the format of {ACTION}:{STAMINA_REQUIRED}
         # Negative numbers are accepted.
         # List of applicable actions: JUMPING, RUNNING, MINING, ATTACKING
         # Enter a range between -100 - 100
         S:"Stamina Depletion" <
          >
     }`
    
  2. Jump around a bit in a survival world

Expected behavior
I should be able to jump

Details:

  • OS: Windows 10
  • Minecraft Version: Forge 1.12.2
  • Mod Version: 1.1.602
commented

Thank you for your report. I will investigate the issue and make a patch as soon as possible. If you have more information you can add, or additional bug reports, please feel free to post them.

commented

I have identified the issue. If you're curious it's a result of canceling the jump before checking any special conditions.

See Below:

if (stamina.Get().GetTotalStamina() < 15)
player.motionY = 0.0;
if (player.world.isRemote || player.isCreative() || ConfigHandler.common.staminaSettings.disableStamina)
return;

I will soon roll out a patch for this issue.

commented

This bug is now fixed and pushed to the master branch. Thank you!

commented

Please add this patch for the next release of this mod