}
}
if(isJetpackOn(player))
{
ItemJetpack jetpack = (ItemJetpack)player.getEquipmentInSlot(3).getItem();
if(jetpack.getMode(player.getEquipmentInSlot(3)) == JetpackMode.NORMAL)
{
player.motionY = Math.min(player.motionY + 0.15D, 0.5D);
}
else if(jetpack.getMode(player.getEquipmentInSlot(3)) == JetpackMode.HOVER)
{
if((!Mekanism.keyMap.has(player, KeySync.ASCEND) && !Mekanism.keyMap.has(player, KeySync.DESCEND)) || (Mekanism.keyMap.has(player, KeySync.ASCEND) && Mekanism.keyMap.has(player, KeySync.DESCEND)))
{
if(player.motionY > 0)
{
player.motionY = Math.max(player.motionY - 0.15D, 0);
}
else if(player.motionY < 0)
{
player.motionY = Math.min(player.motionY + 0.15D, 0);
}
}
else {
if(Mekanism.keyMap.has(player, KeySync.ASCEND))
{
player.motionY = Math.min(player.motionY + 0.15D, 0.2D);
}
else if(Mekanism.keyMap.has(player, KeySync.DESCEND))
{
player.motionY = Math.max(player.motionY - 0.15D, -0.2D);
}
}
}
player.fallDistance = 0.0F;
if(player instanceof EntityPlayerMP)
{
MekanismUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount);
}
jetpack.useGas(player.getEquipmentInSlot(3));
}
if(isGasMaskOn(player))
{
ItemScubaTank tank = (ItemScubaTank)player.getEquipmentInSlot(3).getItem();