mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 11:59:17 +00:00
#837 Possible fix for Dark Leggings draining RF while stationary
This commit is contained in:
1 parent
d3257c3e12
commit
fd3c868d0d
1 file changed
+2
-2
@@ -173,8 +173,8 @@ public class DarkSteelController {
|
||||
ItemStack leggings = player.getEquipmentInSlot(2);
|
||||
SpeedUpgrade speedUpgrade = SpeedUpgrade.loadFromItem(leggings);
|
||||
if(leggings != null && leggings.getItem() == EnderIO.itemDarkSteelLeggings && speedUpgrade != null) {
|
||||
|
||||
double horzMovement = Math.abs(player.distanceWalkedOnStepModified - player.prevDistanceWalkedModified);
|
||||
|
||||
double horzMovement = Math.abs(player.distanceWalkedModified - player.prevDistanceWalkedModified);
|
||||
double costModifier = player.isSprinting() ? Config.darkSteelSprintPowerCost : Config.darkSteelWalkPowerCost;
|
||||
costModifier = costModifier + (costModifier * speedUpgrade.walkMultiplier);
|
||||
int cost = (int) (horzMovement * costModifier);
|
||||
|
||||
Reference in new issue
Block a user