Fixed jetpack not draining energy without flight control
This commit is contained in:
parent
84dfcbd61b
commit
5722007f2c
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,6 @@ public class PlayerTickHandler implements ITickHandler {
|
|||
player.motionZ += vz;
|
||||
|
||||
totalEnergyDrain += jetEnergy * (vx * vx + vy * vy + vz * vz);
|
||||
ElectricItemUtils.drainPlayerEnergy(player, totalEnergyDrain);
|
||||
} else {
|
||||
Vec3 playerHorzFacing = player.getLookVec();
|
||||
playerHorzFacing.yCoord = 0;
|
||||
|
@ -225,6 +224,7 @@ public class PlayerTickHandler implements ITickHandler {
|
|||
player.motionX *= ratio;
|
||||
player.motionZ *= ratio;
|
||||
}
|
||||
ElectricItemUtils.drainPlayerEnergy(player, totalEnergyDrain);
|
||||
}
|
||||
|
||||
public static double getWeightPenaltyRatio(double currentWeight, double capacity) {
|
||||
|
|
Loading…
Reference in a new issue