alRex-U / ParCool

A Minecraft Forge Mod for action of Cool Parkour
GNU General Public License v3.0
41 stars 30 forks source link

Feathers stamina is not consumed when using FastRun if min consume value is lower than 50 #187

Closed Rimevel closed 10 months ago

Rimevel commented 11 months ago

Summary I use the Feathers mod for stamina in my modpack. If I set the least_stamina_consumption value for FastRun to 50. All the feathers are gone in a second. Way too fast! If I set the value to something more resonable like 20, then I can run forever. Seems like any value below 50 equals infinite stamina.

Running Environment

alRex-U commented 11 months ago

This is intended behavior. This is a kind of technical problem of Feathers. Feathers has internally 0 - 20 interger value as the stamina, but ParCool has defaultly 0 - 2000 so rounding down values is needed. Therefore stamina consumption less than 100 is ignored. And ParCool use this formula to convert ParCool stamina to Feathers.

(Feathers consumption)=round((ParCool stamina consumption)/100)

This formula convert 49 to 0, 50 to 1. This is the cause.

ParCool 's stamina calculation is done on every tick so even if the stamina consumption was just 1, Feathers, which has only 20 interger value, will be consumed completely during only 1 second. I think one of the solutions may be buffering stamina state less that 100 and am planning to add it.r